How can I make MySQL sort data using a custom sorting method?

I have  SELECT revision  FROM   table  WHERE  id = 4  ORDER  BY revision DESC  LIMIT  1;    Ignoring the limit clause for a moment, here are the results:  Returns   |   I want --------------------    Z      |    AD   //with LIMIT clause this is what's returned                      //& what I seek is the first row                     //provided it's sorted properly    Y      |    AC           X      |    AB     W      |    AA     ....   |    Z        B      |    Y        A      |    X        AD     |    ....         AC     |    C        AB     |    B        AA     |    A   Can this be done with MySQL?    My goal is to have the data sorted as above.  Data enters PHP, where I can re-sort it, but I was curious if I could do this directly from MySQL.


So I'm trying to achieve an animation in BI where there is a string that is attached at both ends to 2 separate objects. But I can't find anything that lets me take my string and attach it to them. The string is an elongated cylinder that has had a lot of loop cuts in the middle. Help please?


A $T_4$ space satisfying that 'every continuous map from it to a Hausdorff space is a closed map' is compact.

Suppose a $T_4$ space $X$ satisfies a property that every continuous map $f$ from $X$ to any Hausdorff space $Y$ is a closed map. Show that $X$ is compact. What I am thinking is to let $\mathcal{U}$ be an open cover of $X$ and find a way to choose finite open sets from $\mathcal{U}$ that can cover $X$ again. Do we need to define a suitable continuous map by ourselves and use the fact that it is a closed map to choose suitable open sets from $\mathcal{U}$? I have tried to define a continuous map $f \colon X \to Y$ as mapping different open sets from $\mathcal{U}$ to different points in $Y$. However, different open sets from $\mathcal{U}$ may intersect with each other and hence $f$ may not be well-defined. Apart form that, I have no idea about how to choose suitable $f$ and $Y$. Can someone help me please? Edit 1: I am trying to apply the Urysohn Lemma or the Tietz Extension Theorem due to the normality of $X$. But still have no idea. Edit 2: Finally found a way to prove without using compactification. I will post the proof when I’m free. Hint: Use Urysohn Lemma and Tychonoff Theorem.


undefined reference to referenced methods

When trying to compile the code below, I get the following error:  $ g++ -std=c++11 main.cpp src/matrix.cpp /tmp/ccsVOKfQ.o: In function `main': main.cpp:(.text+0x1b): undefined reference to `matrix<int>::matrix(unsigned int, int)' main.cpp:(.text+0x2c): undefined reference to `matrix<int>::operator[](int)' collect2: error: ld returned 1 exit status   As far as I know all the code is included correctly, it even worked fine in Visual Studio, but for some reason refuses to compile in GCC on Linux, giving the above error.  My Code:  src/matrix.hpp:  #ifndef __matrix_hpp #define __matrix_hpp #include <vector> #include "../lib/typedefs.hpp"  // abstraction layer on top of 2D vector template <typename t> class matrix { private:   std::vector<std::vector<t>> _mat;   uint _size; public:   matrix(uint, t);   std::vector<t> get_row(int);   std::vector<t> get_column(int);   std::vector<t>& operator[](int);   matrix transpose(); };  #endif   src/matrix.cpp:  #include "matrix.hpp"  template <typename t> matrix<t>::matrix(uint size, t default_val) {   _size = size;   _mat = std::vector<std::vector<t>>(_size, std::vector<t>(_size, default_val)); }  template <typename t> std::vector<t> matrix<t>::get_row(int row_number) {   return _mat[row_number]; }  template <typename t> std::vector<t> matrix<t>::get_column(int col_number) {   std::vector<t> column;    for (int r = 0; r < _size; r++)     column.push_back(_mat[r][col_number]);    return column; }  // provided as alternative notation to get_row template <typename t> std::vector<t>& matrix<t>::operator[](int i) {   return get_row(i); }   main.cpp:  #include <iostream> #include <cstdio> #include "src/matrix.hpp"  int main() {   matrix<int> m(9, 0); // test constructor   m[1][2] = 100; // test operator overload   return 0; }   How can I resolve this issue and make the code compile?


Converting an array of objects to an array of their primitive types

If you have an array of Java objects which have a primitive type (for example Byte, Integer, Char, etc).  Is there a neat way I can convert it into an array of the primitive type?  In particular can this be done without having to create a new array and loop through the contents.  So for example, given  Integer[] array   what is the neatest way to convert this into  int[] intArray   Unfortunately, this is something we have to do quite frequently when interfacing between Hibernate and some third party libraries over which we have no control.  It seems this would be a quite common operation so I would be surprised if there's no shortcut.  Thanks for your help!


NullPointer Exception while implementing a queue using a linkedlist

this is for an assignment. I need to implement a queue using linked lists. I keep getting a null pointer exception while using my enqueue method for my listQueue Class. I'm not too sure what is going on. Below are my main class and listQueue Class.  public class Driver{      public static void main(String[] args) {          MyQueue<Integer> q = null;          boolean useList = true;  // make it false if you want to array implementation          if (useList)             q = new ListQueue<Integer>();   // default setting: use a list to implement the queue. You can change it.         else             q = new ArrayQueue<Integer>();          for(int i = 0; i < 1000; i++)  // add a large number of items onto the queue         {             q.enqueue(i);           }          System.out.println("Now, dequeue items!");         while(!q.isEmpty())           {             System.out.print(q.dequeue() + " ");           }         System.out.println("\nEnd of dequeueing");              // you should fully test/debug all methods!      }  }     public class ListQueue<T> implements MyQueue<T> {      private class Node {          T item; // public         Node next;  // null      }      private Node head = null;     private Node tail = null;     private int size = 0; //size of the list      public ListQueue(){}      /**      * is empty?      */     public boolean isEmpty() {         // your implementation here:         if (size == 0) {             return true;         }//end if         return false;     }//end isEmpty      /**      * @return the number of items in the queue      */     public int size() {         // your implementation here:         return size;     }//end size      /**      * enqueue: add an element at the tail of queue      */     public void enqueue(T item) {         // your implementation here:         if (size == 0) {             head = new Node();             head.item = item;             head.next=tail;             size++;         }//end if         else{             Node newNode = new Node();             newNode.item=item;             tail.next = newNode;             tail = newNode;             size++;         }//end else     }      /**      * dequeue: remove and return the head of the queue      *      * @return the deleted value      * @throws NoSuchElementException if queue is empty      */     public T dequeue() {         // your implementation here:         if(isEmpty()){             throw new NoSuchElementException();         }//end if         else{             Node temp = head;             head = head.next;             size--;             return temp.item;         }//end else     }//end dequeue      /**      * peek: view the head of queue without removing it.      *      * @return Null if queue is empty      */     public T peek() {         // your implementation here:         if(isEmpty()){         return null;         }//end if         else{             return head.item;         }//end else     }//end peek }//end ListQueue


Expensive precalculated data only relevant to one function

I find myself writing code like this relatively often:  _munge_text_re = re.compile("... complicated regex ...") def munge_text(text):     match = _munge_text_re.match(text)     ... do stuff with match ...   Only munge_text uses _munge_text_re, so it would be better to make it local to the function somehow, but if I move the re.compile line inside the def then it will be evaluated every time the function is called, defeating the purpose of compiling the regular expression.  Is there a way to make _munge_text_re local to munge_text while still evaluating its initializer only once?  The single evaluation needn't happen at module load time; on the first invocation of munge_text would be good enough.  The example uses a regex, and the majority of the time I need this it's for a regex, but it could be any piece of data that's expensive to instantiate (so you don't wanna do it every time the function is called) and fixed for the lifetime of the program.  ConfigParser instances also come to mind.  Extra credit: For reasons too tedious to get into here, my current project requires extreme backward compatibility, so a solution that works in Python 2.0 would be better than one that doesn't.


I want the for loop to complete before I print the result, in:          for (int i = 0; i < 5; i++)         {             (new System.Threading.Thread(() =>                 {                     if (TimeTakingMethod())                     {                         ++nResult;                     }                 })).Start();         }         Console.WriteLine("Count = " + nResult);   but Console.WriteLine will not wait for those threads to finish because printing is done on the main thread.  If I change it to:          System.Threading.Thread t = new System.Threading.Thread(() =>             {                 for (int i = 0; i < 5; i++)                 {                     (new System.Threading.Thread(() =>                     {                         if (TimeTakingMethod())                         {                             ++nResult;                         }                     })).Start();                 }             });         t.Start();         t.Join();         Console.WriteLine("Count = " + nResult);   it will still not solve the problem because the nested threads will not be waited for.  Any simple solution to this? Thanks for going through this.


I run  pip install pelican markdown  I got this error message:  Exception: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main     status = self.run(options, args)   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run     requirement_set.install(install_options, global_options, root=options.root_path)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install     requirement.install(install_options, global_options, *args, **kwargs)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install     self.move_wheel_files(self.source_dir, root=root)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files     pycompile=self.pycompile,   File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files     clobber(source, lib_dir, True)   File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber     os.makedirs(destsubdir)   File "/usr/lib/python2.7/os.py", line 157, in makedirs     mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pelican-3.6.3.dist-info'  Storing debug log for failure in /home/begueradj/.pip/pip.log   How to fix this?


I'm not DBA at all but I need to do something to synchronize four SQL server databases. I just discover there is a Merge Replication system in SQL Server 2008. At this moment I'm reading the specification and the documentation but it's not clear if this tool is able to do real synchronization or is just merging data from my master database to my slave database. By real synchronization I mean the data is synchronized from my master to my slaves but also from my slaves to my master.


In the Hobbit 3, why didn't the orcs... [spoiler]

In the Hobbit 3 (Peter Jackson), why didn't the orcs  use the worms to burrow directly into the mountain, or burrow straight to the gold, bypassing the armies? Why didn't they use the worms to battle, like Dune?


When is +2 Dex better than Crossbow Expert?

is relevant to me; my Rogue is about to reach 4th level.  If you only hit on a 20, the  feat (PHB, p. 165) nearly doubles your chance to hit. If you hit on a 2, Crossbow Expert is simply +4.5 damage (2d6+6 vs. 1d8+4) over a light crossbow.  Is there a place between these extremes, where using an ASI to increase Dex by 2 is better for DPR than taking the Crossbow Expert feat? One hand crossbow or one light crossbow.


After update 15.04 to 15.40 VLC app did not work

I've tried to upgrate VLC, with sudo commands it was not possible. Now I get some errors when trying to upgrade the system like:  W:Failed to fetch http://ppa.launchpad.net/videolan/stable-daily/ubuntu/dists/wily/main/binary-amd64/Packages  404  Not Found W:Failed to fetch http://ppa.launchpad.net/videolan/stable-daily/ubuntu/dists/wily/main/binary-i386/Packages  404  Not Found E:Some index files failed to download. They have been ignored, or old ones used instead.


(This question was originally asked for my specific laptop: Dell XPS 15 L502X. But it seems that understanding I gained from the upgrade experience I am able help my friends to decide upgrading RAM their laptops of different models. If you dont have this specific laptop, you may hop on third-last paragraph starting as "While buying RAM you have to ensure that..." in the answer I have written.)  I bought my Dell XPS 15 L502X laptop almost 18 months ago. It has 4GB RAM and am thinking to upgrade it.  Processor: Intel 2nd Generation Core i7 2630QM   According to , it supports upto 16GB of DDR3 RAM at dual channel and at 1333MHz.  Currently I have 4GB 1333MHz DDR3 SDRAM RAM from Samsung. Running CPU-Z shows that it is a Single Channel:     Can I add , so that it will become total of 12GBs? I am concerned because the specs on the same page says Memory Configuration : Single Channel while at the same time says it is SO-DIMM. If it is a DIMM then it must be able to work in dual channels with others right? Am a bit confused. Do I need to do any configuration for that? or simply putting RAM in other slot will do?  post says that 2x8GB (total of 16GB) DDR3 1333MHz Corsair RAM worked on the same laptop model.  I am concerned about if I can setup RAM modules from two different manufacturers together in dual channel.  I also realized that the above mentioned RAM also has the same CAS latency as the one currently installed: 9-9-9-24.  From , I know that max supported RAM speed is 1333MHz, can I benefit from buying 8GB 1600MHz DDR3 SDRAM from Corsair? Can I use it in dual channel with my current 4GB DDR3 1333MHz RAM? Will I need to do any configuration for that? What is the different between   similar RAMs from Corsair, since they have different price tag? Second one specifies Memory Configuration : Single Channel in specs sheet, but the first one specifies none such parameter. Does that mean the first one can be used in dual channel with other DIMMs while second one cannot be? Out of these three (links in Q1 and Q3) RAMs from Corsair which one better suits to my situation?


Why you're laughing vs Why are you laughing?

Recently I was talking to my friend in English. He started laughing and I asked him Why you're laughing man?  Someone told me you should say Why are you laughing? and this one is totally wrong.  I got a little bit confused. I know "Why are you laughing?" is correct but I can't wrap my head around it fully that mine is totally wrong.  I represented what I meant through intonation of the sentence and my buddy had no problem understanding it. my question is:  The form I used was totally wrong? and I should stop using it?  I'm guessing in written English this form is wrong and if I use it, it's gonna represent a statement, but in the spoken language, since we have intonation I thought it might be unnecessary to emphasize on being totally grammatically correct for every sentence I'm saying.  Am I wrong?


sudo apt autoremove faliure (no space left)

i tried to remove some space from the boot directory...  i typed (this is all in linux terminal [ubuntu]) and got the following:  $ sudo apt autoremove Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up linux-image-4.4.0-154-generic (4.4.0-154.181) ... Processing triggers for linux-image-4.4.0-154-generic (4.4.0-154.181) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-4.4.0-154-generic  gzip: stdout: No space left on device E: mkinitramfs failure find 141 cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.4.0-154-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-4.4.0-154-generic (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  linux-image-4.4.0-154-generic E: Sub-process /usr/bin/dpkg returned an error code (1)   do you have a suggestion ?  when i type linux purge --info it gives me the following:  root@tal-HP-Notebook:~# linux-purge --info Booted kernel: 4.4.0-137-generic Size of the kernel (in /boot): 56MB Space used in /boot: 473MB Free space in /boot: 19MB (for superuser) Mount point of /boot directory: /boot  Inode usage of /usr/src (including linux headers): Filesystem                    Inodes  IUsed    IFree IUse% Mounted on /dev/mapper/ubuntu--vg-root 15081472 633536 14447936    5% /  E: No packages found Installed Meta-Kernel:       Current Available:        Installed:                /usr/local/bin/linux-purge: line 315: inst: bad array subscript [linux-purge] ERROR: Aborting due to an unknown error (1).   btw - when i start my computer (laptop) - it doesn't load up the system, it just gives me a blank screen (in purple). then i have to shut it down and start it again and then choose one of the older karnels... (then it runs usually)...  when i check in synaptic package manager - it does not show any broken packages...


Manually changing elevation data of DEM using QGIS

I'm looking to do personal modifications to a DEM (Aster global elevation model). I want to select an rectangular area & reduce its recorded elevation by 20m. There are other parts on my map I want to raise in elevation, but I think if I learn how to reduce, I will be able to do the process in reverse and increase the elevation. Is this possible?


Why can't I offer a bounty on my 3 day old question?

I have 78 reputation and  is eligible for bounty 2 days ago. Yet I cannot offer a bounty on my question.    It appears that because I have an answer on my question, the system requires me to offer a minimum bounty of 100. But since my answer is already deleted, what can I do to offer a bounty on my question now?


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


Proof of $\mathcal{F}\approx\mathcal{P}(\mathbb{N})$ using elementary notations and Cantor Bernstein Theorem?

Suppose $\mathcal{F}$ is the set of all functions from $\mathbb{N}$ to $\{0,1\}$. My math textbook wants me to use Cantor-Bernstein Theorem. Question: Using Cantor-Bernstein Theroem, prove $\mathcal{F}=\mathcal{P}(\mathbb{N})$. Proof: The definition of $\mathcal{F}$ represent all subsets of $\mathbb{N}\times\{0,1\}$. Hence $\mathcal{F}=\mathcal{P}(\mathbb{N}\times\{0,1\})$. Suppose we create a function $f:\mathbb{N}\to\mathbb{N}\times\{0,1\}$. If $f(x)=(x,1)$, then it is automatically one-to-one. Hence, $|\mathbb{N}|\le|\mathbb{N}\times\{0,1\}|$. Therefore, $|\mathcal{P}{(\mathbb{N})}|\le|\mathcal{P}(\mathbb{N}\times\{0,1\})|$. Hence, $|\mathcal{P}(\mathbb{N})| \le|\mathcal{F}|$. Now suppose we create $g:\mathbb{N}\times\{0,1\}\to\mathbb{N}$. If $g=xy$, then if $x_1y_1=x_2y_2$ then $x_1=x_2$ and $y_1=y_2$. Hence $g$ is one-to-one. Hence $|\mathbb{N}\times\{0,1\}|\le|\mathbb{N}|$. Therefore, $|\mathcal{F}|\le|\mathcal{P}(\mathbb{N})|$. Hence using Cantor-Bernstein Theorem, $|\mathcal{F}|=|\mathcal{P}(\mathbb{N})|$. Therefore $\mathcal{F}\approx\mathcal{P}(\mathbb{N})$ Is my proof correct? If not, how can we improve it? (If you don't understand my proof, make your own answer.)


subdivided/unsubdivided linked split screen

Is there a way to split the viewport so I can view my unsubdivided model in edit mode and my subdivided model in object mode at the same time? I'd like to be able to edit my mesh and see it update on a subdivided version on a separate window. Thanks!


When does the Yeti Zombie appear in Plants vs Zombies?

I am yet to see the Yeti Zombie in Plants vs Zombies (PC/iPhone) and I've been playing for 50hrs+.   Is there a specific condition that needs to be filled for him to show, a way to trigger his arrival or is it completely random?


AC Adapters: Do watts have to match? / Is 19v close enough to 20?

Two questions on points not covered in either of these two threads about AC adapters:      1) Watts aren't mentioned. Is it okay to replace a 65w AC adapter for a laptop computer with 90 or 120w?  2) Voltage: It says an adapter must not have higher or lower voltage than a device's specification but it doesn't say how much higher or lower, e.g. whether a difference of 1 volt out of 20 is a rounding error, or physically meaningful. Specifically, is it okay to replace a 20v adapter with a 19v one, for a laptop computer?


Exception in thread "main" java.lang.StackOverflowError QuickSort an descending ordered array with large size

I'm implementing a recursive quicksort algorithm for sorting an descending ordered array, it appears to be working fine for small array sizes but when I have size=100000, for example, i get this error: Exception in thread "main" java.lang.StackOverflowError here is my quicksort code:     public void quicksort(int low, int high)     {         if(low<high)         {             int pivot = partition(low, high);               quicksort(low, pivot - 1);             quicksort(pivot + 1, high);         }              }  this is my partition code:     public int partition(int low, int high)     {         int pivot = this.data[high];           int pIndex = low;           for (int i = low; i < high; i++)         {             if (this.data[i] <= pivot)             {                 int temp = this.data[i];                 this.data[i] = this.data[pIndex];                 this.data[pIndex] = temp;                 pIndex++;             }         }           int temp = this.data[high];         this.data[high] = this.data[pIndex];         this.data[pIndex] = temp;           return pIndex;     }


Counterexample to "Measurable in each variable separately implies measurable"

Some fellow classmates are preparing for a qualifying exam on real analysis, and asked me for help on the following question:  Let $ \ f:[0,1]^2\longrightarrow\mathbb{R}$ be such that: (i) $\ f(x,\cdot)$ is measurable for each fixed $x\in[0,1]$; (ii) $\ f(\cdot,y)$ is continuous for each fixed $y\in[0,1]$. Show that $\ f$ is measurable.  If we only assume that $\ f(\cdot,y)$ is measurable for each $y\in[0,1]$, rather than continuous, can we still conclude that $f$ is measurable?  I was able to come up with the following simple proof (at least I hope it is a proof) of the first statement using some standard arguments:  Proof. $ \ $ Define a sequence of functions $\{f_n:[0,1]^2\longrightarrow\mathbb{R}\}_{n\geq 1}$ by: $$ f_n(x,y)=f\bigg(\frac{i}{n},y\bigg), \qquad \text{for } x\in\bigg[\frac{i}{n},\frac{i+1}{n}\bigg], \ i=1,\cdots,n $$ Moreover, since $ \ f(\cdot,y)$ is continuous at $x=\tfrac{i}{n}$ for each $y$, for each $\epsilon>0$ there is a $\delta_y>0$ so that $$ \bigg| \ x-\frac{i}{n}\bigg|<\delta_y \qquad\Rightarrow\qquad \bigg| \ f(x,y)-f\bigg(\frac{i}{n},y\bigg)\bigg|<\epsilon; $$ therefore, for any $n>\tfrac{1}{\delta_y}$ and any fixed $(x,y)\in[0,1]^2$ with $x\in\big[\tfrac{i}{n},\tfrac{i+1}{n}\big]$, we have $$ \bigg| \ x-\frac{i}{n}\bigg|\leq \frac{1}{n}<\delta_y $$ and so $$ | \ f_n(x,y)-f(x,y)|=\bigg| \ f\bigg(\frac{i}{n},y\bigg)-f(x,y)\bigg|<\epsilon. \tag{$\ast$} $$ In other words, $ \ f_n\longrightarrow f$ pointwise.  Furthermore, we clearly have that $$ A_n:=\{(x,y)\in[0,1]^2 \ | \ f_n(x,y)>\alpha\} \qquad\qquad\qquad $$ $$ \qquad\qquad \ =\bigcup_{i=1}^{n-1}\bigg(\bigg[\frac{i}{n},\frac{i+1}{n}\bigg)\times \bigg\{y\in[0,1] \ \bigg| \ \ f\bigg(\frac{i}{n},y\bigg)>\alpha \bigg\}\bigg). $$ Since $ \ f\big(\tfrac{i}{n},\cdot\big)$ is measurable for each $i=1,\cdots,n$, the latter expression is a union of measurable sets.  This means that $ \ A_n$ is measurable, and therefore $ \ f_n$ is measurable for each $n\geq 1$.  Finally, as the limit of measurable functions is measurable, we conclude that $ \ f$ is measurable. $\hspace{6.25in}\square$  I'm fairly certain that the above proof is correct (anyone care to confirm?); however, that still leaves the following:  Question:  If $ \ f$ is merely measurable in each variable separately, is it measurable?  The proof I gave above uses the continuity assumption in $(\ast)$, so obviously the same proof will not work in this case, but I cannot come up with any counterexamples.  Any suggestions?


What author changes are acceptable after paper acceptance in the camera-ready

In a conference in the CS field, what sort of changes are acceptable from an author of a paper in the camera-ready version over the submitted version?  Can the author add few new related findings?


Solve the hanging rope shape using the variational principle?

I know how to write down the local ordinary differential equation (ODE) via Newton's force law, balancing between the left and right rope tension and the gravity exerted on a infinitesimal piece of rope. The solution is  which has the form $$ y (x)= a \cosh \left(\frac{x}{a} \right) = \frac{a}{2}\left(e^\frac{x}{a} + e^{-\frac{x}{a}}\right) $$ with appropriate boundary conditions. But I only aware the way to solve from ODE. Could we solve the hanging rope shape using the variational principle? This means that we input the shape of the rope minimize the potential energy $V$ (because there is no kinetic $T$) for lagrangian $L= T-V$ (question 1: but this seems maximize the $L$ strangely?). Suppose the length of the role is fixed say $\ell$. The two hanging points out horizontal apart at $x=-l$ and $x=l$. Then we have a constraint on the length of the role is fixed say $\ell$. Then we have a constraint $$ \ell = \int_{-l}^l \sqrt{1 + y'(x)^2} dx   $$ Then we minimize potential energy $V$ (but this maximizes the lagrangian $L$ strangely?) $$ V= \rho g \int_{-l}^l y(x) \sqrt{1 + y'(x)^2} dx   $$ with $ \rho$ the constant density and gravity constant $g$. I suppose we are solving the eq of motion from Variational Principle with a Constraint like $$\boxed{ V - \lambda(\ell - \int_{-l}^l \sqrt{1 + y'(x)^2} dx )= \rho g \int_{-l}^l y(x) \sqrt{1 + y'(x)^2} dx   - \lambda(\ell - \int_{-l}^l \sqrt{1 + y'(x)^2} dx )} $$ How do we obtain $y(x)$ then by minimization or maximization ? See these two related questions show no answers (!!!):


Word for a person who wants to have problems to gain attention or sympathy

Is there a word for a disease or personality type where a person wants to have problems to gain attention or sympathy. I came across something closer called ''. But it is about a person who 'pretends' to have problems, not actually wants to have problems. Edit: It is not a duplicate of , because the problems do not necessarily relate to a medical condition. They can be of a financial situation or relationship issues.


trying to install 13.10 on Hipstreet Equinox2 tablet

Not sure how to install on tablets I'm 13.10 on desktop so do I download a different ver for tablets


Find the value of $k$ in $\frac{b+c}{\sqrt{a}}+\frac{c+a}{\sqrt{b}}+\frac{a+b}{\sqrt{c}} \ge \sqrt{a}+\sqrt{b}+\sqrt{c}+k$

It is also given that $abc = 1$. I used AM-GM inequality to reach till $\frac{b+c}{\sqrt{a}}+\frac{c+a}{\sqrt{b}}+\frac{a+b}{\sqrt{c}} \ge \sqrt{\frac{bc}{a}} + \sqrt{\frac{ac}{b}} + \sqrt{\frac{ab}{c}} $ How to go further


Bonding / link aggregation, is it ok to connect 2 switches together?

I have 2 computers, each with 2 ethernet ports connected to 2 unmanaged switches using linux Bonding Mode: load balancing (round-robin). Can the 2 switches connect to each other without causing a problem?   It seems to operate fine and things work better when I artificially create some failures, but I wonder if it will cause some problem I don't notice.


I'm new to blender, I have a table animation but when I go to render, render result is blank. No cameras are blocked in animation tab, all surfaces are on to be rendered. I'm trying to record from one camera and I just cant get it working. Any help would be appreciated thanks!


Command in shell script to minimize particular window of an open app?

How can I include in a (zsh) shell script a command that will minimize one particular window among several windows open in a specified app? I already know how to include a command that opens an app with one or more documents open in it, e.g.: open -a textedit.app .profile .zshrc  What command can I use from Terminal to minimize a specified one of those just-opened windows? I presume that something involving osascript is involved, such as in . But the method given there in the Edit by the original poster: (i) minimizes all the windows; and (ii) does use osascript which, as I recall, is not so simple to call from within a shell script.


A ring $R$ is said to have a bounded index (of nilpotency) if there is a positive integer $m$ such that $x^m = 0$ for every nilpotent $x\in R$. I wonder whether this property transfers to the ring of matrices, that is,     If $R$ has bounded index, then $M_n(R)$ has bounded index?   If $R$ is a field, then the answer is positive and extends obviously to integral domains. Noetherian rings have also the bounded index property, and it would be nice to have an answer in this case. (When $R$ is noetherian and reduced the answer is also positive.)  Remark. This question was suggested by .


I have a SQL Server Stored Procedure for getting the next number in sequence stored in a configuration table:  declare @val as int SELECT @val = LongValue from tblSystem WHERE [Key] = @Key;  SET @val = @val + 1;  UPDATE tblSystem set LongValue = @val where [Key] = @Key  select @val;   Will running this within a Stored Procedure avoid any possible concurrent reads and avoid having a caller receive the same number? Should I use a transaction instead?


I have multiple .csv files in the fodler and I need to convert them to .txt files. Currently I am able just to rename them, but I want to leave the original files in place  import os,sys folder = 'C:....' for filename in os.listdir(folder):    infilename = os.path.join(folder,filename)    if not os.path.isfile(infilename): continue    oldbase = os.path.splitext(filename)    newname = infilename.replace('.csv', '.txt')    output = os.rename(infilename, newname)


Filipino citizens with Norwegian resident permits transiting at London Heathrow - Do We need a Transit Visa?

We are gonna be four people travelling from Norway to the Philippines in December. Two of us are filipino citizens with valid Norwegian resident permits. Do we need a transit visa if we want to go landside? I am not sure if a Norwegian resident permit is considered "common format". All help is much appreciated.


Polynomial ring ideal. Show that $(f) \cap R_N = (0) \iff f \notin R_N$

I have a polynomial ring $R = K[x_1,\dots,x_n]$ and $N \subset \{x_1,\dots,x_n\}$. Define $R_N = K[x_i:x_i\notin N]$. If $f\not= 0$, show $(f) \cap R_N = (0) \iff f \notin R_N$.  So my entire argument hinges that $f \in R_{N^c}$ and clearly $f\in (f)$, but $f \not= 0$, so the intersection must be $(0)$ since $0 \in R_N$. I m not sure how to do the other direction. They look similar.


The number of divisors of any positive number $n$ is $\le 2\sqrt{n}$

How to prove that the number of divisors of any positive number $n$ is $\le 2\sqrt{n}$?   I have started something like below:  $$ n^{\tau(n)/2} =   \prod_{d|n} d$$  But not getting ideas on how to take this further and conclude. Any help is appreciated. Thanks!


we have a website with a directory of addresses. The main purpose is the search of for addresses matching different criteria. now we wanted to build some special landing pages for (google) searches which include a city name. these pages consist in a prefilled search for that city. we also have a special sitemap with a list of all cities with addresses. Only some pages are real pages in our CMS (TYPO3) with (little) more than the usual search result, most cities are just links to the search result with that city name.  we also have sitemaps, which are read by google (according the webmasterstools). The pages are responsive, fast and only with some minor warnings.  now the problem: you can find the site if you search in general (so it's not the top answer), but if you search more specific by adding a city name there is no search result for the site or any landing page within the total of ~150 google results. the landing pages are ignored by google, the whole site is ignored in connection with city names. adding the filter to search on our domain only (site:domain.tld) google finds a lot of pages including the landing pages (independent of static or dynamic landing page), mostly the detail pages for the addresses.  what can be the reason for the not listing in the general search results? what can we do to be listed in the search result at all? (better ranking could be a later question)


I have a script that needs to be run every five seconds. I know that cron can do tasks by the minute, but is there a way to run something every second?


Is $\mathbb{R}$ a subspace of $\mathbb{R}^2$?

I think I've been confusing myself about the language of subspaces and so on.  This is a rather basic question, so please bare with me.  I'm wondering why we do not (or perhaps "we" do, and I just don't know about it) say that $\mathbb{ R } $ is a subspace of $\mathbb{ R }^2 $.  It's elementary to prove that the set $$ S:= \left\{ c \cdot \mathbf{x} \mid c \in \mathbb{ R }, \mathbf{x} \in \mathbb{ R }^2  \right\}$$ is a vector subspace of $\mathbb{ R } ^2$.  What is confusing me is that there seems to be an isomorphism between the set $S$ and $\mathbb{ R } $: \begin{align*} \varphi: S &\rightarrow \mathbb{ R }   \\  c \cdot \mathbf{x} &\mapsto c \\ \end{align*} If this is indeed true, as I believe it is having checked that $\varphi$ gives an isomorphism, wouldn't we say that $\mathbb{ R } $ is a subspace of $\mathbb{ R } ^2$? Any help sorting out this (language) problem will be greatly appreciated!


Coefficients are all zero for lasso regression

I am implementing regression techniques to predict a continuous output. I have trained a model using lasso regression.  For some reason, the coefficients become all zero. I don't know why this is the case and I cannot find a solution to this. Can someone help please?  Thanks in advance!


What the difference beetween "#" and "." in css?

I don't know the difference between "#" and "."to make a class. Example:    .teste {   color: red;   }    #teste {    color: red;   }


LaTeX has soul. ConTeXt, of course, , where you can put sweet hightligher under your text for free!    In the pictured example, you can see highlights that not only highlight, but that do it with cool edges that look so good, you can smell fumes! The fearless author says he'll show how that was done in another post; this one shows only how to lay down a straight, yellow box. But, it is possible to do word-wrapped highlighting with cool-shapped boxes within ConTeXt, presumably.  The trouble for me is that getting into the ConTeXt world is steep climb right now, given the state of documentation and the flux of changes, so I need to continue with LaTeX. But the real problem is that now I can't live without the Organic-Looking Highlights of Awesomeness in that picture!  As I said, Non-Organic-Looking Highlights of the Ordinary are easy with the soul package:  \hl{Some awesome text that word wraps fine.}   It just taunts me on the page with its straight lines. So, if I sacrifice word wrapping, I can use PGF/TiKz and create the following macro:  \newcommand\hl[1]{%     \tikz[baseline,%       decoration={random steps,amplitude=1pt,segment length=15pt},%       outer sep=-15pt, inner sep = 0pt%     ]%    \node[decorate,rectangle,fill=navcolor,anchor=text]{#1\xspace};% }%   Which creates something like this:    Now, my color is too dark and my randomness needs adjusting, but you see that a similar effect could be achieved.  My trouble is that I don't understand TeX enough to dig into the Soul package and add the TiKz/PGF goodness that it so sorely needs. So, I leave it to you guys. Anyone want to tackle this?   Or is it yet another piece of fruit, just a touch out of reach, that shall have to wait until ConTeXt settles down?


How can I install firmware-b43-installer driver if I can't connect to internet by wire?


What's the probability to win (or lose) this solitaire?

Me and my friends used to play a "solitaire" and always asked ourselves which are the odds to win, or lose. I studied Maths and many of them did as well, but nobody could find a good answer to this question.  The solitaire goes as follows: get a regular deck of 52 cards and start flipping cards one at a time. When you flip the first card, you say "one": if the card is actually a "one", that is, an ace, then you lose the game. If not, you move on flipping another card and saying "two": as above, you lose if the flipped card is actually a two. You do the same for the number $3$ and then you switch back to one, that is, you say "one" by flipping the fourth card (supposing you haven't lost the game yet).  My questions are:   What are the the odds of going through the whole deck of cards without saying the number of the card you are flipping, i.e. the odds of winning this game? Does the number of cards in the deck make a difference? For example, would it be more or less likely to win if I had a deck of $48$ cards, from which I took out the queens? Does the numbers you say make a difference? For example, would it been more or less likely to win if I said "one, two, three, four, one, two, ..." while flipping the cards, instead of "one, two, three, one, ..."?   The only information I got is that it is extremely hard to win this game. Anyway, it is not impossible (so far, I have seen me or my friends win about $5$ times). My attempts to directly calculate probabilities, using combinatorics techniques, failed utterly.  Thanks!


How to append the result of an if statement in python

I am trying to create basic survey program that asks questions and takes a numerical result from the answer and finds the average. i.e. A=10, B=5, C=0. I'm having two basic problems, the first and more important is adding the result to the list. The second is a formatting issue: I keep receiving an 'unexpected indent' or 'indent does match outer indentation layer' error on the append lines. I would appreciate any thoughts. analyzing simple survey data for political affiliation voter = list()   def question_1(x):     if x == "A":            print 10         voter.append(10)        elif x == "B":         print 5         voter.append(5)     elif x == "C":         print 0         voter.append(0)     else:         print "Not a valid answer"    def question_2(y):       if y == "A":         print 10         voter.append(10)     elif y == "B":         print 5         voter.append(5)     elif y == "C":         print 0         voter.append(0)     else:         print "Not a valid answer"   def question_3(z):     if z == "A":         print 10         voter.append(10)     elif z == "B":         print 5         voter.append(5)     elif z == "C":         print 0         voter.append(0)     else:         print "Not a valid answer"   def question_4(a):     if a == "A":         print 10         voter.append(10)     elif a == "B":         print 5         voter.append(5)     elif a == "C":         print 0         voter.append(0)     else:         print "Not a valid answer"   def question_5(b):       if b == "A":         print 10         voter.append(10)     elif b == "B":         print 5         voter.append(5)     elif b == "C":         print 0         voter.append(0)     else:         print "Not a valid answer"    def get_average():     average = sum(voter)/len(voter)     print average   question_1(raw_input('what is your position on issue 1: A, B, or C')) question_2(raw_input('what is your position on issue 2: A, B, or C')) question_3(raw_input('what is your position on issue 3: A, B, or C')) question_4(raw_input('what is your position on issue 4: A, B, or C')) question_5(raw_input('what is your position on issue 5: A, B, or C'))  get_average()


I'm using Moto G second generation. My device is unable to install Facebook app after completion of download from play store. I checked few solutions, even removed my google account, but didn't work. I have enough space on my device and a fair connection speed. This problem is occurring only with Facebook application. Although, I tried to download Facebook from other sources but still there's problem in installation.


What is the purpose of senators and leader?

Also what do I do when promoting them with experience ? Do they get more efficient ?


I'm having issues with signond and gsignond conflicting or something, resulting in me being unable to use apt at all.   miclebrick@micles-workshop:~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  kaccounts-integration : Depends: signond but it is not installed  signon-plugin-password : Depends: signond but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). miclebrick@micles-workshop:~$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   signond The following NEW packages will be installed:   signond 0 upgraded, 1 newly installed, 0 to remove and 50 not upgraded. 3 not fully installed or removed. Need to get 0 B/153 kB of archives. After this operation, 596 kB of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 448259 files and directories currently installed.) Preparing to unpack .../signond_8.59+17.10.20170606-0ubuntu1_amd64.deb ... Unpacking signond (8.59+17.10.20170606-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/signond_8.59+17.10.20170606-0ubuntu1_amd64.deb (--unpack):  trying to overwrite '/usr/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service', which is also in package gsignond 1.1.0~r509+pkg4~daily~ubuntu18.10.1 Errors were encountered while processing:  /var/cache/apt/archives/signond_8.59+17.10.20170606-0ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)


Why is that a massless string has same tension throughout its length provided the string is inextensible. Similarly in spring block problems we take spring as massless as well and here too we consider spring force to be uniform throughout it's natural length. I actually want the derivation of how do we get this. Thank you.


Was Voldemort's secret identity always known to the Ministry of Magic? Was it ever secret?

Often called "He-Who-Must-Not-Be-Named" and "You know who", was it common knowledge at the Ministry of Magic that Voldemort was the same person as Tom Riddle?


How to install kernel 4.14 on Kubuntu 19.10?   Why: Because my hardware works with that kernel.  What I tried:  dan@dan-pc:~$ apt-cache search linux-generic  linux-generic - Complete Generic Linux kernel and headers linux-image-unsigned-5.3.0-18-generic - Linux kernel image for version 5.3.0 on 64 bit x86 SMP linux-modules-5.3.0-18-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-extra-5.3.0-18-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-image-unsigned-5.3.0-19-generic - Linux kernel image for version 5.3.0 on 64 bit x86 SMP linux-image-unsigned-5.3.0-22-generic - Linux kernel image for version 5.3.0 on 64 bit x86 SMP linux-image-unsigned-5.3.0-23-generic - Linux kernel image for version 5.3.0 on 64 bit x86 SMP linux-image-unsigned-5.3.0-24-generic - Linux kernel image for version 5.3.0 on 64 bit x86 SMP linux-image-unsigned-5.3.0-26-generic - Linux kernel image for version 5.3.0 on 64 bit x86 SMP linux-image-unsigned-5.3.0-29-generic - Linux kernel image for version 5.3.0 on 64 bit x86 SMP linux-modules-5.3.0-19-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-5.3.0-22-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-5.3.0-23-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-5.3.0-24-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-5.3.0-26-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-5.3.0-29-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-extra-5.3.0-19-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-extra-5.3.0-22-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-extra-5.3.0-23-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-extra-5.3.0-24-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-extra-5.3.0-26-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP linux-modules-extra-5.3.0-29-generic - Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP   My problem is with an Amd r9 390 xfx to enable vulkan.  This is what I did on Manjaro Kde to make it work  Solved it by using this  1  Manjaro kde 18  Works for now on kerenl 4.14.170-1 by adding this using nano with sudo: sudo nano /etc/modprobe.d/amdgpu.conf  Put this in the file  options amdgpu si_support=0 options amdgpu cik_support=1  sudo nano /etc/modprobe.d/radeon.conf Put this in the file  options radeon si_support=0 options radeon cik_support=0  Rebuild the initramfs: mkinitcpio -P  But if i use the kernel 5.something  My screen will not boot.  After a lot of trial and error made my gpu recognize amdgpu on the most recent kernel 5.3.0-40-generic using this:  In /etc/default/grub  I changed this line  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"   Too  GRUB_CMDLINE_LINUX_DEFAULT="radeon.cik_support=0 radeon.si_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1"   Also I have a script that forces power to gpu  !bin/bash  xset -dpms  I called amd-power.sh and i made it to autostart on system boot.  Make sure that is the first thing in autostart.  It should work for me it's working.  Finally amd r9 390 can be used with vulkan on ubuntu 19.10.  Thnaks for all the help guys  Thanks


asus webcam is flipped upside down everywhere

I've been having this problem and I haven't been able to solve it for days now. It should be very simple, but I'm also very much a novice.  My webcam is flipped upside down. Tried flipping it back with v4l2, but the settings doesn't apply. In Cheese I can manually flip the webcam but the effect doesn't generalize to other applications, such as firefox/chrome or skype.  I know that internal ASUS cameras are physically installed upside-down and that there is software to flip it, but it seems v4l isn't able to do it.  The common solution for skype, LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so /usr/bin/skype doesn't fix the problem either.  Except actually turning my computer upside down, what options do I have?


lost my files after mounting a partition as home folder

I made a bad mistake .  I mounted a partition as home folder based on this post     and I'v lost all of my files in my preivous home folder . is there any way to recover them ?


My King of Ireland just died, but the problem is the child I had groomed for succession, my first son was murdered sometime ago, and now my second son inherited my kingdom. He is "Slow" and basically has 0 on 3 of the stats making him really useless.  My Succession Laws are Primogeniture, so the next heir is his brother or the 3rd Son of the original king. I want to kill off the "Slow" son ASAP.  The Slow son is pretty much hated by everyone, but I have been playing as him for a while and he has not been murdered by anyone yet.  So the question is how the hell do I get myself killed? So as to pass on the kingdom to my brother.


How to find people to play Magic the gathering with?

I started playing Magic about six years ago, and I live in a very "Intelligence Deficient" Town. I have tried playing online and I Don't have a game shop nearby. Help me please??????


I play on a Xbox One X and my Minecraft survival world I have been playing for about 2 months and a hour a day. And then all of a sudden, these huge deep holes appear and i have no idea why. There is a similar question about the issue  and I have tried all the things people said would work. I have gone to the nether, logged out and logged back in, saved and quit and also made a copy of the world. With the hole I can jump down and I fall into the void bellow killing myself in a matter of seconds. I would really appreciate it if someone could help because I have made a lot of advancements and also have been incredibly lucky with this.  This is not my world but this is what happened and there are many of them where my house and everything else resigns.


I have no idea how to work on the following proof. Any Suggestions?   Prove that for any sets A and B, if P(A) ∪ P(B) = P(A ∪ B) then either A ⊆ B or B ⊆ A.  Thanks


Prove $\lim_{n\to\infty}x_n=2$ Given $\lim_{n \to \infty} x_n^{x_n} = 4$

Given a sequence $\{x_n\}_{n=1}^\infty$ of positive numbers, satisfying $\lim_{n \to \infty} x_n^{x_n} = 4$, prove $\lim_{n\to\infty}x_n=2$. My attampt: from $\lim_{n \to \infty} x_n^{x_n} = 4$ we know $\exists n_0\in\mathbb{N}:\forall n\ \geq n_0: |x_n^{x_n} -4| < \epsilon$ so $|x_n-2| = \frac{|x_n^2-4|}{|x_n+2|} \leq |x_n^2-4| \leq |x_n^{x_n} -4| <\epsilon$ Which completes the proof if correct. Is it?


which one have more importance to US PhD program ?TOEFL and GRE or publication records

I have got my BS and master both with honor with good GPAs. But Now I want to know which of these have more importance to US PhD program in Computer engineering. TOEFL and GRE  or publication records. What I am looking for is some case like this:   T : 107   G : x   p : 0 T : 98    G : x   p : 1   which case has more chance ?


How does one show that $\int_0^\infty \left|\frac{\sin x} x\right| \, dx=\infty$?

In many place one finds accounts of how to evaluate $$ \int_0^\infty \frac{\sin x} x\,dx = \underbrace{\lim_{a\to\infty}\int_0^a}_{\text{Why view it this way?}} \frac{\sin x} x\, dx. $$  And it gets asserted that the reason why the integral must first be evaluated over a bounded interval and then afterward the bound is allowed to go to $\infty$ is that $$ \int_0^\infty \left|\frac{\sin x} x\right| \, dx\  \underbrace{{}\  =\infty\  {}}_{\text{That's why.}} \tag 1 $$ and therefore the ways of thinking about integrals introduced by Henri Lebesgue are not applicable on the unbounded interval.  If it is asked how we know that $(1)$ is true, my first thought it that one ought to compare it somehow with a harmonic series because it ultimately declines to $0$ at the same rate.  It seems as if this question is worth having among our stock of questions and answers, but a couple of days ago I found the answer posted as a mere comment.  Hence this present posting.  I'll notify the person who posted the comment.  Doubtless some variety of ways to prove this result exists, so others should post their own versions.


What Legends material has Disney re-canonised with minimal changes thus far?

Much of what was Star Wars canon had been relegated into Legends status. Out of these stuff, what has Disney brought back into canon to date?  I'm looking at Legends material they essentially lifted wholesale with almost no changes, to the extent that one who is familiar with Legends can look upon the Disney canon equivalent and recognise it as almost the same thing, if not identical.  The most notable example, arguably, is the return of Grand Admiral Thrawn.  Examples that do not meet the criteria include but are not limited to:   The identity of Starkiller. Starkiller Base's name is inspired by the Legends Dark Jedi Starkiller but it is not him. Darth Bane and the Rule of Two. The two entities are present in The Clone Wars series, which was canon before Disney and is still canon during Disney. It was never made Legends in the first place.   Of course, I'm speaking of examples from our perspective. This isn't about, for example, what Disney always intended to remain as canon but merely did not act to inform us of that.


What is happening to the integer when there is leading zero?

int num = 000111; System.out.println(num);   The output is 73.  Why is this happening?  How can I make the output to be 111? Or, How can I make the value to become 111.


How did skilled Clonetroopers transition to incompetent Stormtroopers?

When the Clonetroopers were working for the Jedi, they were dedicated, clever, and personable, whereas the Imperial Stormtroopers come off as bungling, uncoordinated drones with poor aim. Granted, as the original clones are presumably replaced by individual recruits over time, the people within the army will change. But is there any in-universe rationale given for the decline of the Grand Army's originally high standards?


This tag is about discussion on creating new StackExchange sites. Why is this tag named area51. Does it have anything to do with the US Air Force Facility in Nevada? How did the tag name originate for its use in StackExchange?


How can I simulate OO-style polymorphism in C?

Is there a way to write OO-like code in the C programming language?    See also:       Found by searching on "[c] oo".


Only actions taken are displayed on question while checking the history of Low Quality Posts review

On Ask Ubuntu, when I try to view my Low Quality Posts review history and click on the action taken on questions, I can only see the actions taken and no preview of the question.   :    The question still exists on the site:   It seems question review history page is missing this HTML class:  <div class="reviewable-post reviewable-post-post_id">   On the other hand, everything is working fine for answers.


What is the best plural of "+1" in casual American English writing?  Possible ideas I've considered include:   +1s +1's


I want to restore my contacts from a broken and black screen android device

I have a Samsung galaxy s5. Its screen has gotten smashed and now it displays nothing (black). I can turn on the phone, and also I can enter recovery mode (by pressing home+power+volume up). I have ADB installed on my laptop. But ADB can not access my phone and it shows it is unauthorized after typing adb devices, because it needs debugging mode to be enabled on the phone and I can not do that because the screen is smashed and black. I have read that after entering recovery mode in your phone you can access it with ADB without USB debugging being enabled. So I entered recovery mode in my S5 then I connected it to my laptop, in my laptop I typed adb devices but nothing was shown. Does somebody know how to do it? Is there any better solution?


Identity of rational polynomial over $\mathbb{C}$.

I need help in proving the following.  Given $Q$ a polynomial evaluated over the complex numbers such that $\alpha_1, ..., \alpha_n$ are roots of $Q$ and $P$ a polynomial such that $\deg P<n$ prove that $$ \frac{P(z)}{Q(z)}=\sum_{k=1}^{n}\frac{P(\alpha_k)}{Q'(z)(z-\alpha_k)} $$ At first I tried kind of 'brute forcing' from one side and then the other and I think I got farther when beginning with the right side but still I didn't manage to get the identity. Any help is appreciated.


How to change elements class with JavaScript?

I'm making a button that will open up a list and change a class type that will change the img.   It is for a overwatch lootbox opener and the button will open up what they have obtained. I want it so the img changes from + to - and that it will show and not show the list of what they got.  Here is the code:  JAVASCRIPT    function itemLog() {   var log = document.getElementById("log")   var btn = document.getElementById("bt")   alert(btn)   alert(log)   if (btn.class == "toggle fa fa-minus-circle") {       btn.class = "toggle fa fa-plus-circle";   }   else {     btn.class = "toggle fa fa-minus-circle";   } } <!DOCTYPE html>   <title>Home |OWLBS</title> <link rel="icon" type="image/png" href="favicon.png"> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link href="css/animate.css" rel="stylesheet" type="text/css"> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type=text/css> <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Raleway:400,600,700' rel='stylesheet' type='text/css'>

             OWLBS             This is not made by me, I edited another file!

About

Changelog

         OPEN LOOT BOX         Item Log

 Only for overwatch fans!


how to get the python type of variable correctly?

I cant get the type?  I am using python3.  print(type(base64_type)) # output: <class 'bytes'>  if type(base64_type) is 'bytes':     print('wow') else:     print ('Why are we not working')


Import using wildcard in ArcGIS ModelBuilder?

I wish to take a shapefile export, which is kept in a folder location, and update a sqlite database. My problem is that the shapefile changes name slightly with each and every export.  Is there a way, in the ArcGIS ModelBuilder to handle importing the data with a wildcard?   The export shapefiles are the only ones stored in this folder - would be great if the add data handled Import *.shp.Edit;  Import shapefile, rename shapefile, make feature layer, create feature class based on schema of feature layer, export feature class to SQL database.


Proving $$\frac{1}{n+1}+\frac{1}{n+2}+\frac{1}{n+3}+\cdots \cdots \cdots +\frac{1}{2n}>\frac{13}{24}\;, n>1\;,n\in \mathbb{N}$$   $\bf{My\; Try::}$ Using Limit as a sum $$\frac{1}{n}\left[\frac{1}{1+\frac{1}{n}}+\frac{1}{1+\frac{2}{n}}+\cdots \cdots \cdots +\frac{1}{1+\frac{n}{n}}\right] = \int^{1}_{0}\frac{1}{1+x}dx = \ln 2$$  But i did not understand how can i prove That $\displaystyle \bf{L.H.S}>\frac{13}{24}$  Help required, Thanks


Prove: For all sets $A$ and $B$, ( $A \cap B = A \cup B \implies A = B$ )  In the upcoming proof, we make use of the next lemma. Lemma: For all sets $A$ and $B$, $A = B$ iff $A - B = B - A$. Proof: Let $A$ and $B$ be arbitrary sets and let $S = A \cap B$ and $T = A \cup B$. If $S = T$, then $S$ and $T$ have got the same elements. Thus, by simplification law, Towe can state that $\forall x \in A \cup B \, ( x \in A \cap B ) \tag 1 \label 1$ To prove $A = B$ we might as well harness our lemma and establish that $A - B = A - B$, which we can be verified through the axiom of extension by showing that $\forall y \in A - B \,( y \in B - A )$ and $\forall y^* \in B - A \, (y^* \in A - B )$. So, let $y \in A - B \tag 2 \label 2$ and let $y^* \in B - A \tag 3 \label 3$ From \eqref{2} we rest assured that $y\in A$ and $y\not\in B$. Furthermore, by \eqref{1} we know that $y \in A \land y \in B \tag 4 \label 4$ Nonetheless \eqref{4} is an antilogy since from \eqref{2} we deduced, inter alia, that $y\not\in B$. Notice thus far we are trying to prove that \eqref{3} and $F$ implies $y \in B - A $ and $y^* \in A - B$. Therefore, it’s vacuously true that $A = B$ Q.E.D I believe I could've done this proof more easily by using the contrapositive method, but my question is, is this proof right?


Here's an interesting "proof" that there is no such thing as magnetism. I know the answer but I love this so much I had to ask it here. It's a great way to confuse people!  As we all know, $$\nabla \cdot\vec{B} =0$$ Using the divergence theorem, we find $$ \iint_S \vec{B} \cdot \hat{n} \, dS = \iiint_V \nabla \cdot \vec{B} \, dV = 0$$ Since $\vec{B}$ has zero divergence, there exist a vector function $\vec{A}$ such that $$\vec{B} = \nabla \times \vec{A}$$ Combining the last two equations, we get $$\iint_S \hat{n} \cdot \nabla \times \vec{A} \, dS = 0$$ Applying Stokes' theorem, we find $$\oint_C \vec{A} \cdot \hat{t} \, ds = \iint_S \hat{n} \cdot \nabla \times \vec{A} \, dS = 0$$ Therefore, $\vec{A}$ is path independent and we can write $\vec{A} = \nabla \psi$ for some scalar function $\psi$. Since the curl of the gradient of a function is zero, we arrive at: $$\vec{B} = \nabla \times \nabla \psi = 0,$$ which means that all magnetic fields are zero, but that can't be!  Can you see where we went wrong?


I have low internal Storage, But i have no apps on my phone?

My phone is an Android Evo, and it keeps telling me I have low storage. I have removed everything - facebook, email, messages, text messages, and pictures, but it's still low.


What website can I go in which I can find people that discuss Window-style OS improvements?

This is more of a hobby of mine that I've been working on for the past 5 years.  I'd like to find a group of people that I can discuss innovative ideas that would be a major improvement to the current windows-style OS that everyone uses.  I hate it and I think there has got to be something better than what was made decades ago.  I'd like to bring a few minds together, throw out some ideas to each other, discuss them, and finally end with something fabulously new and innovative.  Something on the scale of how the mouse was an improvement on the CLI of MS-DOS.  Shock consumers on how much easier it is to use.  Are we really still at the point of organizing data in folders?  And, folder in folders?


Why does Maximum Likelihood estimation maximize probability density instead of probability

I am trying to understand Maximum likelihood estimation but it looks like I am missing something rather elementary.          suppose we have an iid random sample $X_1, X_2,..., X_n$ for which the probability density function of each $X_i$ is $f(x_i; \theta)$ where $\theta$ is an unknown parameter. Then, the joint probability density function of $X_1, X_2,..., X_n$ is given by:          $f(X_1=x_1,X_2=x_2,\cdots,X_n=x_n)=\prod_{i=1}^{n} f(x_i, \theta)$      In Maximum Likelihood estimation, we try to maximize $f$ as a function of $\theta$.  Question: Why do we maximize probability density instead of probability? In what way does it make sense?  Edit: As explained in the answers, the probability of choosing a finite number of sample points from a continuous probability distribution is zero, so maximizing probability doesn't make sense, but how does maximizing probability density make sense?


Does public key encryption support a large message size?

I'm somewhat new to encryption. I see that the actual RSA sizes are 1024 and 2048? Can those key sizes support data blocks of 128 MB?


Looking for a fantasy book about a girl with unexpected tattoos

She was the only one with these tattoos who wasn't sacrificed. I think she became an enforcer, the leader of her tower. She was ridiculed by his peers for allowing different species in. Types of people included lion-like, bird people, and telepaths. I think there were people in power when were elf-like. I only read one book but I think it was a series.


If I enter the command      ctrl-alt-f1   The first console is displayed. The default font of this is way to small and I want to reset it. On other Linux and Unix like systems I can easily do this with the command     dpkg-reconfigure console-setup   If I enter this command on Ubuntu, the font size will reset. However, once I reboot, it will go back to the default small font. Why is this? How can I fix it?


Prove by induction that... $1+3+5+7+...+(2n+1)=(n+1)^2$ for every $n \in \mathbb N$

I'm not too sure exactly how to approach this question. Would anyone be able to give me any helpful advice or some sort of direction? I have a little problem with induction.   Prove by induction that:  $$1 + 3 + 5 + 7 +...+ (2n+1) = (n+1)^2 \quad\forall n \in \mathbb N $$


proof of infinite Primes of the Form 4n-1

would like help on the proof, I have most of it but got stuck in one part. my proof is: lets assume there are finite number of primes in the form 4n-1. let P be their product, define N=4P-1. so none of the primes of the form 4n-1 divide N yet there is a prime that divide N, say q.   I know I need to show that q is of the form 4n-1 but have no idea how to prove it, would greatly appreciate your help


Why not introduce a donate button in Stack Exchange sites?

Since Stack Exchange is doing pretty well what it was meant to do, isn't a donate button worth it?  This would help support site expenses in a better manner. There would be people willing to donate, since the series of sites has done so much for the world. It's not easy to manage something like this so efficiently. It's perfect and deserves some crowd funding/donations.


Diagram making for latex organizational strength

I want to make such a kind of diagram for my thesis. Can someone help me to make one like this? I am not able to find any template like this anywhere.


I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time.  Any ideas?


AlwaysOn Shared network location change requrest

We have successfully setup the Alwayson with different subnets and it was working fine. But unfortunately the existing NAS storage had a problem. Now our storage team provide new storage IP.  We need to replace the existing storage configuration with new one in Shared network location wizard . Is there any way without removing the existing setup due we already configured around 500 database.   Please find the below screen shot and do the needful.


I am very confused about the probability formula $E[\min(X,k)]=\int_0^kxf(x)dx+k(1-F(k))$

I understand the proof of this first formula.  I am confused about where he got the first E[min(X, k)] formula. It seems to have just come out of nowhere. And also, can someone explain why the two formulas are correct please?


Is "am" in "I am right" an auxiliary verb?

Consider these sentences:     The ice was thick enough to walk on.      They were in a hurry.      There is enough salt in it.      It is freezing.      I am right.   Are the italicized verbs auxiliary verbs?    Update: Let me explain why I asked this question.  The above sentences are from exercise 6 "Auxiliary verbs" from the book .  From the 36 sentences in exercise 6, all except the above mentioned five sentences are indeed sentences that contain auxiliary verbs (may, must, can, will, had, etc.).   So, what happened here? Why are those five sentences in this exercise? Is it an oversight?    View image in full resolution here:


Beamer presentation with no numbers in several slides (title page, outline slide, highlighting current section)

\documentclass[french]{beamer}  \usepackage[french]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \definecolor{links}{HTML}{2A1B81} \hypersetup{colorlinks,linkcolor=,urlcolor=links}  \mode<presentation> {   \usetheme{Madrid}      % o1r try Darmstadt, Madrid, Warsaw, ...   \usecolortheme{beaver} % or try albatross, beaver, crane, ...   \usefonttheme{serif}  % or try serif, structurebold, ...   \setbeamertemplate{navigation symbols}{}   \setbeamertemplate{caption}[numbered] }   \setbeamertemplate{headline}{} \makeatletter \setbeamertemplate{footline} {   \leavevmode%   \hbox{%   \begin{beamercolorbox}[wd=.8\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%     \usebeamerfont{author in head/foot}%     \insertsectionnavigationhorizontal{.7\paperwidth}{}{}%   \end{beamercolorbox}%   \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%     \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{1.5em}     \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}    \end{beamercolorbox}}%   \vskip0pt% } \makeatother  \usepackage{amsmath, amssymb,mathtools,marvosym,graphicx,MnSymbol,wasysym,epstopdf, scalerel,gensymb}     \usepackage{listings} \lstset {     language=[LaTeX]TeX,     breaklines=true,     basicstyle=\tt\scriptsize,     %commentstyle=\color{green}     keywordstyle=\color{blue},     %stringstyle=\color{black}     identifierstyle=\color{magenta}, }   \settowidth{\leftmargini}{\usebeamertemplate{itemize item}} \addtolength{\leftmargini}{\labelsep} \settowidth{\leftmarginii}{\usebeamertemplate{itemize item}} \addtolength{\leftmarginii}{1.5\labelsep}   %Pour le TITLEPAGE \title[Exposé]{CONCOURS} \subtitle{Exposé de candidature } \author[DSA]{Joe Smith} \titlegraphic{\vspace{-15pt}\includegraphics[height=0.1\textheight,keepaspectratio=true]{logopolito}\hspace*{3cm}~%   \includegraphics[height=0.1\textheight,keepaspectratio=true]{logopolito}    \hspace*{3cm}~%    \includegraphics[height=0.1\textheight,keepaspectratio=true]{logopolito} } \institute[AU]{{\Large Null part Université}\\\vspace{5pt}Blablabla\\\vspace{5pt}Blablabla\\\vspace{5pt}{Blablabla\\\vspace{5pt} Blabla\\Blablablabla}}  \date{}  \newif\ifshowtoc \showtoctrue% toggles to show the toc  \AtBeginSection{% \ifshowtoc \begin{frame}     \tableofcontents[currentsection, subsectionstyle=show/show/hide] \end{frame} \fi }  \begin{document}  \begin{frame}     \titlepage \end{frame}  \begin{frame}{Plan}   \tableofcontents[hidesubsections]   % You might wish to add the option [pausesections] \end{frame}  \section[CV]{Curriculum Vitae} \begin{frame}{Curriculum Vitae résumé} \begin{block}{Diplômes} \begin{itemize} \item  \end{itemize} \end{block} \begin{block}{Parcours post-doctoral} \begin{itemize} \item  \end{itemize} \end{block}   \end{frame}  \section{Enseignement} \subsection{Enseignements réalisés} \begin{frame}{Avignon Université, depuis se 2016, 563 heures Eq. TD}   \end{frame}  \begin{frame}{Avignon Université, Répartition des enseignements}  \end{frame} \subsection{Projet d'enseignement}  \section{Recherche} \subsection{Contexte} \subsection{Projets réalisés} \subsection{Projet de recherche} \section{Conclusion} \showtocfalse \section*{Remerciements} \begin{frame} \begin{block}{\MakeUppercase{Je vous remercie de votre attention.}} \end{block} \end{frame} \end{document}   1/ How can I have the total number of slides in the Title Slide ONLY?   2/ There is one slide with outline.  How can I have this slide not depicting the X/Y pages on the right corner ? I also want that this slide does not count to the total number of slides.  3/ Before each section a slide appears with current active section.  How can I have this slide (and the other slides highlighting future actual sections) not depicting the X/Y pages on the right corner ? I also want that the highlighting current actual slides do not count to the total number of slides.


.NET C# - How to use variable generic type in a recursive call?

I am coding a generic function that receives any entity class, accesses the database based on the class received and return an object filled with the contents returned from the database. Before someone asks, yes I am coding my own Entity Framework (just for fun!). What I already coded works if the class doesn't contain another class type. If the class contains another class inside I am trying to use recursive call to retrieve the object. In this case the generic type is changing and here is the point, the compiler doesn't accept a variable generic type. For example, suppose I have these 2 classes:  namespace Entities {     public class Order {         public int?Id { get; protected set; }         public DateTime Moment { get; set; }         public Client Client { get; set; }     }      public class Client {         public int?Id { get; protected set; }         public string Name { get; set; }         public string Email { get; set; }     } }   The generic function is: (simplified here and without the database access)  public static T GetById<T>(int? id) {     object obj = Activator.CreateInstance(typeof(T));     foreach (PropertyInfo prop in obj.GetType().GetProperties()) {         if (prop.PropertyType.Namespace == "Entities") {             int? idParent = n1; //where n1 is a value returned previously from DB             Type objType = prop.PropertyType;             prop.SetValue(obj, GetById<objType>(idParent)); //Compile error! "'objType' is a variable but is used like a type"         }         prop.SetValue(obj, n2); //where n2 is a value returned previously from DB     }     return (T)obj; }   It doesn't compile returning "'objType' is a variable but is used like a type". The code in the main program would have this line:  Order ord = GetById<Order>(1);   In this first call the type is known (Order) and the function works (without recursive call) returning the "Order" object but without the "Client" object. To retrive the "Client" object I need to call the function again (recursive call) but now the returned Type is unknown at compile time.  Does anyone have any suggestion?


textures are not loaded with collada files

I'm using Noesis to export Collada files and then import them into Blender 2.82 but the textures are not loaded at all. Is there a way to force the system to load textures?


Unable to connect Bluetooth devices to my laptop after updating Windows driver

I have a dual boot system with Windows and Ubuntu. Previously my mouse and headphones were able to connect, but after I updated the driver on my windows side to deal with the disconnecting, I was no longer able to add devices on the Ubuntu side.  I currently only have Bluetooth manager. I tried to follow , but did not have any luck.  $ uname -r; lsusb; lspci -nnk | grep -iA2 net; rfkill list all;  hciconfig -a; dmesg | egrep -i 'blue|firm' 4.10.0-38-generic Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 8087:0a2b Intel Corp.  Bus 001 Device 003: ID 03eb:8ab3 Atmel Corp.  Bus 001 Device 002: ID 04f2:b59c Chicony Electronics Co., Ltd  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 02:00.0 Network controller [0280]: Intel Corporation Wireless 8260  [8086:24f3] (rev 3a) Subsystem: Intel Corporation Wireless 8260 [8086:0110] Kernel driver in use: iwlwifi 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no hci0:   Type: BR/EDR  Bus: USB     BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0     DOWN      RX bytes:0 acl:0 sco:0 events:0 errors:0     TX bytes:6 acl:0 sco:0 commands:2 errors:0     Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00     Packet type: DM1 DH1 HV1      Link policy:      Link mode: SLAVE ACCEPT   [    0.178489] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored [    1.951585] [drm] GuC firmware load skipped [    2.973757] Bluetooth: Core ver 2.22 [    2.973768] Bluetooth: HCI device and connection manager initialized [    2.973770] Bluetooth: HCI socket layer initialized [    2.973772] Bluetooth: L2CAP socket layer initialized [    2.973775] Bluetooth: SCO socket layer initialized [    2.982065] Bluetooth: HCI UART driver ver 2.3 [    2.982066] Bluetooth: HCI UART protocol H4 registered [    2.982067] Bluetooth: HCI UART protocol BCSP registered [    2.982067] Bluetooth: HCI UART protocol LL registered [    2.982068] Bluetooth: HCI UART protocol ATH3K registered [    2.982068] Bluetooth: HCI UART protocol Three-wire (H5) registered [    2.982097] Bluetooth: HCI UART protocol Intel registered [    2.982108] Bluetooth: HCI UART protocol Broadcom registered [    2.982109] Bluetooth: HCI UART protocol QCA registered [    2.982109] Bluetooth: HCI UART protocol AG6XX registered [    2.982109] Bluetooth: HCI UART protocol Marvell registered [    3.049076] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8000C-26.ucode failed with error -2 [    3.049086] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8000C-25.ucode failed with error -2 [    3.049092] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8000C-24.ucode failed with error -2 [    3.049692] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8000C-23.ucode failed with error -2 [    3.050693] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8000C-22.ucode failed with error -2 [    3.057378] iwlwifi 0000:02:00.0: loaded firmware version 21.302800.0 op_mode iwlmvm [    5.032187] Bluetooth: hci0 command 0xfc05 tx timeout [    5.032189] Bluetooth: hci0: Reading Intel version information failed (-110) [    7.048439] Bluetooth: hci0 command 0xfc05 tx timeout  [    7.048440] Bluetooth: hci0: Reading Intel version information failed (-110) [    7.060257] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [    7.060258] Bluetooth: BNEP filters: protocol multicast [    7.060260] Bluetooth: BNEP socket layer initialized


Today my teacher ask -- What the difference in CLR and JVM. I was thinking a long time and I answered only one thing -- JVM supports more platforms. He said that isn't what he wanted hear from me. Have you any ideas ?


I made it my buddy and I have 106 candies, now it says I have to walk my buddy 20 more km.   So I removed my buddy and replaced it with something else and it still would not evolve, can someone help?


With Darth Vader's famous line "join me, and together we can defeat the Emperor". Even if he did end up defeating the Emperor, could he control the Empire? Does he have enough political power? or would the Imperial Senate elect a new head.


I'm new in c#.  I have read many examples regarding yield keyword but still don't understand the usage,so i have created an example to as you help me understand it.  Here is class which returned using yield:  public  IEnumerable<int> returnWithYeil() {     List<int> testList = new List<int> {5,6,7,8,9,10 };                         foreach (int i in testList)     {         if (i > 6)         {             yield return i;         }     } }   here i call it:   foreach (var number in cls.returnWithYeil())         Console.WriteLine(number.ToString());   here is a method without using yield :  public IEnumerable<int> returnWithoutYeiled() {     List<int> testList = new List<int> { 5, 6, 7, 8, 9, 10 };     List<int> temp = new List<int>();     foreach (int  item in testList)     {         if (item > 6)         {             temp.Add(item);         }     }      return temp; }   here i call it:  foreach (var number in cls.returnWithoutYeiled())         Console.WriteLine(number.ToString());         Console.ReadLine();


Ownership of .Xauthority transferred to root

Somehow, while playing around with LightDM and Webkit Greeter, the ownership of the .Xauthority file in my home dir was given to the root user and I couldn't login because I hadn't the privilegues to lock the file.  I was able to regain ownership of the file and I could login again. (After several hours of reinstalling LightDM and it's greeters)  So now everything's working fine again. But I'd like to know how this happened. Is this a bug in LightDM or Webkit Greeter or something else?


Why does \foreach \x in {0,1,...,0}{} perform two iterations (instead of one)?

See the following MWE to understand what I mean better.  \documentclass[preview,border=12pt]{standalone} \usepackage{pgffor,multido} \begin{document} \section*{foreach} \foreach \ix in {0,1,...,3}{%     \foreach \iy in {0,1,...,\ix}{(\ix,\iy)\ }\endgraf}  \section*{multido} \multido{\ix=0+1}{4}{%     \multido{\iy=0+1}{\the\numexpr\ix+1\relax}{(\ix,\iy)\ }\endgraf} \end{document}     Why cannot \foreach \x in {0,1,...,0}{} discharge the second iteration?


Single person answer more than once for a question

Recently I encountered the scenario in which the same person posted more than one answer on a question. I wondered and checked, and it's indeed possible, with a single warning showing up. But I was curious whether there are any restrictions on such answers, or implications of answering like that. Moreover, what is the reason for allowing that in the first place, since the user can edit the answer?


Allow an accepted answer to become unstuck after it is heavily downvoted

Background Accepted answers are useful to show which answer helped the OP the most and are likely to be helpful to others; therefore they show at the very top of the list of answers; irrespective of the sort order or the votes on the accepted answer. This is usually has a good effect; showing the OP's favourite answer followed by the communities most upvoted answer (probably two very good answers) at the top. However this can have a slightly strange effect when the community is highly against the accepted answer and downvotes it heavily. In addition to having a (strongly believed to be) wrong answer first it also turns grey; leading to an odd visual effect of something that looks like the top answer being difficult to read and looking like a footnote. For example , they're wrong, everyone knows they're wrong and yet they sit at the very top of each of their questions. Their authors can't even correct the situation because accepted answers can't be deleted. Reasoning Ultimately the sort order isn't for any political reasons; it is to show you what is likely to be helpful first. The accepted checkmark is a strong indication that an answer will be useful, on the other hand a negative score is an indication that an answer is unhelpful; at some point the downvotes should win. Proposal When an accepted answer is sufficiently downvoted to turn grey ( <=-3 ) then it loses its accepted answer privileges to be at the top of the answers list as the community is clearly strongly against it. This avoids the mixed message of putting it at the top (saying its important) and marking it grey (saying its unimportant). What I’m not proposing I'm not proposing removing its check mark or in any way undoing its accepted answer status, it was accepted by the OP and we shouldn't mess with that. Related proposals  has a similar thrust but seems to be saying that an answer with downvotes, even if it has an overall positive score should not be at the top; that seems slightly mad and I'm not proposing that.


Is the set $I \times I \subset \mathbb{R}^2$, where $I = \mathbb{R}\setminus \mathbb{Q}$ path connected? It seems like it could be. Consider the path $\gamma : (0,1) \to \mathbb{R} \times \mathbb{R} $ given by $\gamma(t) = \left(t, (1 - t^3)^{\frac{1}{3}}\right)$. Fermat's last theorem guarantees $\gamma((0,1)) \subset I \times I$. Thus, $\gamma$ is a path of non-zero length contained in $I \times I$. Perhaps paths like $\gamma$ could be glued together to connect any two points of $I \times I$? Edit As has been pointed out below, it is not the case that $\gamma((0,1)) \subset I \times I$. Clearly $\gamma(q) \in \mathbb{Q} \times \mathbb{R}$ when $q \in \mathbb{Q}$. Fermat's theorem only guarantees that $\gamma((0,1)) \subset \mathbb{R} \times I$. I had in mind the arc given implicitly by the equation $x^3 + y^3 = 1$ for $x,y \in (0,1)$. While this arc will be a subset of $I \times I$, it is in fact totally disconnected.


How to Evaluate $\int e^{2x}\sin(3x)\ dx$?

Integration by parts - unless I'm not thinking straight - doesn't seem to help here.. If I pick either of the functions $e^{2x}$ or $\sin(3x)$ to be $u$ or $dv$, they don't change to anything easier... $e^{2x}$ stays in the form $e^x$ and $\sin(3x)$ flip-flops between $\sin(3x)$ and $\cos(3x)$, neglecting the constant that gets introduced.  So how can I approach solving this? $u$-substitution doesn't seem to be something I can use either.


Why, still in modern GUI-based Linux distros, is it common to use the command line?

Is the command line a popular choice thing, or do I have something wrong here?  In modern Linux there's dozens of fresh, robust, 3-D rendered GUIs, graphical-based APIs, and desktop interfaces that could easily implement the commands entered in to the command interpretor text-based UI on the GUI through a more robust featured program that encompasses GUI elements better.  What I am trying to say is, why is the command-line still so popularly used in 2013?  I mean I can agree that before both the memory in computers was so minimal that a fancy GUI would be starving the main memory, but nowadays memory DOES come cheap, GUIs are 3-D, we have mobile power machines getting better every day so to speak, so why are we still punching commands in to interpretor parsing terminal UI emulations?  Why isn't there a more robust and graphical way to implement the commands, only through a more modern GUI?  For example, how about "ls" or "list" as a button that will generate a table view of data, or "umount" implemented in a button that generates a table view of current mount points?  Overall, why doesn't a more modern implementation of the command interpretor come in to play, featuring the exact same control and capabilities just in a more convenient decor?  PS: I should add this here as well ... I'm not saying every command should be implemented with a GUI-based program with fancy widgets and such. I'm just saying that I figured we'd have a makeover of the command-line, or maybe that some ideas can be better expressed, optimized, managed, or cycled through easier with visual aspects than just "words". No means to start an argument, but to find out why nothing has diverted this way over so many years and advancements of graphics in operating systems/software.


The energy of a photon and gravitational red shift

The general formula for gravitational red shift is given by: $$ \newcommand{\p}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\f}[2]{\frac{ #1}{ #2}} \newcommand{\l}[0]{\left(} \newcommand{\r}[0]{\right)} \newcommand{\mean}[1]{\langle #1 \rangle}\newcommand{\e}[0]{\varepsilon} \newcommand{\ket}[1]{\left|#1\right>} \f{\omega_r}{\omega_e} =\f{p_\nu(r)V^\nu(r)}{p_\mu(e)V^\mu(e)}$$ where $p_\nu(r)$ represents the 4-momentum of the photon at the receiver, $p_\mu(e)$ is its four momentum of the photon at the emitter, $V^\nu(r)$ and $V^\mu(e)$ represent the 4-velocities of the emitter an reviser respectively.    This formula holds because  $$E(r)=p_\nu(r)V^\nu(r)$$ where $E(r)$ is the energy as measured by someone moving with the receiver (and analogous for the emitter). I can see that this equation hold true if both the emitter and receiver are in a locally inertial frame (i.e. free fall) since here the laws of special relativity must hold. However, I cannot see by what argument it is true for the receiver and emitter in arbitrary motion.  Thus what argument can be use?  (A source would be helpful)


Per , using SVN 1.5, reintegrating a branch multiple times is problematic, and should be avoided.  There has been some rumbling to the effect that, "This is a known issue, and should be fixed in SVN 1.6." Was that the case? Is it fixed? Can I reintegrate multiple times?


Resistance between two points in an infinite metal sphere/cube

Let's imagine that we have a tridimensional metal object of infinite size, and decide to calculate the resistance between two arbitrary points. How would we go about doing this?  I have thought of two possibilities for calculating this, the first one being an adaptation of the conductivity (S/m) using the Pythagorean theorem to find a distance and isolating the resistance from there, treating it like we would treat an electrolytic liquid.  The second possibility I have been thinking about would be a 3-dimentional adaptation of the infinite-resistors problem (which I have only seen in 2d).  Would one of these methods result in giving a decent approximation, or would another method give better results?


I've got a table with a few columns, and for each row I want the maximum:  -- Table: +----+----+----+----+----+ | ID | C1 | C2 | C3 | C4 | +----+----+----+----+----+ |  1 |  1 |  2 |  3 |  4 | |  2 | 11 | 10 | 11 |  9 | |  3 |  3 |  1 |  4 |  1 | |  4 |  0 |  2 |  1 |  0 | |  5 |  2 |  7 |  1 |  8 | +----+----+----+----+----+   -- Desired result: +----+---------+ | ID | row_max | +----+---------+ |  1 |       4 | |  2 |      11 | |  3 |       4 | |  4 |       2 | |  5 |       8 | +----+---------+   With two or three columns, I'd just write it out in iif or a CASE statement.  select ID   , iif(C1 > C2, C1, C2) row_max from table   But with more columns this gets cumbersome fast. Is there a nice way to get this row-wise maximum? In R, this is called a "parallel maximum", so I'd love something like  select ID   , pmax(C1, C2, C3, C4) row_max from table


How to Create a single page within a module and set page variables?

I create a page within my custom module with the following code:  function mymodule_menu(){     $items['product-detail'] = array(         'title' => t('Product detail'),         'page callback' => '_mymodule_product_detail',         'variables' => array('var1' => "Hello World Attempt #1"),         'type' => MENU_CALLBACK,         'access callback' => TRUE,      );   function _mymodule_product_detail(){       // global $var1 = "Hello Workd Attempt #3";       return array('variables' => array("var1" => "Hello World Attempt #2") , '#markup' => '
This is some markup content displayed correctly in the page
');  } // function   It renders the template, sets the title and display the markup (content of the page). However, I would like to fill some variables defined in the page.tpl.php and I don't know how to send these parameters, I tried with the variables key in the code but nothing is written. I want to display the message "Hello World Attempt #?" in the place in page.tpl.php where I have the code <?php if(isset($var1)) print $var1; ?>  I have been able to reach my goal with the following code, but using GLOBAL, which is not adequate:  function mymodule_preprocess_page(&$variables) {    global $var1; if(isset($var1) && $var1 != "") $variables["var1"] = $var1;  }   The global $var1 is set to $var1 = "HELLO WORLD Attempt #3" in the _mymodule_product_detail() function above (lines commented).


Can I install Ubuntu Phone on Galaxy S II using some Nexus image?

There is a post at  where you can read about the process installation for Ubuntu Phone on Galaxy Nexus (some models). But, is possible do this on a Galaxy S II? Thanks for your time. Sergio.


I'm trying to label visited countries in a world map shapefile, what is wrong with my rule :   if( "Visited" = 'yes', "NAME", NULL)


I need a guide on the use of the script to install Ubuntu on my ARM Chromebook

, mentioned , in  - but I need instructions on how to use it!  Edit in Re: to comment/duplicate marks.. Unfortunately that script is the only one I know of, and it isn't for 13.10 (Assuming that version works on ARM procs).  THIS IS NOT A DUPLICATE, PLEASE GO BUY YOURSELVES SOME READING COMPREHENSION, KTHXBAI


Cannot use tall curly brackets with array

I tried the other posts here on the following problem, but they don't work for this equation. I have the following:  \begin{equation}      \psi(x)=\frac{1}{2\pi i}\int_{\partial\gamma_r}\left\{\frac{1}{\mu}\int_{-\infty}^{\infty}R(x,t;\mu)[\psi^{\prime\prime}(t)+q(t)\psi(t)]dt\\      -\int_{-\infty}^{\infty}R(x,t;\mu)\psi(t)dt \right\}d\mu \end{equation}   however, as you can see the tall curly brackets only work without array, but the formula is too long. I then try with array, but it fails to work:       \begin{equation} \begin{array}{cc}      \psi(x)=\frac{1}{2\pi i}\int_{\partial\gamma_r}\left\{\frac{1}{\mu}\int_{-\infty}^{\infty}R(x,t;\mu)[\psi^{\prime\prime}(t)+q(t)\psi(t)]dt\\      -\int_{-\infty}^{\infty}R(x,t;\mu)\psi(t)dt \right\}d\mu \end{array} \end{equation}   How can this be made so it looks correct?  Thanks


How do I call js function once everytime something happens

I have a function that I need to be called every time when my screen width is 1240px. What I mean is, for example, if I resize from 1300px or more to 1200px or less and as soon as it passes through 1240px my function should be called once. Same goes to, for example, if I resize from 1200px or less to 1300px or more and as soon as it passes through 1240px my function is being called once again.  that's what I tried:  function toggle() {     toggle_time = setTimeout('toggle()', 1);     if (document.body.offsetWidth<=1240) {         myFunction();     }     if (document.body.offsetWidth>=1240) {         myFunction();     } }   But it will call my function always and every millisecond what is wrong. Any answer is appreciated. Thanks !


How to install Windows 10 and Ubuntu 20.04.2 to Lenovo L340?

I would like to make my computer dual boot. I saw from Lenovo Setup utility that boot mode is UEFI so I need to make my bootable USB on GPT style. So how can I burn Windows 10 bootable usb on Ubuntu 20.04 with GPT style?


Creating points based on distance and bearing from survey point using QGIS?

I am plotting witness tree data to calculate pre-settlement tree density. I have a shapefile with points along section lines (square miles) at each half mile. I am making another table that contains tree data - distance, bearing, and diameter - related by survey point to the existing shapefile attribute table. Is there a way to create points on the map for the trees based on the distance and bearing from each survey point?   I'm not necessarily asking for a detailed set of instructions (although if anyone wishes to, I'd be grateful) but rather just if it's possible and a couple key words to continue searching how to do it.


Adobe Air error when installing Scratch 2

I installed successfully Adobe Air on Ubuntu 16.04 64bit. Nonetheless I encountered a problem. When I try to install Scratch 2 I get this message:  Sorry, an error has occurred. The application could not be installed because the file installer is damaged. Try obtaining a new installer file from the application author.  I don't understand where is the problem, Can you help me?


Is there a way to use Caps/Numlock led for HD activities?

My laptop has not a hd activity led indicator. So, how could I use some other led (such as my keyboard NumLock or Capslock one) to blink when hd has some activity?  Thanks in advance!  OS: Linux Ubuntu 16.04 Toshiba Satellite 4k


SED multiline recursive find and replace

I have a large number of sites with the same bit of php inserted in all files that contain footer in their filenames.  //###==### malicious code //###==###   How to use SED or another command to remove all these in all files?


How should I run stripped cable through conduits?

I have a 6/3 NM-B cable that is to be run through a Southwire Ultratite conduit to an external outlet for a generator.  I plan to strip the cable prior to threading through the conduit: 1. for ease of passage; 2. for thermal issues. Just wondering what is the protocol for where the stripped section should start - just outside the conduit, or just inside? Also, the Ultratite fitting at the back of the outlet box has no provisions for clamping the wires in place.  Can I presume then, that in this instance, clamping is not necessary as long as the wire is firmly anchored before entering the conduit run?


Windows username has been changed. But it hasn't. But it has

Windows 7 Pro 32 bits. I have changed the name of an account (that has admin rights) via control panel, and in the login screen it shows the new name. So far, so good.   However, when I start some software, it auto-fills the username field with the old account name, and errors when I fill it with the new name, saying the account does not exist.   Hm, weird. Upon further ispection, I find out that:    The folder name in c:\users is still the name of the old account (but I suspect this is by design, to prevent malfunction of some poorly programmed software that might have it hardcoded somewhere) net user is still listing the old name When I clicking on a folder -> properties -> sharing -> advanced sharing -> checkbox "share folder" -> permissions -> add -> advanced -> objects -> checkbox "users" -> OK -> locate now (uh, what was I even doing?) lists the old account name.


Why "I would like to" instead of "I will like to"

After trying to explain to my friend that he was misusing "I will like to" in place of "I would like to" and showing him  (I apologize for asking again), he still argues he is correct. He argues he is correct regardless of my "American" english despite me explaining that "will" implies, you can, and WILL DEFINITELY do something. I lack the knowledge to properly counter his argument:  I would have loved to do that(past) I will love to do ( future )


Recommendations for more than one tempdb file

I would like to split tempdb into two files with same size, to improve performance of the database.  I wonder if these two data files can be on the same disk, separately from the logs and users data files?