Two years have passed since my cousin had died    or      Two years have passed since my cousin died .   Which is correct?

Two days had passed since she had last eaten or slept.   Or should it be:     Two days have passed since she last ate or slept.   Or something else? And why? The combinatorial explosion of past simple, past perfect and present perfect is killing me.


So here is the issue. I have a radio button to select between two options. On the MainActivity.java here is what i have.   RadioGroup radioGroup = (RadioGroup) findViewById(R.id.shiftId); int radioSelect = radioGroup.getCheckedRadioButtonId(); RadioButton radioButton = (RadioButton) findViewById(radioSelect);    I make it part of the bundle and pass it to another activity,   bundle.putString(RADIO, radioButton.getText().toString());   On the next activity, this is how i get the radio button data,   String radio = bundle.getString(MainActivity.RADIO);   At this point what is type of radio? It is not a string and this is how I know how. I output the value of radio and get type1 which is also the name of the selected radio button,  TextView someView = (TextView)findViewById(R.id.someViewId); someView.setText(radio);   Then i try to do this confirmation below,   if (radio == "type1") {         TextView someView = (TextView)findViewById(R.id.someViewId);         someView.setText("it is a type1 radio button");     }      else {         TextView someView = (TextView)findViewById(R.id.someViewId);         someView.setText("it is something else");     }    "It is something else" is the output here. So I am doing something wrong while I am getting radio button parameters, or while I am passing those parameters to another activity, or while i m assigning those parameters in the new activity.   What ideally I would like to do is to get Radio Button parameters, pass them properly to the next activity and depending on which radio button is selected, make some changes. But how do I determine which of those buttons are selected. The result set that i get is not an integer not a string?

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?


In my website, I have title that is kind of like this:  <title>Current Title &rarr; Sub Title &rarr; My Site</title>   I want to display the Sub Title part of the title in some of my html elements... so I wrote this JavaScript code to print the title, but only the text in between the 1st and 2nd &rarr;  &quot;<script>document.write(document.title.split("\u2192")[1]);</script>&quot;   But that code outputs " Sub Title " with a space in front and behind it. Do you know how I can somehow delete the 2 spaces using javascript (without changing the title) to output something like this: "Sub Title"?  Thanks!

How do I trim a string in JavaScript? That is, how do I remove all whitespace from the beginning and the end of the string in JavaScript?


Will there be an update to Ubuntu for enabling it to easily install alongside Windows 8.1?  I have seen the various options to play with the restrictions made by UEFI and install Ubuntu through the "Something Else" option in installer. Before trying these workarounds, just wanted to check if Ubuntu has any plans to handle this in the installer itself.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Problem: Show that if $X$ and $Y$ are independent $N(0,1)$-distributed random variables, then $X/Y ∈ C(0,1)$.  Question: I don't know how to proceed below. I want to prove that the PDF of $X/Y$ is Cauchy. PS. I looked on wiki and they defined $C$ as $X/Y$  Attempt:   The expression looked hairy and  could not integrate it.   Note to self: problem 8.

Let $X_1$ and $X_2$ be two continuous r.v., my question is: what is the p.d.f of $Z=X_1/X_2$?


When I press CtrlAltt, the terminal is open in $HOME dir. I want to open it in /tmp instead. Thus:  CtrlAltt Terminal is open at /tmp  Is it possible? How can I configure it?

I am new to Ubuntu.  Whenever I open a terminal my current working directory /home/Varun (as found by typing pwd).  Is there any way I can make the terminal's path to be set as /home/Varun/Desktop/Java Files when it opens?


I have this query   $query = "SELECT * FROM customers WHERE customer_name = '{$orders}'";   but when the value of the $orders have a single quote(') for example:  $orders = "Carlo's shop";   the query return an error.  is there any good way to handle this situation?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I am learning a header file about Eigen library. In a definition of class like below:  class Utility {   public:     template <typename Derived>     static Eigen::Quaternion<typename Derived::Scalar> deltaQ(const Eigen::MatrixBase<Derived> &theta)     {         typedef typename Derived::Scalar Scalar_t;          Eigen::Quaternion<Scalar_t> dq;         ...   I know that "Derived" is a Template Data Type, and the parameter of function "deltaQ" uses it:  <Derived>   But what is the meaning of the function return type:  <typename Derived::Scalar>   mean? I can not find out the usage like this, and is it some special C++ technology? Thank you very much!

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


Ok! My question is, what is the physical meaning of the vector produced by a cross product?   For instance, in torque, what does the cross product’s resultant vector mean? What does it tell me about the previous two vectors? I know, also, that the vector produced is perpendicular to both the previous vectors, but what does that mean? Again, what does that tell me about my two previous vectors.  I looked up this question online and found one response on Quora:   “A dot product represents things like work, essentially giving a number value to how much two vectors are “cooperating” . . . A cross product is a vector, at right angles to both vectors forming it. It measures essentially how much two vectors are not cooperating, and is a maximum when the two vectors are right angles.”  That sounds in the ball park as to the definition I want, but I need further clarification as to the word “cooperating” (if that person’s explanation is remotely correct). I don’t want a simple definition - I want meaning.   Please help!! Thanks for reading and I hope to have an answer soon!   :-)

My teacher told me that Vectors are quantities that behave like Displacements. Seen this way, the triangle law of vector addition simply means that to reach point C from point A, going from A to B & then to C is equivalent to going from A to C directly.  But what is the meaning of a product of vectors? I cannot imagine how a product of displacements would look like in reality. Also, how do we know whether we need the scalar (dot) product or a vector (cross) product?


I have 10 ciphertexts and 10 plain texts I want to know which cipher is from which plain text how can I know this I  know the name of substitution cipher,  transposition cipher,  Vigen`ere cipher and  case-insensitive letters-only one-time pad that are used in these 10 cipher and plain text

I have some ciphertext that I have determined using frequency analysis to be most likely encrypted using a transposition cipher, as the letter frequencies are similar to plain English language text. I believe the next step should be to determine which transposition cipher it is, but I don't know how to do that. Am I right to assume that what I have is definitely a transposition cipher? And if so, how do I determine which transposition cipher it is? For what it's worth, here is the ciphertext I have. But (as asking for decryption of a specific ciphertext would be off-topic here) I'm interested in general techniques that could be applied to any ciphertext. CTCRAL TYNIH ORFLN NLONH LTOWH SLINI IIEER NOENT AHRNE NWAAM CTEAK ERDHH DMIOD AEINA YTFEI IEINM FSTGI UOVED GLMEI YINEE EYNGS BSCRA TUVGU UEIEV OHIDA TISRO IEEEA TETMG RSFHD DHARA ICSEU EVHNS WIYII YIRND TFVCX GSMVL IUELH RETRG NNREC ONEYI OTLUN SBRSH AIIEE TTOOI ESCLS KWSLE ETGHN EOTNU STGIM EEACR TAEEN LAPEH RHNHE GWIEH EWRNN UETHT EPREN SDNFW YUFGI TUEAY ETLMR TBIPW UPANI OEFUS RSEAT NRTDP RENOA EETIL HNNAD HECWD TTILI UECDT DTLAM RQERS MVVTR HYTYO UFOAM ONCNS NFSST EEVHA YHERE OEONM RE- GAO HCVLO COIYT HSENZ FAHHL LYRII USBAS IEHEO IOSOT TILAI EOGOT ETEHL DEENP AEISP IDDMT RHNBI EEEMO NTIOE ISGZE SEAEE IDLNI TRTTD RIDUT PTNIY NIYNQ MMMIR BDAOI AYDOT DTELG HAIHO BDESA RSYLN HNWCN TRLRE NTAMN AESEI EHAEY NHGMO REFOT TFTUP AEREE HTONG OISHT TVEHO MSEFO OLINE TOLET SOATR AERTC TGEGT STTNA ONNTG OHAIA TYUOT IIARN TENCO TKGAU TSEHH EIBWO SDTUW INDTR UECHC RSEAT DEOEW ENWFA ELGKM


I am a bit stuck on how to sort the frequency of a word from any text file input.  I was able to code the frequency of each code but I'm not sure how to sort them out from the most frequently occurring word.  This is what I have for the frequency.  For example. I have a file text that read.  This is a test run.  I come with no wrapping or pretty pink bows.  I am who I am from my head to my toes.  I tend to get loud when speaking my mind.  Even a little crazy some of the time. I. am. who. I. am.   the output with this code is.  2   a 2   am 2   am. 1   bows. 1   come 1   crazy 1   even 1   from 1   get 1   head 4   i 2   i. 1   is 1   little 1   loud 1   mind. 3   my 1   no 1   of 1   or 1   pink 1   pretty 1   run. 1   some 1   speaking 1   tend 1   test 1   the 1   this 1   time. 2   to 1   toes. 1   when 1   who 1   who. 1   with 1   wrapping   I was also wondering how can I ignore the period because some same words are being overcounted because of the period.     Scanner input;             try {                 input = new Scanner(file);                  Map<String, Integer> wordCounts = new TreeMap<String, Integer>();                     while (input.hasNext()) {                         String next = input.next().toLowerCase();                         if (!wordCounts.containsKey(next)) {                             wordCounts.put(next, 1);                         } else {                             wordCounts.put(next, wordCounts.get(next) + 1);                         }                     }                      //  report frequencies                      for (String word : wordCounts.keySet()) {                         int count = wordCounts.get(word);                              System.out.println(count + "\t" + word);                     }             } catch (FileNotFoundException e1) {                 // TODO Auto-generated catch block                 e1.printStackTrace();             }

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I was reading this . Here we are only considering $\frac{f(z)}{z^n}$ to be bounded for large $|z|$, i.e, $\exists R>0 $ such that  $\frac{f(z)}{z^n}$ is bounded for $|z|\geq R$. I was able to understand how we solved this question but I have an additional question.  What will happen if $\frac{f(z)}{z^n}$ is bounded on whole of $\mathbb{C}$?

Let $f:\mathbb{C}\to\mathbb{C}$ be a holomorphic function such there exists a $c\in\mathbb C$ with $|f(z)|\leq c\cdot |z|^n$ for all $z\in\mathbb C$. Show that there exists an $a\in\mathbb C$ with $f(z)=a\cdot z^n$.   Proof.  My general idea is to show that the taylor series only has one non-zero coefficient:  $\displaystyle |a_k|\leq\frac{k!}{2\pi}\oint_{|w|=r}\frac{|f(w)|}{|w|^{k+1}}dw\leq \frac{k!}{2\pi}\oint_{|w|=r}\frac{c\cdot|w|^n}{|w|^{k+1}}dw\leq \\\displaystyle\leq \frac{c\cdot k!}{2\pi}\oint_{|w|=r}|w|^{n-k-1}dw$  Now using the standard estimate since $\oint=2\pi r$:  $\displaystyle \leq c\cdot k!\cdot r^{n-k}\longrightarrow\begin{cases}0,\ k>n\\c\cdot n!,\ k=n\\ \infty,\ k<n\end{cases}$ as $r\to\infty$  In conlusion the taylor series for now looks like $f(z)=\sum_{k=0}^{n-1}a_k z^k+ a_n z^n$ with $|a_n|\leq n!\cdot c$. What do I do with the remaining summands?  Edit: I would say that for $k<n$ we have $|z|^k>|z|^n$ for $z\in D_1(0)$. So since the estimate has to hold for all $z\in \mathbb C$ we can't have that either.


Let's assume $C$ is an additive category. How can we show that for each $X,Y\in\mathrm{Ob}(C)$, the morphism $X\longrightarrow 0\longrightarrow Y$ is the zero element of $\mathrm{Hom}_C(X,Y)$?

Let $C$ be an abelian category. Assuming that $\hom_C(A,B)$ has an abelian group structure, prove that the zero map $0_{AB}:A\to B$ is the neutral element of this group.   I know that the group operation can be defined as $f+g:=\nabla_B\circ(f\oplus g)\circ \Delta_A$ for every $f, g\in\hom_C(A, B)$, where $\oplus$ is the biproduct, $\Delta_X:X\to X\oplus X$ is the diagonal map and $\nabla_X:X\oplus X\to X$ is the codiagonal map.   Defining $\varphi:=(f\oplus 0_{AB})\circ \Delta_A$, I've shown that $\pi_1\circ\varphi=f$ and that $\pi_2\circ\varphi=0_{AB}$ (where $\pi_1$, $\pi_2$ are the natural projections), which intuitively means that $f+0_{AB}=\nabla_B\circ \varphi=f$, but I don't know how to formalize this.  How do I show this formaly?


I use QGIS for a long times on mac and windows and I have a problem with the 2.12 version on my OSX 10.8.5 when I want to edit style of my vector layer.    When I click on properties of a vector layer and I want to edit the style, QGIS tells me that This layer doesn't have any editable properties. I attach a file to be as clear as possible. Is anyone having the same problem ? Do you find a solution?  I had the same problem with the 2.10 version.

I am a newbie with QGIS - I have just installed QGIS 2.10.1-Pisa. I am following a youtube tutorial by Steven Bernard and I just found that the styles do not work properly (I run Mac OS X Lion 7.5.1. on a 1.7 GHz Intel Core i5 MacBook Air).  When I want to change the sybology of my map, this does not work properly. If you have a look at step 3.2.3. Changing Symbol Structure in the manual on  , QGIS does not provide me with any choices. It tells me that 'This layer doesn't have any editable properties'. I am attaching a screenshot just to be clear.  Can anybody tell me what is wrong?


Problem : Find the range of the function : $\frac{1}{\pi}(\sin^{-1}x+\tan^{-1}x) + \frac{x+1}{x^2+2x+5}$  My approach :   Let $g(x) = (\sin^{-1}x+\tan^{-1}x)$  and $h(x)=\frac{x+1}{x^2+2x+5}$  and domain of $g(x)$ is $[-1,1]$  $\therefore$ maximum value of $g(x)$ is $g(1) = \frac{3}{4}$  and minimum value of $g(x)$ is at $g(-1) = -\frac{3}{4}$  Now how to find the maximum minimum value of $h(x) $  Let $h(x)=y=\frac{x+1}{x^2+2x+5}$  $\therefore y(x^2+2x+5)=x+1$  $\Rightarrow x^2y +x(2y-1)+5y-1=0$ .......(i)  Can we find the range of $h(x)$ using (i) Please guide on this thanks.. or there is any other alternative method using concept of maxima minima i.e. using differentiation. Thanks.

Find the range of the following function.    $$\cfrac{1}{\pi} \left(\sin^{-1} x + \tan^{-1} x\right) + \cfrac{x+1}{x^2 + 2x + 5} $$   where $\sin^{-1}x \ $ and $ \ \tan^{-1}x $ are inverse trigonometric functions.   This is what I've tried yet.  Let : $\cfrac{1}{\pi} \left(\sin^{-1} x + \tan^{-1} x\right) = g(x)$ and $ \cfrac{x+1}{x^2 + 2x + 5} = h(x)$ .  Therefore,  $$f(x) = g(x) + h(x)$$   I can write $h(x)$ as : $$h(x) = \cfrac{x+1}{(x+1)^2 + 4} = \cfrac{1}{(x+1) + \cfrac{4}{x+1}}$$  So, the function $f(x)$ becomes:   $$f(x) = \cfrac{1}{\pi} \left(\sin^{-1} x +\tan^{-1} x\right) + \cfrac{1}{(x+1) + \cfrac{4}{x+1}}$$  Domain of $g(x)$ is $[-1,1] \cap \mathbb{R} = [-1,1]$   Domain of $h(x)$ is $\mathbb{R} - \{-1\}$   Therefore, $dom(f(x)) = (-1,1]$   Now, finding maximum value of $h(x)$   $$\begin{align}  \cfrac{dh(x)}{dx} =& \cfrac{d}{dx} \left( (x+1) + \cfrac{4}{x+1} \right) \\ = & 1 - \cfrac{4}{(x+1)^2}\end{align}$$  Putting $h'(x)$ equal to zero to find critical points, I got:  $$\begin{align} 1 - \cfrac{4}{(x+1)^2} =& 0 \\ (x+1) =& \pm 2  \\ \boxed{x =  1 \ \text{OR} \ x = -3} \rightarrow \textsf{CRITICAL POINTS} \end{align}$$  How to go further from here? Is this method the perfect one for solving this type of questions? Or is there any other trick to go with it?


How do I start this? Do I follow the same proof on why rational numbers are countable?

Prove that $\mathbb{N}^k$ is countable for every $k \in \mathbb{N}$.  I am told that we can go about this inductively.   Let $P(n)$ be the statement: “$\mathbb{N}^n$ is countable” $\forall n \in \mathbb{N}$.  Base Case: $\mathbb{N}^1 = \mathbb{N}$ is countable by definition, so $\checkmark$  Inductive Step: $\mathbb{N}^{k+1}$ $“=”$ $\mathbb{N}^k \times \mathbb{N}$  We know that $(A,B)$ countable $\implies$ $A \times B$ is countable. I am stuck on the part where I have to prove the rest, but I know that, for example, $(1,2,7) \in \mathbb{N}^3 \notin \mathbb{N}^2 \times \mathbb{N}$ but instead $((1,2),7) \in \mathbb{N}^2 \times \mathbb{N}$. So how would I go about proving the statement.


I am trying to remember the title of a sci-fi film I watched a few years back taking place in a future society where people lived underground in a tightly monitored, population controlled city. The main character was an officer of some kind tasked with capturing people who attempt to flee when their names are called for the culling ritual. Ends with a bunch of people walking out on the surface of the earth and seeing the world outside their city for the first time. I believe it was made in the 1960s and the costumes and special effects were very "early Star Trek".  I have searched lists of old sci-fi movies with no success.

I recall when I was young (about 30+ years ago) I saw on TV a movie about a civilization (possibly humans in the future)  with limited life span (they died young) and if I recall correctly, an integrated red light indicator in their hands showing when they were about to die. When the light indicator turned on or turned off (I dont recall exactly) it meant they were about to die soon.   Does anyone have an idea which movie it could be?


I would like to rename the disks in my system, so that I can comfortably differ between all the removable drives I have. I know that it is possible to assign different labels to single partitions, but I haven't read anything about renaming the actual drive itself.  The Debian installation image however managed to relabel the drive as seen below:  lsblk NAME                  LABEL                  SIZE MAJ:MIN RM TYPE MOUNTPOINT sdd                   Debian 9.0.0 amd64 n 115,3G   8:48   1 disk  ├─sdd2                NTFS_36GB             33,5G   8:50   1 part  ├─sdd3                FAT32_16GB            14,7G   8:51   1 part  └─sdd1                EXT4_72GB             67,1G   8:49   1 part    (I created and relabeled the Partitions myself)  So I would like to know how that works and how I can change the disklabel  (/dev/sdx), not the label of the partitions (/dev/sdxy), myself.  And as far as I'm concerned this is not a duplicate, because I am NOT looking for a way to rename the drives partitions (which is what I already did), but the DRIVE ITSELF (see output of lsblk seen above: The drive is called "Debian 9.0.0 amd64 n", the partitions are called " FAT32_16GB" and so on.)  I would appreciate any help I can get.  Update:  Output of sudo file -s /dev/sdd:  /dev/sdd: DOS/MBR boot sector ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'Debian 9.0.0 amd64 n' (bootable); partition 1 : ID=0xee, start-CHS (0x0,0,1), end-CHS (0x3ff,254,63), startsector 1, 241827839 sectors, extended partition table (last)   Output of lsblk --output NAME,UUID,PARTUUID:  NAME                  UUID                                   PARTUUID sdd                   2017-06-17-13-08-59-00                  ├─sdd2                2D530D7137CBDA43                       afc5a866-4b80-463d-9a01-d196a333dadd ├─sdd3                FD8F-3B99                              132b5e3d-3607-4327-a89e-c6b311f2c1cf └─sdd1                5c8a0658-bcfb-41ba-8145-a1475e6ca4c7   cc2c2983-4cc5-4228-9cc3-5401b7d21803   Output of sudo fdisk -l /dev/sdd:  Disk /dev/sdd: 115,3 GiB, 123815854080 bytes, 241827840 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 32C4D45A-8930-4D9F-8C2B-1CD08A292466

I'm new at Ubuntu; I installed Ubuntu 12.10 and the partitions appear like 30 GB volume and like 78EF-2C5E in task bar. I tried to rename it but rename and remove buttons are deactivated so I tried by using disks but it gives me error:  (Error setting label: Command-line `mlabel -i "/dev/sdb8" ::"windows"' exited with non-zero exit status 1: Total number of sectors (18550784) not a multiple of sectors per track (63)! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test  (udisks-error-quark, 0))   and this happen also to any attached usb to my laptop.


I've seen some sentences that use the word 'anything' with a noun or adjective such as 'anything crystal'. Can you use 'anything' followed by a verb? i.e. i love anything speaking/writing.

I've seen the expression in some company names; for example , .  Is the expression "All things X" a parody of some other popular phrase, or does it have its own meaning? Or is it just a misuse of grammar?


For a report I'm describing all the mobile design patterns used in my design and I should use the correct names. However, I can't find the correct title for the 'off-canvas navigation menu', a menu that is mainly hidden, but shown by a click of a button (often a 'hamburger' icon'), such as in the (old) Facebook iPhone app.  P.s. If possible link the library which confirms your answer. (Which might help me seek other titles as well.

It can be found for example in the YouTube and Facebook app.


Say I have these Classes and variables  public class Human {     public string name; }  public class Home {     public Human m_oHuman = null;      public Home(ref Human p_oHuman) { //note the ref         m_oHuman = p_oHuman;     }      //p_oNewHuman takes over the home     public void TakeOver(Human p_oNewHuman) { //don't need ref, just need copy         m_oHuman = p_oNewHuman; //Won't work as intended.     } }  //Run this code public Human homeOwner = new Human { name = "Sally" }; public Home home = new Home(ref homeOwner) public Human homeStealer = new Human { name = "Daisy" }; home.TakeOver(homeStealer);   What I'm trying to do is pass homeOwner by reference and save that reference in the global variable m_oHuman then later I want to try make homeOwner "point" to homeStealer or at least a copy of homeStealer since it's not passed by ref. But doing it the way I've coded seems to make m_oHuman lose the initial reference, and so homeOwner is still "Sally" when I want it to point to p_oNewHuman.  What I'm thinking I must do, instead of m_oHuman  = p_oNewHuman;, is go through and copy all the variables from p_oNewHuman to m_oHuman.  But with the code I'm really working with, there are many members and classes that I'm trying to make work like the code above and I feel this could become cumbersome having to manually copy object variables. So I'm wondering if there was a better or easier way to achieve this goal.

I have a object that is my in memory state of the program and also have some other worker functions that I pass the object to to modify the state. I have been passing it by ref to the worker functions. However I came across the following function.  byte[] received_s = new byte[2048]; IPEndPoint tmpIpEndPoint = new IPEndPoint(IPAddress.Any, UdpPort_msg); EndPoint remoteEP = (tmpIpEndPoint);  int sz = soUdp_msg.ReceiveFrom(received_s, ref remoteEP);    It confuses me because both received_s and remoteEP are returning stuff from the function. Why does remoteEP need a ref and received_s does not?  I am also a c programmer so I am having a problem getting pointers out of my head.  Edit: It looks like that objects in C# are pointers to the object under the hood. So when you pass an object to a function you can then modify the object contents through the pointer and the only thing passed to the function is the pointer to the object so the object itself is not being copied.  You use ref or out if you want to be able to switch out or create a new object in the function which is like a double pointer.


I have got Ubuntu 16.04.1 as OS and the graphics card GeForce GTX 780M. I have been trying to install the NVIDIA driver for my graphics card. But after installation I get login loop.  I downloaded the driver from   I have looked at the similar questions (like  and ) here but nothing helped. I tried:  1) to disable nouveau  2) to install the NVIDIA drivers from ppa:  $ apt-cache search nvidia-* | grep -P "^nvidia-[0-9]+\s" nvidia-304 - NVIDIA legacy binary driver - version 304.131 nvidia-331 - Transitional package for nvidia-331 nvidia-340 - NVIDIA binary driver - version 340.96 nvidia-346 - Transitional package for nvidia-346 nvidia-352 - Transitional package for nvidia-361 nvidia-355 - NVIDIA binary driver - version 355.11 nvidia-358 - NVIDIA binary driver - version 358.16 nvidia-361 - NVIDIA binary driver - version 361.45.18 nvidia-364 - NVIDIA binary driver - version 364.19 nvidia-367 - NVIDIA binary driver - version 367.44 nvidia-370 - NVIDIA binary driver - version 370.23   I've tried all of them without a success.  3) to reinstall xorg, xserver-xorg, unity, ubuntu-desktop  4) even to reinstall Ubuntu  But the problem is not solved yet.  Any ideas how to fix it?

I installed or upgraded to Ubuntu 16.04, but I'm having some problems with my graphics card.   The display is blank The display flickers Items on the screen do not display correctly Certain programs complain of graphics issues The computer boots to low-graphics mode Your specific issue may not be here, but try the solutions described in the answers anyway.   This question is very broad, but each one of these issues likely has one solution.    If you are experiencing a login loop, check the last part of my answer.    If you experience one of the listed issues and have your own solution (mine didn't work, or there's a faster way), feel free to post another POLITE answer, describing your problem and how you fixed it.    Those attempting to install Ubuntu, please refer to the section titled: If you are unable to enter a TTY or are trying to install Ubuntu.


House-elves are magical creatures, that are bound to serve their wizard masters until death, unless they're given an article of clothing. How did they become enslaved? Did wizards create them? Are they enchanted? Did they willingly put themselves under this, since they actually ENJOY the slavery?  How did the house-elves become bound to their wizard masters?

How/Why/When did the house elves start serving wizards? I tried on my own to find the answer but I couldn't find anything relevant to my subject but I am bad at searching.


I have a list as per below, it is currently returning the first and the 3rd item in the list, but i only want the 3rd item not the 3rd, how can i achieve this?  >>>list = ['1', '2', '3', '45'] >>>print list[::2] ['1', '3']   Thanks

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


I watched this  which showed a Neodymium magnet being cut in half, what i expected to see was the two halves snap together due to aligned poles as shown in the image below,     but what actually seems to have happened in the video is the two halves strongly repelled each other as if the poles formed were both the same charge. Why didn't they simply recombine? Did the poles reverse somehow?

I just took a rare earth magnet out of an old hard drive. Lacking an appropriate screwdriver, force was used, and the magnet broke into two pieces; one about a quarter of the original size and one about 3/4 the original size.  Let's say this is the magnet:  >>>>>>>>   and the arrows are pointing north, in the original magnet.  It broke into two pieces:  >>>>>}   }>   (where } represents the rough edge of the break).  I'd expect that the two magnets would keep their relative directions, so that the magnets would fit back together at the break, like this:  >>>>>}}>   But instead, the broken edges repel, and the magnet wants to come together so that formerly "north-facing" sides are now connected, like so:  >>>>>}<{   The obvious deduction here is that one of the pieces flipped polarities when the magnet was broken. I don't understand why this would be the case.  So why did one of the pieces flip polarities?  EDIT: To clarify, the actual magnet is a 120-degree arc of a circle. Thus, it's obvious what the original orientation of the pieces were. This isn't simply a case of me getting the pieces flipped over relative to each other.


I have seen the similar  here on the site related to the message user was removed but its not quite clear how to find the related post associated with it.   We can see the post associated with removal of post, is provided with the post heading and/or question. I think the posts associated with this user was removed message is of the user who is getting this strange reputation loss.    In the image above we can see the when post is removed the heading is provided, but for the user removed message the heading and/or link is not provided.  Is it possible to find out the related post?

Understanding , it'd be nice to know specifically where that reputation was lost from.  Reputation changes typically cite where reputation was gained or lost; however, it's difficult to reference the origin of where it was lost when a user is removed:        Already labeled as removed, a link to the question would indicate the source of the loss, as in:     -10     6 hours ago     removed     List component to bring up InputText boxes   Perhaps there's greater complexity here than I realize, such as the question itself being deleted; however, actions such as removing an upvote to a question or answer could be linked.


I am trying out standard method of guarding a .h (example:checkpgm.h) file with guard variables as follows #ifndef _CHECKPGM #warning CHECKPGM value is 0 #define _CHECKPGM 1 char a; #endif  This code is included in two files checkmain.c and checksub.c When these two files are linked I get the error message Building target: checkpgm Invoking: GCC C Linker gcc  -o "checkpgm" ./src/checkmain.o ./src/checksub.o    /usr/bin/ld: ./src/checksub.o:/home/nagesh/eclipse-workspace/multi/checkpgm/Debug/../src/checkpgm.h:18: multiple definition of `a'; ./src/checkmain.o:/home/nagesh/eclipse-workspace/multi/checkpgm/Debug/../src/checkpgm.h:18: first defined here  I am unable to understand how this is happening in-spite of guarding. I tried  Changing #define _CHKPGM  to #define _CHKPGM 1 (explicit value assignment) Similarly, #if  _CHKPGM == 0 Checking with #if defined Adding _CHECKPGM with -D flag (Undefined) Somehow standard libraries are not having this problem (stdio.h, stdlib.h); So copied their style _BEGIN_DECLS... By warning messages, it is clear that _CHECKPGM gets assigned in its first inclusion. However This value will be lost when compilation of second program begins and hence guard fails. But unable to figure out why?.  Can you folks please help us out? Thanking in advance... RaviJ checkpgm.h is included in

I have a header file  x.h which is included by more than one *.c source files. This header file has some structure variables defined.  I have put multiple inclusion prevention guard at the beginning of the header file as:  #ifndef X_H #define X_H ... .. //header file declarations and definitons.   #endif//X_H   On building I get linker errors related to multiple definitions. I understand the problem.   Won't a multiple inclusion prevention guard at the top of header file as I have, prevent multiple inclusions of the header file x.h and thereby avoid multiple definitions of the variables that are there in x.h? #pragma once does not work on this particular compiler, so what is the solution?  Someone had posted  answer to a similar question. It doesn't seem to work for me. How does this solution work?


Is the algorithm for Community deletion of questions documented anywhere? I'm interested in both the SO and MSO algorithms, in case they are different.  If it matters, the trigger for this question is an innocuous, unanswered  ago that received it's first and only downvote recently and which I flagged (as an FYI only, not expecting any reversal) as likely being part of a small retaliatory downvote.

Related to Meta Super User efforts:  and Meta Server Fault efforts:  We already auto-remove negatively voted unanswered old questions automatically after 30 days, network wide, with no human intervention required. I was thinking we might extend that to remove old, unanswered zero score questions... based on the following criteria:  fewer than (question age in days * 1.5) views 0 score or lower, or 1 score or lower if the original author is deleted no answers 1 comment or fewer asked more than 1 year ago (thus based on creation date, not last activity date, so , or a user editing it, does not give a doomed question 365 more days of zombie "life")  See the results of this query on:  (10509) |  (787) |  (650) This query has been refined based on the comments, and this is the final version that will roll out tonight. Every site in the network (except metas) will automatically delete old questions that meet this criteria from this point forward.


I have returned to blender after 6-7 months of not using it, and wow has it gone through some changes. I've been re-teaching myself this program, and have ran into a problem that people online can't answer, as it refers to earlier versions.  My problem is that I can't import reference images. I've tried using the import buttons, I've tried searching the program for background/reference image importing options, and even trying to just drag it in. Nothing is working. Does anyone know a solution to this problem?  Thanks!

Cannot find Background Images feature to add in a photo in Blender 2.8  Where is it?


If $\gcd(a,b) = 1$, show that $\gcd(2a+b, a+2b)=1 \mbox{ or } 3$.   What I tried:  Suppose:  $d \ | \ 2a+b$ and $d \ | \ a+2b$, then:  $$2a+b = d\cdot k_1$$ $a+2b = d\cdot k_2$$  therefore:  $$3(a+b) = d(k_1+k_2)$$  I also noted that if $\gcd(a,b)=1$ then $a+b$ has some interesting property for division but I cannot figure out exactly

If $a$ and $b$ are relatively prime, prove that $a + 2b$ and $2a+b$ are also relatively prime or have a $\gcd$ of $3$.  I'm very new to number theory so please don't assume I am familiar with some of the terminology.


I recently installed Ubuntu 12.04, but now updates will not install. This is the error message:  The following packages have unmet dependencies:  linux-image-generic-lts-saucy: Depends: linux-image-3.11.0-19-generic but it is not installed   I have tried several of the terminal commands listed among the AskUbuntu answers, but get:  E: Could not open lock file /var/lib/dpkg/lock - open (13 - Permission denied) E: unable to lock the administration directory   The apt-get -f install doesn't fix the problem.  I am not a code monkey, so would someone please help me? Thank you.

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


How one can input a small keyboard or any figure in text?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I am using log4net RollingFileAppender in a windows service program written in C#. The number and size of files in logs directory is growing too fast, need cleanup. The configuration is below:  <appender name="Rolling Log" type="log4net.Appender.RollingFileAppender"> <file value="..\logs\MyProgram.%cs{instanceName}.log" /> <appendToFile value="true" /> <rollingStyle value="Composite" /> <datePattern value=".yyyy-MM-dd.lo\g" /> <maxSizeRollBackups value="10" /> <maximumFileSize value="150MB" /> <layout type="log4net.Layout.PatternLayout">   <conversionPattern value="%date [%-5level] %property{remoteUser} [%threadIdentity] %type{1}.%method - %message%newline%exception" /> </layout>     I only want to keep 30 days of logs. How can I configure log4net to delete the logs automatically? If not available through log4net, what solutions would I have?  Thank you in advance.

I have the following configuration, but I have not able to find any documentation on how to set a maximum backup files on date rolling style.  I know that you can do this with size rolling style by using the maxSizeRollBackups.  <appender name="AppLogFileAppender" type="log4net.Appender.RollingFileAppender">     <file value="mylog.log" />     <appendToFile value="true" />     <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />     <rollingStyle value="Date" />     <datePattern value=".yyMMdd.'log'" />     <layout type="log4net.Layout.PatternLayout">       <conversionPattern value="%d %-5p %c - %m%n"  />     </layout> </appender>


I met a client yesterday and he asked me a question I.e. weather hamburger menu should be placed on the right side or left side of the page. My answer was to place it on the right side because logically right side is the easy access to any user using mouse or track pad but his was counter was obvious that, why are everyone following left navigation (Amazon.com, fb.com). I was answer less for a minute. I know all the theory says left or maybe it's been a practice ever since hamburger menu was introduced. I'm finding hard to accept left side placement though I've used left side in many of the projects.  Please help me understanding this.

Quite a while ago we decided to move our hamburger menu (I know they are evil but we got stupid amount of subcategories) to the right. Reasoning behind that was based on accessibility and in indoors labs it proven that people preferred it this way.   Now we are doing some reworks regarding mobile top banner and search. While doing research I noticed that literally all of our competitor has their hamburger menus on the left.   Is it worth sacrificing usability (way easier to reach menu) for consistency (everyone one else is having their hamburger menus on the left).  It is worth noting that our customer base is heavily using mobile devices especially iPhones.  There is similar topic but I dont think it covers particular use of hamburger menu location on websites, and not apps.


I am currently trying to make a java card game but am having trouble setting the card. I am taking in values such as 2H 3D 4S 5C 6H in the main function. I am trying to put these values into my Card class but when I try to set my rank I get a nullpointerexception error.   I am new to java programing and can not figure out why this is happening. Any suggestions? Am I not allowed to make an array of Cards?  public class Game {  public static void main(String[] args) {     Scanner sc = new Scanner(System.in);     int T = sc.nextInt();      String[] player1arr = new String[5];     String[] player2arr = new String[5];      Card[] player1 = new Card[5];     Card[] player2 = new Card[5];      for(int i = 0; i < 5; i++){         player1arr[i] = sc.next();         char first = player1arr[i].charAt(0);         int rank = Character.getNumericValue(first); //error         player1[i].setRank(rank);        }      for(int i = 0; i < 5; i++){         player2arr[i] = sc.next();         System.out.println(player2arr[i]);     }     } }  class Card{     private int rank;     private char suit;      public int getRank(){         return rank;     }      public void setRank(int r){         rank = r;     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Does mass dilate in general relativity. For example if I was accelerating will my mass dilate?  Thanks

I'm reading Nano: The Essentials by T. Pradeep and I came upon this statement in the section explaining the basics of scanning electron microscopy.     However, the equation breaks down when the electron velocity approaches the speed of light as mass increases. At such velocities, one needs to do relativistic correction to the mass so that it becomes[...]   We all know about the famous theory of relativity, but I couldn't quite grasp the "why" of its concepts yet. This might shed new light on what I already know about time slowing down for me if I move faster.  Why does the (relativistic) mass of an object increase when its speed approaches that of light?


When $G = K_n, n \ge 3$ and  $n$ is odd, then from the edges of the $G$ can be built edge-disjoint Hamiltonian cycles. Is it true?

At the moment I'm trying to prove the statement:     $K_n$ is an edge disjoint union of Hamiltonian cycles when $n$ is odd.   ($K_n$ is the complete graph with $n$ vertices)  So far, I think I've come up with a proof. We know the total number of edges in $K_n$ is $n(n-1)/2$ (or $n \choose 2$) and we can split our graph into individual Hamiltonian cycles of degree 2.   We also know that for n vertices all having degree 2, there must consequently be $n$ edges. Thus we write $n(n-1)/2 = n + n + ... n$ (here I'm just splitting $K_n$'s edges into some number of distinct Hamiltonian paths) and the deduction that $n$ must be odd follows easily.  However, the assumption I made - that we can always split $K_n$ into Hamiltonian paths of degree 2 if $K_n$ can be written as a disjoint union described above - I'm having trouble proving. I've only relied on trying different values for $n$ trials and it hasn't faltered yet. So, I'm asking:     If it is true, how do you prove that if $K_n$ can be split into distinct Hamiltonian cycles, it can be split in such a way that each Hamiltonian cycle is of degree 2?


I have an ubuntu VM, where i by accident installed jdk 11, but i wanted to install jdk 8, and then set the enviroment variable like this.   #in the .bashrc file if want to add the following lines export JAVA_HOME=~/java/jdk1.8.0_161 export PATH=$JAVA_HOME/bin:$PATH export SPTARGET=sandbox    the problem is that i did not install the jdk, i did it directly from the command line   sudo apt install default-jre   and whenever i check the version with   $ java -version outputs: openjdk version "11.0.3" 2019-04-16  does anybody know how i can remove this java version, and then add the java jdk environment variable manually?

On Ubuntu 12.04 LTS I have installed Sun's JDK7, Eclipse, and the Arduino IDE. I want the Arduino to use OpenJDK 6 and want Eclipse to use Sun's JDK 7.   From my understanding I need to manually choose which Java to use before running each application. This led me to the update-java-alternatives -l command. When I run this I only see the following:   java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64   but when I run update-alternatives --config java I see the following:   *0  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   auto mode 1  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   manual mode 2  /usr/lib/jvm/jdk1.7.0/bin/java                   manual mode 3  /usr/lib/jvm/jre1.7.0/bin/java                   manual mode   I don't understand why the update-java-alternatives doesn't display the same 3 options. I also don't understand how to switch between OpenJDK6 and JDK7. How I can go about using the OpenJDK6 for Arduino development and Sun JDK7 for Eclipse/Android development?


Notation:    Two binary quadratic forms $f(x, y) = ax^2 + bxy + cy^2, g(x, y) = kx^2 + lxy + my^2$ are called equivalent, if there exists $\begin{bmatrix}p & q \\ r & s\end{bmatrix} \in \text{SL}_2(\mathbb{Z})$, such that $f(px + qy, rx + sy) = g(x, y)$. Two fractional ideals $\mathfrak{a, b} \subseteq K, \mathfrak{a, b} \neq 0$ are called equivalent if there exists $\alpha \in K$ with $N(\alpha)$ satisfying $\mathfrak{b} = \alpha\mathfrak{a}$.    Motivation and Proposition: For a binary quadratic form $f(x, y) = ax^2 + bxy + cy^2$ with $a > 0$ we can define a fractional ideal $\mathfrak{a}_f := \mathbb{Z} + \frac{b + \sqrt{\Delta_K}}{2a}\mathbb{Z}$. This indeed is an fractional ideal. Now I want to show that this assignment maps different equivalent binary quadratic forms to equivalent fractional ideals.  Attempt: Let $f(x, y) = ax^2 + bxy + cy^2, g(x, y) = kx^2 + bxy + cy^2$ be two equivalent binary quadratic forms. I need to show that there exists $\alpha \in K, N(\alpha) > 0$ satisfying $\mathfrak{a}_f = \alpha\mathfrak{a}_g$ or $\mathfrak{a}_g = \alpha\mathfrak{a}_f$ using the existence of $\begin{bmatrix}p & q \\ r & s\end{bmatrix} \in \text{SL}_2(\mathbb{Z})$, such that $f(px + qy, rx + sy) = g(x, y)$. At this point I can't see how to proceed and ask for your help.   Disclaimer: I already saw  post, but don't really see how to apply a similar proof here.

I need help interpreting this passage from page 35 of the book Diophantine Analysis by Robert D Carmichael.  "Thus the problem of solving Eq. (1) is reduced to that of solving Eq. (4) for $u$ and $v$ and choosing one of those values for which x and y have the desired characteristic.  But the problem of solving Eq. (4) is identical with that of the representation of a given integer by means of a binary quadratic form.  The plan of this book does not permit the detailed development of this latter subject."  Equation 1 is $ax^2+2bxy+cy^2+2dx+2ey+f=0$ and equation 4 is $au^2+2buv+cv^2=m$.  $u,v,$ and $m$ are defined elsewhere if that matters, but what I need to know is what that bold part is referring to; and that last sentence gives me little reason to believe I can find context in the book to make sense of it.  This is the main part of the book I'm interested in, but I do intend to go through most of it.  It wasn't easy to find a book on the subject and I just checked it out from the library today.


I have searched through the Internet for a proof, but didn't find anything. Can someone give me a full proof of this:  let $a,b$ be matrix $nxn$, prove:  $rank(a+b) ≤ rank(a) + rank(b)$

Show $\operatorname{rank}(A) + \operatorname{rank}(B) \ge \operatorname{rank}(A+B)$, where $A,B \in M_{m\times n}(\mathbb{F})$.   I'm trying to think in terms of linear transformations. We can define $T_a, T_b:\mathbb{F}^n\rightarrow \mathbb{F}^m$. I know that $\dim_{\mathbb F}\operatorname{Im} T_a, \dim_{\mathbb F}\operatorname{Im} T_b \le m$.  What should I do next?


The problem is I have some database dumps which are either compressed or in plain text. There is no difference in file extension etc. Using zcat on uncompressed files produces an error instead of the output.  Is there maybe another cat sort of tool that is smart enough to detect what type of input it gets?

When handling log files, some end up as gzipped files thanks to logrotate and others not. So when you try something like this:  $ zcat *   you end up with a command line like zcat xyz.log xyz.log.1 xyz.log.2.gz xyz.log.3.gz and then with:  gzip: xyz.log: not in gzip format   Is there a tool that will take the magic bytes, similar to how file works, and use zcat or cat depending on the outcome so that I can pipe the output to grep for example?  NB: I know I can script it, but I am asking whether there is a tool out there already.


i update blender to 2.79 and the movie formats are gone

Even when I start a brand new file in Blender, I only get four video output file options: AVI raw, AVI JPEG, Frame Server, FFMpeg Video.  I am running version 2.78.5 (I'm using the beta so that I can use denoising.  How can I get access to all the other video outputs other people have? Like this:


I am looking at the following Cambridge Tripos question, which has left me rather stumped for quite a while.  A particle moves on the $2^n$ vertices of the hypercube $\{0,1\}^n$. At each step the particle is equally likely to move to each of the $n$ adjacent vertices, independently of its past motion. The initial vertex occupied by the particle is $(0,0,...,0)$. Calculate the expected number of steps until the particle i) first returns to $0,0,...,0)$; ii) first visits $(0,0,...,1)$; iii) first visits $(0,0,...,1,1)$.  I have seen multiple answers on here regarding the 3D case, as well as a general $D$-dimensional case presented , but I am quite stuck on generalising to other vertices, including the three presented here. Would be lovely to see some guidance here, thanks!

Setup In an $n$-dimensional hypercube $C_n = \{0,1\}^n$, we define the Hamming distance of two vertices $d(A,B)$ to be the number of coordinates in which they differ. (e.g. $d((0,0,1), (1,0,1)) = 2$.) A simple random walk on the vertices of $C_n$ has $1/n$ chance of moving to each of the $n$ adjacent vertices. Problem I am trying to find some expected hitting times $t_d$, where A and B are given (fixed) vertices of $C_n$, $d = d(A, B)$, and $$t_d = \mathbb{E}(\text{time to hit B starting from A}).$$ For example, $t_0$ is the expected return time. My attempts Using the inverse of the invariant distribution, we get $$t_0 = 2^n.$$ To find $t_1$, we try to express $t_0$ in another way, by conditioning on the first step: $$t_0 = \underbrace{\frac1n \times (1+t_1) + \ldots + \frac1n \times (1+t_1)}_{n\text{ terms}} $$ $$ \Rightarrow t_1 = 2^n - 1.$$ Similarly, we can find $t_2$. Note that the only outcomes after two steps are i) returning, and ii) being $d = 2$ away from the start. $$t_0 = \frac1n \times 2 + \frac{n-1}n \times (2+t_2) $$ $$\Rightarrow t_2 = \frac{n2^n-2}{n-1}-2 = \frac{n(2^n - 2)}{n-1}.$$ Why do I need help To find $t_3$, I try to do the same trick. However, I suspect I have made a mistake. $$t_0 = \frac1n \times 2 + \frac{n-1}{n}\frac1n \times (3+t_1) + \frac{n-1}{n}\frac{n-1}{n}\times (3+t_3)$$ This gives $t_3 = 8.5$ when $n = 3$ (a cube), contradicting this , which says that $t_3 = 10$ in this case.


I have been trying to make commands forever but the usual game mode and weather but they never work in any version

Are there any commands in Minecraft Pocket Edition? I'm looking for both singleplayer and multiplayer commands including admin commands.


Related to:   In the related question and in many other questions here, it seems as if the propagation speed of the gravitational interaction is $c$. To my understanding, the only axioms of relativity is that the propagation speed of light (read here EM waves) in vacuum is $c$, and that the laws of physics must be the same in every inertial reference frame.  How can we conclude that the propagation speed of the gravitational interaction is the same as the propagation speed of the EM interaction?

Some threads here touching speed of gravity made me think about that. This lead to some questions.    The speed of gravity was not measured until today (at least there are no undebated papers to that effect). It seems common knowledge/belief among physicists that the speed of gravity is the same as the speed of light.    And this is my question: Is that speed of light = speed of gravity a result of GR or is that fed into the theory? Or is there some evidence from other sources than GR for this? Does the same speed imply some deep-lying relation between gravity and electromagnetism?


I am using apex data table in apex outputpanel. I want to make the header fixed on scrolling. But I am not able to get the result. Here is my code :  <apex:outputPanel styleClass="dataTable" id="tbid">
CA&amp;S Sales Support Proposals

  <apex:datatable value="{!usspt1}" var="Opp" html-cid="accountsTable" id="contacttable" styleclass="display" columnsWidth="1%,1%,4%,3%,3%,4%,2%,2%,2%,2%,2%,2%,2%,2%,2%,3%,3%,28%,19%,3%" >                      <apex:column headerValue="STS Lead" >                <apex:outputfield value="{!Opp.STS_Lead__r.Name}" />              </apex:column>             <apex:column headerValue="High Level Summary" >                    <apex:outputText value="{!left(Opp.High_Level_Summary__c,500)}"   />             </apex:column>                  <apex:column headerValue="Critical Next Step" >                 <apex:outputText value="{!left(Opp.Critical_Next_Step__c,500)}"   />            </apex:column>                    <apex:column headerValue="Key Dates" >                <apex:outputfield value="{!Opp.Key_Dates__c}" />              </apex:column>         Here is my CSS which using for table header.  .dataTable  th{ background: #305492; border-top: solid 1px #E0E3E5; border-right: solid 1px #E0E3E5; color: #fff; font-size: 1.15em; font-weight: normal; padding: 11px 2px 10px 5px; white-space: normal; }

The following example code adds a scrollbar around the table if the number of items results in a table that has a height that is greater than 500px.  <apex:outputPanel layout="block" style="overflow:auto; height:500px;" rendered="{!items.size > 0}">     <apex:pageBlockTable value="{!items}" var="item" columns="3" width="100%">          <apex:column headerValue="Name">             <apex:outputText value="{!item.Name}"/>         </apex:column>           <apex:column headerValue="Count">             <apex:outputText value="{!item.Count__c}"/>         </apex:column>           <apex:column headerValue="Unit Price">             <apex:outputText value="{!item.Unit_Price__c}"/>         </apex:column>       </apex:pageBlockTable> </apex:outputPanel>   The issue is that the table header is inside of the scrolling apex:outputpanel, so as soon as the user scrolls down the header row goes away.  I would like the header row to stay locked/frozen in place.  Is there a setting on the pageBlockTable or some other component that I'm just missing to do this or some other way?  Thanks.


I have a field Value for segmentations as <Value TBD>, which is not getting printed in the HTML table.  This is the way I'm trying to populate the value:    if($("th[data-field='rating']").get(0) !== undefined) {       debugger;     row.append($("<td />").css("font-size", "12px").html(""+segmentations+""));   }   It is taking other normal character values like 'Adoption' but not able to print <Value TBD>. Is there any way to escape this '<' characters inside </tr> tag?

Does anyone know of an easy way to escape HTML from strings in ?  I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks).  I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this.


While I was browsing Google Flights, I noticed something that I haven't seen before. It said that if I booked the itinerary chosen, they'd be on separate tickets. This text was also in red, which I took as meaning it could be undesirable. I'm aware that this is risky for connecting flights, but is there any downside if they're both "one way" flights that are several days apart?

Is there any substantial disadvantage to booking two one-way tickets, versus a round trip ticket?  Booking vacation travel with family of four for winter, from Northeast US to Mexico.  Round trip is pricy and no preferred travel times.  Two one ways is slightly cheaper with much preferred timing.      Different airlines there and back, both reputable national US carriers.


I'm currently in the middle of a project for school in which I have to "translate" a Java program into C++.   The program emulates a media library and uses inheritance. Basically, you have a media library which you can add items to. The different kinds of items you can add are Books, Movies, and MusicAlbums.  I have a class Library, which main creates an instance of, and which has a container to hold all of my items. Item is the superclass, and Book, Movie, and MusicAlbum are its derived classes.  Here's where I'm having problems translating from Java to C++:   My instructor provided "Main.cpp", and I have to write the rest of the program based off of that. I am not allowed to modify it or the assignment is invalid. However, "Main.cpp" calls  cout << item << endl;   every time that it adds an item to the media library. So, that of course sends it to Item.cpp , where I've overridden the << operator.  Now, I have to be able to figure out whether that "item" is a Book, Movie, or MusicAlbum before I write the code for outputting its data, because each one of those things needs to be printed differently.  In my Java program, I wrote something like:  if(item instanceof Book){     System.out.println((Book) item); // I overrode "toString" in Book.Java } elseif(item instanceof Movie){     System.out.println((Movie) item); // overwrode "toString" in Movie.java } else {     System.out.println((MusicAlbum) item; // overrode "toString" in MusicAlbum.java   As you can see, I used instanceof to determine which type of item it was, and then I cast the item to that derived type before passing it to println, after overriding all of the derived class's "toString" methods.  I don't know how to do this in C++. I've looked at tons of similar questions on stackoverflow and other forums, and they all either suggest things that I tried and didn't work, or they tell you how to cast the item to the derived type but not how to just -check- which derived type it is without actually changing it first.   If anyone has any insight into how this would work in C++ I would be very grateful. Thank you.

What is the preferred method to achieve the C++ equivalent of java's instanceof?


I am setting default umask of linux box for the first time.  I log in as root user on a Centos 6 server. I want these default values:  owner:  read/execute/write (7) group:  read/execute (5) other:  read (4)   To get umask value, I deduct targets from 777: 777-754 = 023  # umask 023   then do a double check  # umask -S   u=rwx,g=rx,o=r   then create and display file permissions  # echo x > testfile.txt # ll | grep testfile.txt   -rw-r--r--.  1 root   root           4 Jun 26 01:15 testfile.txt   which is not quite what I was expecting.

How can one set the executable bit on files using umask? According to documentation, a umask of 000 should work, but in practice this only works on directories.  Also open to other methods of automatically setting +rwx on a particular user's created files if you have any.


I have a div with 4 checkbox. Then I run the following javascript:  var elements = document.getElementById('myDiv').getElementsByTagName('input'); alert(elements.length); // output: 4 for (element in elements) {     alert(element); } alert('finish!');   After the 4, I get the following alerts, in that order:  0 1 2 3 item namedItem length finish!   The numbers from 0 to 3 are the indexes of elements. But what does 'item', 'namedItem' and 'length' mean here?

I've been told not to use for...in with arrays in JavaScript. Why not?


I have to find $a,b,c \in \mathbb{N}$ such that-$a!\times b!\times c!=d!$   Answer given in my book is $3!\times5!\times7!=10!$(But it is written that other answers are also possible).  What is a systematic way to find the answer without using a calculator or computer?(I mean without brute force calculation)  Thanks for any help!!

I was playing around with hypergeometric probabilities when I wound myself calculating the binomial coefficient $\binom{10}{3}$. I used the definition, and calculating in my head, I simplified to this expression before actually calculating anything $$ \frac {8\cdot9\cdot10}{2\cdot3} = 120 $$ And then it hit me that $8\cdot9\cdot10 = 6!$ and I started thinking about something I feel like calling generalized factorials, which is just the product of a number of successive naturals, like this $$ a!b = \prod_{n=b}^an = \frac{a!}{(b-1)!},\quad a, b \in \mathbb{Z}^+, \quad a\ge b $$ so that $a! = a!1$ (the notation was invented just now, and inspired by the $nCr$-notation for binomial coefficients). Now, apart from the trivial examples $(n!)!(n!) = n!$ and $a!1 = a!2 = a!$, when is the generalized factorial a factorial number? When is it the product of two (non-trivial) factorial numbers? As seen above, $10!8$ is both.


When I'm trying to run some mono app I'm getting an error saying "The entry point method could not be loaded":   $ mono Some-App.exe  The entry point method could not be loaded  $   How can I determine what caused the error? I.e. to get some more meaningful message like:   The file XXX.dll is missing, This app uses feature YYY which is unavailable under Linux, There were an error ZZZ.

I am trying to open a simple executable using Mono, as Wine told me to install Mono for .net applications, and this is the error I get      mono yt.exe  ** Message: Unknown heap type: #GUlD    ** Message: Unknown heap type: #Blop      ** (yt.exe:2508): WARNING **: The following assembly referenced from /home/austin/Downloads/yt.exe could not be loaded:       Assembly:   System.Windows.Forms    (assemblyref_index=0)       Version:    4.0.0.0       Public Key: b77a5c561934e089  The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/austin/Downloads/).      ** (yt.exe:2508): WARNING **: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.    ** (yt.exe:2508): WARNING **: Missing method EnableVisualStyles in assembly /home/austin/Downloads/yt.exe, type System.Windows.Forms.Application    Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.  File name: 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'   Thanks for any help, i've looked everywhere and can't figure out what's wrong.


It is from discrete mathematics notes.  These are part of the biconditional tautologies.   E29. (∀x)A(x) →B ⇔ (∃x)(A(x)→B)   E30. (∃x)A(x) →B ⇔ (∀x)(A(x)→B)   I don't understand how these formulas are said to be equivalent.  What is the difference in interpretation between (∀x)A(x) →B and (∀x)(A(x)→B) ?  How should I interpret those formulas? and how can I prove it? Thank you!

Assume $x$ doesn't occur free in $\alpha$, show that: $$\vdash (\forall x \beta \to \alpha) \leftrightarrow \exists x (\beta \to \alpha)$$   This is an exercise on page 130, A Mathematical Introduction to Logic, Herbert B. Enderton（2ed).   Here's my attempt: For the '$\to$' direction, since $x$ doesn't occur free in $\alpha$, we have $α→∀x α$ and $\forall x \alpha \to \alpha$ as logical axiom(In the second formula, we have$\alpha_x^x = \alpha$). Thus it suffice to show $\vdash (\forall x \beta \to \forall x \alpha) \rightarrow \exists x (\beta \to \alpha)$. By logical axiom $∀ x(α→β)→( ∀ x α→∀x β)$, it would suffice to show $\vdash \forall x (\beta \to   \alpha) \rightarrow (\exists x (\beta \to \alpha))$. It has been shown in a previous exercise that there's a deduction $∀ x ϕ→∃x ϕ$, so we are done for the "$\to$" part.  The problem for me is how to show the "$\leftarrow$" direction.  Added: Here's logical axioms that we can employ:         Tautologies(in the sense of propositional logic);   $∀ x α →α^x_ t $, where $t$ is substitutable for $x$ in $α$ ($α^x_ t$ is the formula derived from $\alpha$ by replacing $x$ by a term $t$);   $∀ x(α→β)→( ∀ x α→∀x β)$;   $α→∀x α$, where $x$ does not occur free in $α$.      Besides, generalization theorem and deduction principle can be utilized:     If $\Gamma \vdash ϕ$ and $x$ do not occur free in any   formula in$\Gamma$, then$\Gamma \vdash ∀ x ϕ$.      If $\Gamma ; γ \vdash ϕ,$ then $\Gamma \vdash  γ \to ϕ$.


Which kind of verb should it be used after the phrase "each item" in the following sentence?     The law requires that each item clearly display the warranty information.   Should it be "displays" or "display" is correct?  Edit. Just to clear this up a little bit, let me explain that I got the sentence from a TOEIC book and that it called my attention on whether is correct or not.  Also   This question is diferent from others because I'm asking specifically about this sentence and phrase. Furthermore, I asked my teacher about it and she told me that it might be correct because they can be refering the word "item" as a whole, so if that is the case plural verb should be correct but using the word item as a singular thing it should be singular verb, but only they know what they tried to convey by saying "each item."

A source says that the word "each" should always be followed by a singular noun, but however I look at it in this sentence it just doesn't seem to fit:     foo [comprises] multiple binary programs that each performs a single task.   Should it be "performs" or "perform"?


On the official Node.js site they have a tar.xz file. I've extracted the file to my Downloads folder, but I am not sure what to do next. In one YouTube video I saw something like this:  sudo cp -r node/{bin,include,lib,share}/ /usr/   However, I think it's a bit outdated, in my opinion the node folder should go somewhere else than the /usr/ folder, perhaps to /usr/shared?!   Thanks in advance!

I noticed over at the  website that node is currently at v 0.12.0.  Can someone let me know how to install the latest version of node together with npm (terminal commands please)?


$f: \mathbb{R}^{+}  \rightarrow \mathbb{R}^{+}$  $f(x^2)=xf(x)$  $f(x+1)=f(x)+1$  Can this functional equation be solved ?

Suppose a function $f : \mathbb{R} \to \mathbb{R} $ satisfies the relation $$f(x^2) = xf(x) \ \ \forall x$$  Does this imply $f$ must be a straight line, $f(x) = mx$? If so, why?  If not, are there other such functions?


I have an array of data.for example {25,26,11}.I want to rescale them to an array in which the summation of the 3 data is a definite value (for example 10).how can i do that?!

At work we were discussing this as my boss has never heard of normalization. In Linear Algebra, Normalization seems to refer to the dividing of a vector by its length. And in statistics, Standardization seems to refer to the subtraction of a mean then dividing by its SD. But they seem interchangeable with other possibilities as well.   When creating some kind of universal score, that makes up $2$ different metrics, which have different means and different SD's, would you Normalize, Standardize, or something else? One person told me it's just a matter of taking each metric and dividing them by their SD, individually. Then summing the two. And that will result in a universal score that can be used to judge both metrics.  For instance, say you had the number of people who take the subway to work (in NYC) and the number of people who drove to work (in NYC).   $$\text{Train} \longrightarrow x$$ $$\text{Car} \longrightarrow y$$  If you wanted to create a universal score to quickly report traffic fluctuations, you can't just add $\text{mean}(x)$ and $\text{mean}(y)$ because there will be a LOT more people who ride the train. There's 8 million people living in NYC, plus tourists. That's millions of people taking the train everyday verse hundreds of thousands of people in cars. So they need to be transformed to a similar scale in order to be compared.  If $\text{mean}(x) = 8,000,000$  and $\text{mean}(y) = 800,000$  Would you normalize $x$ & $y$ then sum? Would you standardize $x$ & $y$ then sum? Or would you divide each by their respective SD then sum?  In order to get to a number that when fluctuates, represents total traffic fluctuations.  Any article or chapters of books for reference would be much appreciated. THANKS!  Also here's another example of what I'm trying to do.   Imagine you're a college dean, and you're discussing admission requirements. You may want students with at least a certain GPA and a certain test score. It'd be nice if they were both on the same scale because then you could just add the two together and say, "anyone with at least a 7.0 can get admitted." That way, if a prospective student has a 4.0 GPA, they could get as low as a 3.0 test score and still get admitted.  Inversely, if someone had a 3.0 GPA, they could still get admitted with a 4.0 test score.  But it's not like that. The ACT is on a 36 point scale and most GPA's are on 4.0 (some are 4.3, yes annoying). Since I can't just add an ACT and GPA to get some kind of universal score, how can I transform them so they can be added, thus creating a universal admission score.  And then as a Dean, I could just automatically accept anyone with a score above a certain threshold.  Or even automatically accept everyone whose score is within the top 95%.... those sorts of things.  Would that be normalization? standardization? or just dividing each by their SD then summing?


I am aware that Func<>s cannot be implicitly typed directly via the var keyword, although I was rather hoping that I could do the following assignment of a predicate:  Func<Something, bool> filter = (someBooleanExpressionHere)    ? x => x.SomeProp < 5    : x => x.SomeProp >= 5;   However, I get the error cannot resolve the symbol, 'SomeProp'  At the moment, I have resorted to the more cumbersome if branch assignment, which doesn't seem as elegant.  Func<Something, bool> filter; if (someBooleanExpressionHere) {     filter = x => x.SomeProp < 5; } else {     filter = x => x.SomeProp >= 5; }   Have I missed something, or will I need to stick with the if-branch assignment?

Generally, when using the conditional operator, here's the syntax:  int x = 6; int y = x == 6 ? 5 : 9;   Nothing fancy, pretty straight forward.  Now, let's try to use this when assigning a Lambda to a Func type. Let me explain:  Func<Order, bool> predicate = id == null     ? p => p.EmployeeID == null     : p => p.EmployeeID == id;   That's the same syntax, and should work? Right? For some reason that doesn't. The compiler gives this nice cryptic message:     Error  1   Type of conditional expression cannot be determined because there is no implicit conversion between 'lambda expression' and 'lambda expression'   I then went ahead and changed the syntax and this way it did work:  Func<Order, bool> predicate = id == null     ? predicate = p => p.EmployeeID == null     : predicate = p => p.EmployeeID == id;   I'm just curious as to why it doesn't work the first way?  (Side note: I ended up not needing this code, as I found out that when comparing an int value against null, you just use object.Equals)


Can you help me install ubuntu alongside my windows 8.1 OS on my Toshiba Satellite P875-S7102? I can not figure out how to get my particular model of laptop to boot from a USB and install Ubuntu, or even allow me to try it out without installing. Please Help?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have a problem to check if a Linestring contains a Point. I consider the straight line y = 0.1 x , and take by it a segment l='Linestring( 0 0 ,  4 0.4 )' and a Point p on segment l, p = 'Point(1.5 0.15)'. If I check ST_Contains(l,p) the result is false and the distance  ST_Distance(l,p) is near to zero, but this is wrong because the Point is on the Linestring. If I try with p= 'Point(2 0.2)' the result is right.  What is the problem?  WITH       l AS (            SELECT ST_GeomFromText('Linestring( 0 0 ,  4 0.4 )') AS geom          -- segment of the straight line y = 0.1 x        ),      p AS (        SELECT ST_GeomFromText('Point(1.5 0.15)') AS geom                     -- point on the straight line y = 0.1 x        )   SELECT ST_AsText(ST_Intersection(p.geom,l.geom)) as ST_Intersection,         ST_Distance(p.geom,l.geom),         ST_Contains(l.geom,p.geom),         ST_Intersects(p.geom,l.geom),         ST_AsText(ST_Line_Interpolate_Point(l.geom,1.5/4)) as ST_Substring       -- point in position 1.5/4 of l   FROM l,p     EDIT: My origin problem was: LineString L1 contains Linestring L2 but if I do ST_SymDifference(l1.geom,l2.geom) the result is incorrect.  WITH       l1 AS (            SELECT ST_GeomFromText('Linestring( 0 0 ,  4 0.4 )') AS geom          -- segment of the straight line y = 0.1 x        ),      l2 AS (        SELECT ST_GeomFromText('LineString(0 0 , 1.5 0.15)') AS geom             -- segment of the straight line y = 0.1 x        )   SELECT ST_AsText(ST_SymDifference(l1.geom,l2.geom)) as ST_Intersection       FROM l1,l2


I just raised a custom mod flag on a chat message and was wondering if there was a way to see that status of this flag, or if it was marked as helpful or declined.

I checked my  to see whether I can find something similar to the main-site flag-history for chat-flags, but didn't find anything. I recently had the (dis)pleasure of regularly having to deal with a user, that has been deleted multiple times. Whenever they show up (with the same nick-name) again I have to flag them again. I'd like to get an overview of how often I had to do that, and whether my flags were helpful for the moderators. As such I propose the implementation of a flag-history as it is already in place for the main-site for chat-flags, that request moderator intervention. To be completely clear I am not talking about the 10k user flags, which are acted on in a matter of sometimes seconds with instantly visible results, but about moderator attention flags from this menu:


After  made his discoveries of nuclear energy, he said a quote from Bhagavad-Gita, it goes as follows      I am become death, the destroyer of worlds.   Is this proper English?

Is physicist Robert Oppenheimer's phrase “Now I am become Death, the destroyer of worlds.” grammatical in English? Why not "becoming" or "now I become"?


At the very start of Game of Thrones Ned executes a member of the Nights Watch for desertion.   Are there any ways the Nights Watch are identified other then the clothes they wear. If a member of the Nights Watch deserted, changed clothes and then went to anywhere the people had no knowledge of who they where would there be any way of identifying them as a deserter of the Nights Watch?   Also as members of the Nights Watch do travel south of the wall (recruiting, raising funds and generally reminding the people they exist) then could a deserter simply not claim to be carrying out Watch Business until they had an opportunity to become less Watchman looking?

Night's Watch deserters are sentenced to death, as we've seen in the very first episode of Game of Thrones. A man dressed all in black is apprehended by Stark men and brought before Lord Eddard Stark. Lord Stark sees him as a deserter and sentences him to die (and then executes that death penalty).  However, there are men of the Night's Watch south of the Wall, on a legitimate mission or on some kind of allowed leave. For instance, we have Benjen Stark visiting Winterfell when the king and his party is there. There is also Yoren, who travels around Westeros in search of new recruits.  I could imagine that the Warden of the North (and other lords in the northern part of Westeros) would have a good idea of who would be allowed further south and whose appearance would raise suspicion. But I reckon the southern lords don't have as many visits from the Night's Watch, so they might not know who would be allowed to be there and who wouldn't.  How would lords who are rather unfamiliar with the specific brothers of the Night's Watch discern deserters from brothers sent out for some reason?  That ends my question, but there is a spoiler from the season 5 finale that continues the question a bit more:      Sam is sent to Oldtown to become a Maester, so he can replace Maester Aemon at Castle Black.  But he is riding together with Gilly (a woman!) and her baby (a baby!), which might raise a lot of suspicion from people who don't know what he is sent out to do.  What prevents southern lords of sentencing Sam as a deserter from the Night's Watch?


I want to access path with following code however, it throws and error  IOException: The user name or password is incorrect System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions  options)   I use the following code  var filePath = "\\\\172.x.x.x\\UploadFolder"; using (var stream = new FileStream(filePath, FileMode.Create) {     await files.First().CopyToAsync(stream); }   How can I setup user name and password in this case?  EDIT:  as from the comment below I have searched and try again with this method:  bool returnValue = LogonUser("TestDomain\\testAccount", "172.x.x.x", "testPassword",             LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT,             out safeTokenHandle); // I've tried both TestDomain\\testAccount and TestDomain/testAccount   it's always return false. when I test it with my computer it's return true though.  bool returnValue = LogonUser("admin", "127.0.0.1", "password",             LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT,             out safeTokenHandle);   Is the problem happens because of domain server or something?

When connecting to a network share for which the current user (in my case, a network enabled service user) has no rights, name and password have to be provided.  I know how to do this with Win32 functions (the WNet* family from mpr.dll), but would like to do it with .Net (2.0) functionality.  What options are available?  Maybe some more information helps:   The use case is a windows service, not an Asp.Net application. The service is running under an account which has no rights on the share. The user account needed for the share is not known on the client side. Client and server are not members of the same domain.


Let $f:E\subset\mathbb{R^n}\rightarrow\mathbb{R^n}$ be a $C^1$ function, where $E$ is open. Show that $f$ is locally Lipschitz-continuous, that is, for all compact $K\subset E$ we have $f$ restrict to $K$ Lipschitz-continuous.  I try to take a open ball in $E$ to force convexity, and use a auxiliary function $g: [0,1] \rightarrow \mathbb{R^n}$ such that $g(t) = f((1-t)x+ty)$, but this don't work.

This question is related to the  one.      Let $\Omega$ be an open connected subset of ${\bf R}^n$ and $f:\Omega\to{\bf R}^n$ be continuously differentiable such that   $$ \sup_{x\in\Omega}||Df(x)||<+\infty.  $$   Show that for every compact $K\subset \Omega$, there exists $L_K$ such that for every $x,y\in K$,   $$ |f(x)-f(y)|\leq L_K|x-y|.  $$     Here are some thoughts about it. If $\Omega$ is convex, then one can apply the theorem quoted in the previous question. Suppose it is not. By the compactness of $K$, one can cover it with finitely many open balls contained in $\Omega$. Since open balls are convex, one can have a Lipschitz constant $L_i$ for each ball. For any $x,y\in K$, if they are in the same open ball, then one can bound $|f(x)-f(y)|$ using the maximum of $\{L_i\}$. But when they are not in the same ball, I don't see how to go on.


Data is being encrypted in a database.  A message digest is being created for deduplication purposes.  Is it ok to use the message digest that will be the key of the table that houses the encrypted data as the initialization vector?  Since the data is not being transmitted, just archived and retrieved locally, is this a no-no?  Since the message digest should theoretically be unique for every record, I'd expect the concern of using the same IV would not be a problem.

I'm encrypting some files using AES in CBC mode.    I'm also using file's digest (SHA-1) to check that data is decrypted correctly (so I need to store it with file).  Is it safe to use this digest as AES's IV and store it in the header of file? Or it has security issue?


We see Newt Scamander use his wand several times in the film. Graves briefly mentions that Newt was expelled from Hogwarts. However, when Hogwarts students get expelled, their wands are destroyed by the Ministry of Magic.

Related to this question:  and   TL;DR - 1a) Do we know of any other students that were actually expelled?  TL;DR - 1b) What constitutes a complete education? Do all children have to pass OWLS and NEWTS?  The only example I can remember is: Hagrid. He was fully expelled, wand broken and everything.  It is also my recollection that the wand is broken because without a completed education the wizard will end up being a danger to the public by not performing spells properly.  However we see the following:   Fred and George left the school voluntarily so there was no official to confiscate and break their wands. They end up opening their joke shop.   Same goes with Harry and Ron so they can pursue the Horcruxes. They end up working as Aurors directly after the war. Hermione leaves but goes back and completes her education.    This leaves the following questions:   Since Fred and George did not finish, why did the Ministry not show up at the shop to confiscate and break their wands?  Same with Harry and Ron. Why when they went to work for the Ministry was nothing said or done?   Harry and Ron are the HEROS so I am guessing that no one would want to enforce the law in their cases. Kingsley actually recruited them to head up the new Auror department.   Fred and George, however, leave before the end of the war in a time where the Ministry is corrupt. So it would stand to reason that they would be targets.  We also know that many children are home-schooled throughout the world. So there must be some standard that the Ministry would deem acceptable to not go break the wands of all the wizards that are home-schooled.   It almost seems to that this is just a setup for Hagrid's character and role, plus a background threat to Harry whenever it convenient for the plot...     Edit to account for Fantastic Beasts and Where to Find Them:  We know that Newt Scamander was expelled from Hogwarts, but he definitely still has his wand!


What is the best structure on tag URL for google SEO? For example: example.com/tags/episode/black example.com/tags/episode/green  example.com/tags/course/black example.com/tags/course/green  or example.com/episode/tags/black example.com/episode/tags/green  example.com/course/tags/black example.com/course/tags/green

Please explain which is the best URL structure and why:  website.com/apartments-to-let/manhattan   or  website.com/apartments-to-let-manhattan   This is a property site. Is it best for the bots to break the properties/URL's down in categories?


How Cooper did send such a huge amount of quantum data through the watch as morse code in Interstellar? When Cooper started sending data Murph (Mackenzie Foy) was a child and when she receives the message she was older (as Jessica Chastain) than Cooper. How did she receive so much data after so much time through the watch?

In Interstellar, after young Murph places the watch on the bookshelf in her bedroom, her father - in the same bedroom but from another dimension - moved the second hand and recorded data in a Morse-signal message on it. Many years later, the second hand still signals the message, grown-up Murph finds the watch and takes it with her to NASA and there she translates the message back into the data needed.  If we assume the watch had a long lasting battery, then I still see some problems with this plot:   From what we know from the explanation in the movie itself is that the only thing capable to travel from them in the 4th or 5th dimension to present Earth is gravity. Gravity is a vertical force on Earth. It pulled dust from the air to the floor in a barcode-like pattern. So how can it adjust the horizontal position of the second hand of the watch? Like a magnet? And how is a multiple of those movements of the second hand recorded on the watch? How does it play the message for all these years, again and again. Not only in Murph's bedroom, but still at NASA too?   Normally I would answer this myself by saying that it is film, it is science fiction, everything is possible, and there is no need to question things we cannot explain. But this movie certainly has the intention of being truthful to science, to explain what is going on and this particular director has a reputation of telling stories that in one way or another always has plausible explanations for plot-hole-like aspects.


$$\lim_{n\rightarrow\infty}\left( \frac{1*3*5*...*(2n-1) }{ 2*4*6*...*(2n)}\right)^3=0$$ Having products at fractions I cant figure out how to calculate this limit.

How can I show   $\lim_{n \to \infty} a_n = 0$  $a_n = {1.3.5 ... (2n-1)\over 2.4.6...(2n)}$  I have shown that $a_n$ is monotonically decreasing. I thought to shown sequence is bounded from below then it automatically would converge and hence my question will be solve. But I'm unable to show its boundedness... Or there maybe another method to prove this. Thanks


I am trying to create a view that provides all quarter starts from a date dimension. Here it is:  CREATE OR REPLACE VIEW quarter_starts AS SELECT min(day_number_in_epoch) AS day_num FROM date_dimension dd GROUP BY dd.calendar_year_quarter;   And postgres gives the error:  ERROR:  cannot change name of view column "min" to "day_num"

In PostreSQL 8.3, I'm trying to create a view which will look just like an existing table but have different column names.  This works  CREATE OR REPLACE VIEW gfam.nice_builds AS   SELECT (family_tree.family_tree_id) as x,         family_tree.family_tree_name, family_tree.family_tree_description    FROM gfam.family_tree;   The above makes a duplicate of the family_tree table but the following attempt fails:  CREATE OR REPLACE VIEW gfam.nice_builds AS   SELECT (family_tree.family_tree_id) as x,         family_tree.family_tree_name, family_tree.family_tree_description    FROM gfam.family_tree;    ERROR:  cannot change name of view column "family_tree_id"   How can I rename columns?


I need help with blender. I got a minecraft intro template, and there is a skin on it I want to change. The only way to change it like how everyone does is go to the replace image on the picture file. But it isn't an option. For example, when I click on that image icon where you can select Save as image, Copy image, New image, and all that stuff, it's not an option. I mean it's still there but grayed out. Can anyone help me please?

I was trying to replace an image in my UV image editor, but the image defaults to a different image. how do I fix this?


On my Mac I can copy files using the Finder, and if the destination folder has a different owner, a window pops up and asks for credentials.   On Ubuntu or Linux Mint I don't see anything like that. Then I need to start Nautilus or Nemo from the commandline using sudo rights. I would like to get a popup whenever it is needed.   So I use Nemo (or Nautilus) just like normal and do whatever I need to do. I close it and open it another time, and at one point or another I need to copy a folder to /opt. Then it refuses because /opt is owned by root. A window pops up and asks for my sudo password or for a user that has sudo rights if the specific user has no sudo rights. The folder is copied to /opt and that's it.   Is is possible to let it work like this, with an extension or something? Do other filemanagers have this option?

Say I have a folder open in Nautilus that's in my /home/user/temp directory. I'd like to move a folder from there to my /opt directory (it's a program). Is there a way I can elevate the copy command up to a sudo so that I can copy the folder without having to start a new instance of Nautilus from the command line?


Im trying to get a list of names that do not exist in another list      SELECT [Paid To]     FROM tbl1     WHERE [Paid To] not  in     (select [Name ]      FROM tbl2     )   I dont get any results but when I run a left join query   select top 10 * from [tbl1] a left join [tbl2] b on a.[Paid To] = b.[Name ]   I get the NULLs where the 2 tables dont match. Can anyone help as to why the first query is not working?  using SQL Server 2012

This issue came up when I got different records counts for what I thought were identical queries one using a not in where constraint and the other a left join. The table in the not in constraint had one null value (bad data) which caused that query to return a count of 0 records. I sort of understand why but I could use some help fully grasping the concept.  To state it simply, why does query A return a result but B doesn't?  A: select 'true' where 3 in (1, 2, 3, null) B: select 'true' where 3 not in (1, 2, null)   This was on SQL Server 2005. I also found that calling set ansi_nulls off causes B to return a result.


my problem is that i have 3 platforms that react to a specific object. If the object hits the platform i want to change the property value to 1, so that my game knows theres the object on the platform. Sadly it seems like the property value doesnt count up.  my blender version is 2.79a  Greetings Jonathan

I'm pretty new to the bge, which I'm using for a school project and right now I'm having a problem with my movements.py script. I know this question is quite 'noobish' but I just can't find the problem. The 'player' object is just a cube with character physics and actor enabled but won't move when I start the game simulation and press the different keys.   import bge   def main():      cont = bge.logic.getCurrentController()     player = cont.owner      keyboard = bge.logic.keyboard      if keyboard.events[bge.events.WKEY] == bge.logic.KX_INPUT_ACTIVE:         player.applyMovement((0, .2, 0), True)          if keyboard.events[bge.events.SKEY] == bge.logic.KX_INPUT_ACTIVE:         player.applyMovement((0,-.2, 0), True)        if keyboard.events[bge.events.AKEY] == bge.logic.KX_INPUT_ACTIVE:         player.applyMovement((-.2, 0, 0), True)      if keyboard.events[bge.events.DKEY] == bge.logic.KX_INPUT_ACTIVE:         player.applyMovement((.2, 0, 0), True)  main()


Is it normal practice to omit the comma before the quoted sentence?  When John told her, "you missed a trick," what did he mean?   When John said, "you missed a trick," what did he mean?

When quoting something said by someone else, should I use a comma before the quote? Suppose I quote the definition given in a dictionary. Am I correctly using the the punctuation marks in the following sentences? (I am using them in the way I think correct in American English.)     One of the meanings of cat is, "a small animal with soft fur that people often keep as a pet."        A cadet is, "a young person who is training to become an officer in the police or armed forces."   Should I use a comma only when I explicitly quote somebody?     Groucho Marx once said, "Although it is generally known, I think it's about time to announce that I was born at a very early age."   Should I use a comma in this case too?     As Groucho Marx said,            No one is completely unhappy at the failure of his best friend.      On Comma Sense, A fun-damental guide to punctuation (Richard Lederer and John Shore), I read the following about using the comma:     Use commas to set off complete quotations:           The great general George S. Patton once said, "No, no—the war is this way, you idiots!"


$ \int e^{x^3}\;dx$   so, i'm searching for answer this question, i think that this not is too easily, but i think this integral not exist solution undefined, this integral would be easy if  had the derivative out but i'snt happen

How to evaluate the integral $$\int e^{x^3}dx \quad ?$$  I've tried to set $t=x^3$, but it seems to be a blind alley; I don't know what to do with $\int\frac{e^t}{3\sqrt[3]{t^2}}dt$.


Can somebody shed some light on if it's normal that Page Life Expectancy drops occasionally to 0 in SQL Server (2014) resulting in slow queries and timeouts?  I'm facing this on my developer machine when developing a web application and I don't know whether it is because of the development environment or something else. PLE may be over 10000 for one day or a couple of hours (during which queries work fast) until it drops to 0 and all my queries go from 15ms to 40 seconds or more.  I mean is there any way to control the performance of SQL Server in this matter or is this by design of the SQL Server that it may get slow, for example, due to memory pressure until it comes faster again etc.?   To me it looks like queries are read in a cache and at some point they're flushed out and queries start giving timeouts because everything is read from a disk. Is this something that can be avoided?

I have installed monitoring software on a few SQL Server instances in the environment. I am trying to find bottlenecks and fix some performance issues. I want to find out if some servers need more memory.  I am interested in one counter: page life expectancy. It looks different on every machine. Why does it change often on some instances and what does it mean?  Please take a look at the data from the last week gathered on a few different machines. What can you say about each instance?   Heavily used production instance (1):   Moderately used production istance (2)   Rarely used test instance (3)    Heavily used production instance (4)   Moderately used test instance (5)   Heavily used data warehouse (6)   EDIT: Im adding the output of      SELECT @@VERSION for all of these servers:  Instance 1: Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)  Jun 17 2011 00:54:03 Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)   Instance 2: Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64)  Oct 19 2012 13:38:57  Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)   Instance 3: Microsoft SQL Server 2012 - 11.0.5058.0 (X64)  May 14 2014 18:34:29      Copyright (c) Microsoft Corporation  Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)  Instance 4: Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) Jun 28 2012 08:36:30  Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)   Instance 5: Microsoft SQL Server 2012 - 11.0.5058.0 (X64)  May 14 2014 18:34:29  Copyright (c) Microsoft Corporation  Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)  Instance 6: Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)  Apr 2 2010 15:48:46  Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)   I also ran the following query on the machines:  SELECT DISTINCT memory_node_id FROM sys.dm_os_memory_clerks   and it returned 2 or 3 rows for each server:  Instance 1: 0; 64; 1 Instance 2: 0; 64 Instance 3: 0; 64 Instance 4: 0; 64 Instance 5: 0; 64 Instance 6: 0; 64; 1   What does it mean? Do these servers run NUMA?


I was wondering what methods exist for computing the inverse of Y mod X? Of these, which is the most efficient (time-wise)? I am aware of the Extended Euclidean Algorithm already, just curious what else is out there. Additionally, do we have a discrete derivative for the inverse of Y mod X? Thanks!

When I am faced with a simple linear congruence such as  $$9x \equiv 7 \pmod{13}$$ and I am working without any calculating aid handy, I tend to do something like the following:  "Notice" that adding $13$ on the right and subtracting $13x$ on the left gives: $$-4x \equiv 20 \pmod{13}$$  so that $$x \equiv -5 \equiv 8 \pmod{13}.$$  Clearly this process works and is easy to justify (apart from not having an algorithm for "noticing"), but my question is this: I have a vague recollection of reading somewhere this sort of process was the preferred method of C. F. Gauss, but I cannot find any evidence for this now, so does anyone know anything about this, or could provide a reference? (Or have I just imagined it all?)  I would also be interested to hear if anyone else does anything similar.