Solve the IVP $\vec{y'}=A\vec{y}\ $ given $\ (A-I)\vec{v}\ $ and $\ (A-I)^2\vec{v}$

Let $A=\begin{pmatrix}  5 & -2 & -7 \\  -4 & 3 & 4 \\  6 & -3 & -8   \end{pmatrix} $ and $\vec{v}=\left(\begin{array}{c} 2 \\ 1 \\ 1 \end{array}\right)$.   The first part of the problem asked to calculate $(A-I)\vec{v}$ and $(A-I)^2\vec{v}$, which I calculated to be $\left(\begin{array}{c} -1 \\ -2 \\ 0 \end{array}\right)$ and $\vec{0}$ respectively.   The question then asks to solve the initial value problem $\vec{y'}=A\vec{y}$ with $\vec{y}(0)=\vec{v}$.  I don't understand how to use what we calculated in the earlier part to help to solve this initial value problem. I determined from first principles that the eigenvalues are $\lambda=1,1,-2$ and I know that the solution of our initial value problem will take the form $\vec{y}=e^{tA}\vec{v}\ $, but I don't quite understand the significance of $(A-I)\vec{v}$ and $(A-I)^2\vec{v}$.


My first impression is that Wine is a simulated Windows environment which uses free (and presumably open source) libraries as an alternative to Microsoft's proprietary libraries. Those libraries produce the same input and output, yet use alternative means to process the data. This would explain why there is very little performance hit.  Is my impression of WHAT exactly Wine is correct?  Has anyone noticed a performance loss from Wine (relative to actual Windows)?


In Ubuntu 16.04, kworker has a very high CPU usage. It is almost 80% all time and the fan runs at high speed and makes a loud noise. I do all commands in this  but that wasn't useful. Now what I do?


Substitute for annatto seeds in Achiote Paste

I am making Achiote Paste and need a substitute for the annatto seeds.  Recipe calls for 1/4 cup of annatto seeds.  Can I substitute tumeric, saffron or paprika and if so how much should I use?


Is it possible to enter the UK with a child on an Accompanied visa and then leave alone?

I was supposed to leave for Scotland with a group of children for a course tonight, but upon reaching the airport I was told that my visa was an Accompanied Child visa, and I could not travel without my parents. I am fifteen years old.  Is it legal for me to fly into the UK with a parent, and then have the parent fly back, leaving me there? Will I have any trouble coming back to India?


How do I correctly add jQuery UI widgets?

Im using Drupal 7, which ships with jQuery UI. I need to have  Accordion only on the homepage. jQuery will not just let me download Accordion and then use drupal_add_js().    Do you have any suggestion?


Use early 2009 20" iMac as external display for 2015 rMBP

I wanted to use a mini display-port cable then use "target display mode" to make the iMac an external display, but I just read that early 2009 iMac's don't have target display mode as a feature.  Anybody knows of a solution?


How to use function with template, When it declare in .hpp file and implementation in .cpp file

I want to declare function, with template value, in header file. And implementation it in cpp file and call the function from main. But i want to do it without using class. How do i do it?  Thanks  temp.hpp :  #ifndef TEMP_HPP #define TEMP_HPP template<typename T> void show( T a);         #endif /* TEMP_HPP */   temp.cpp :  #include <iostream> #include "temp.hpp" template<typename T> void show( T a)  {      std::cout << "a:" << a << std::endl; }   main :  #include <iostream> #include "TextTable.h" #include "temp.hpp"  int main() {     int a = 5;     float b = 2.5;     show(a);      return 0; }


Aligning the right parts in multiple \begin{cases}

Is there an intelligent way to left-align the parts right of & of the two cases environments shown below (if x >= 0, otherwise, if y < 0, otherwise). I wonder if there is a better way than using manual spaces:  \begin{align*}  u(x) &=   \begin{cases}    0        & \text{if } x \geq 0 \\    1        & \text{otherwise}   \end{cases}   \\  \tau &=   \begin{cases}    a+b+c+d  & \text{if } y < 0 \\    1        & \text{otherwise}   \end{cases} \end{align*}


Why the Lie algebra of $\mathrm{SL}(2, \mathbb{C})$ are traceless matrices?

Let $\gamma(t)$  be a curve on a manifold $M$ and $f$ a real function. We define the vector $V$ as the operator $V\cdot f=\frac{d}{dt}f(\gamma )$ Now let $U$ be the set $$ U:=\left\{\left(\begin{array}{ll} a & b \\ c & d \end{array}\right) \in \mathrm{SL}(2, \mathbb{C}) \mid a \neq 0\right\} $$ and define the map $$ \begin{array}{l} x: \quad U \rightarrow x(U) \subseteq \mathbb{C}^{*} \times \mathbb{C} \times \mathbb{C} \\ \left(\begin{array}{ll} a & b \\ c & d \end{array}\right) \mapsto(a, b, c) \end{array} $$ Te Lie algebra $\mathcal{L}(G),$ of a Lie group is defined by $$ \mathcal{L}(G):=\left\{X \in \Gamma(T G) \mid \forall g, h \in G:\left(\ell_{g}\right)_{*}\left(\left.X\right|_{h}\right)=X_{g h}\right\} $$ which can be  proved to be isomorphic to the Lie algebra $T_{e} G$ with Lie bracket $$ [A, B]_{T_{e} G}:=j^{-1}\left([j(A), j(B)]_{\mathcal{L}(G)}\right) $$ induced by the Lie bracket on $\mathcal{L}(G)$ via the isomorphism $j$ $$ \left.j(A)\right|_{g}:=\left(\ell_{g}\right)_{*}(A) $$ Any $A \in T_{\left(\begin{array}{ll}1 & 0 \\ 0 & 1\end{array}\right)} \mathrm{SL}(2, \mathbb{C})$ can be written as $$ A=\alpha\left(\frac{\partial}{\partial x^{1}}\right)_{\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right)}+\beta\left(\frac{\partial}{\partial x^{2}}\right)_{\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right)}+\gamma\left(\frac{\partial}{\partial x^{3}}\right)_{\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right)}, $$ then we can show that $$j\left(\left(\frac{\partial}{\partial x^{1}}\right)_{\left(\begin{array}{l} 1 & 0 \\ 0 & 1 \end{array}\right)}\right)=x^{1} \frac{\partial}{\partial x^{1}}-x^{2} \frac{\partial}{\partial x^{2}}+x^{3} \frac{\partial}{\partial x^{3}}$$ $$j\left(\left(\frac{\partial}{\partial x^{2}}\right)_{\left(\begin{array}{l} 1 & 0 \\ 0 & 1 \end{array}\right)}\right)=-x^{1} \frac{\partial}{\partial x^{2}}$$ $$j\left(\left(\frac{\partial}{\partial x^{1}}\right)_{\left(\begin{array}{l} 1 & 0 \\ 0 & 1 \end{array}\right)}\right)=x^{2} \frac{\partial}{\partial x^{1}}+\frac{1+x^2x^3}{x^1}\frac{\partial}{\partial x^{3}}$$ and so $$  j(A)=(\alpha x^1+\gamma x^2)\left(\frac{\partial}{\partial x^{1}}\right)+(-\alpha x^2+\beta x^1)\left(\frac{\partial}{\partial x^{2}}\right)+\left(\alpha x^3+\gamma\frac{1+x^2x^3}{x^1} \right) \left(\frac{\partial}{\partial x^{3}}\right) \tag 1 $$ On the other hand we can show that by other method  that the lie algebra of $\mathrm{SL}(2, \mathbb{C})$ consist of traceless matrices. My question is how can we identify $(1)$ with a traceless matrix?


I've gotten my union statement to work the way I want it, but I cant seem to get it to order the 2 tables without erroring out.  $query = mysql_query("SELECT userid_2 FROM messages  WHERE userid_1='$dbid' UNION SELECT userid_1 FROM messages WHERE userid_2='$dbid'");   and I'm trying to incorporate ORDER BY date into it but it doesn't seem to work.


I have an android app that l am busy with but ran into a small problem. I am trying to refresh/restart my fragement after saving data by the use of the save button but l am getting the following err:     Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setNextAnim(int)' on a null object reference   here is my code in the button:      save1.setOnClickListener(new View.OnClickListener(){     @Override     public void onClick(View v) {         //Util.displayMessage(getContext(),"Saving");         String textToStore = contact1.getText().toString();         String textToStore2 = contact2.getText().toString();         String Url = "/gps/savetaxiroutes/"+imei+"/"+textToStore+"/"+textToStore2 +"/"+ sendNotification.toString()  ;          AllContacts fragment = (AllContacts)                  getFragmentManager().findFragmentById(R.id.thelayout2)          getFragmentManager().beginTransaction()                 .detach(fragment)                 .attach(fragment)                 .commit();         mPopupWindow.dismiss();     }     });   this is how the code is structured in my save button method.


I have four points, one in each quadrant. How to prove whether it may be a parallelogram. What formula should I use?


How to uninstall one ubuntu partition from a dual boot ubuntu system?

I have a HP ENVY 15 j037-el with Ubuntu 15.04 installed alongside Ubuntu 16.10. I would like to delete the 15.04 partition without risking to break the booting process: that happened me once and I wouldn't like to repeat the dreadful experience of fixing the grub via command line again.  The partitions I can see with disks are:   /dev/sda1, EFI system, FAT32, size 537 MB /dev/sda4, root linux partition (x86_64), Ext4 (v 1.0), size 730 GB /dev/sda2, linux filesystem, Ext4 (v 1.0), size 257 GB /dev/sda3, Swap linux, Swap (v 1), 13 GB    Ubuntu 15.04 is installed on /dev/sda4 and Ubuntu 16.10 on /dev/sda2.  Thank you for your help.  Edit: I already followed the instructions given for question , specifically the part about the OS-Uninstaller, but as I already wrote, I had to manually fix the grub to get my laptop to boot again. I would like to know how I can safely remove the partition without risking to compromise boot.


$X$ and $Y$ have the same cardinality if and only if there exist a bijection from $X$ to $Y$?

My textbook says "Let $X$ and $Y$ be sets. We say $X$ and $Y$ have the same cardinality if there is a bijection $f: X \to Y$."   I was wondering why the text does not say "if and only if."  A bijection implies same cardinality, but does cardinality imply bijection?  I would imagine so.


How can you show that $\binom {n}{7}=\sum_{k=7}^n \binom {k-1} {6}$?   This counts the number of subsets from $\{1,2,3,\dots,n\}$ having size $7$. To me, the summation part counts subsets of size $6$. Can someone please tell me how this is done?  P.S. I don't know how to edit in the proper way.


Unclear how to login to (or JOIN) a stack exchange site I haven't joined yet

I am logged in on my android app.  I followed a link from reddit to an apple.stackexchange.com question and I wanted to cast a vote.  A slide out red message appeared stating:     The account associated with the access_token does not have a user on the site   Is there a way to create a user on a site from the app? Should it be easy to get to following a no user on site error?


Why are all snaps being mounted and listed as block devices or partitions for Ubuntu 18.04?

As of Ubuntu 18.04 running lsblk shows 16 snap loops (2-3 times for each snap). The question is, why are they being listed as results for lsblk, fdisf-l, and blkid?    It creates a lot of clutter from the actual disks drive partitions I need to see, namely /dev/ partitions. I know a purported duplicate of this question exists, but it only asks why three loops are being listed per snap. I want to know why these snaps are being listed in the first place, and the purported duplicate does not answer this (perhaps those marking this as duplicate could help me by explaining why it is a duplicate). Technically, they qualify as file systems (which I neither created nor asked for), but they are getting in the way of the information output for the /dev/ partitions I am interested in. This becomes a problem when fdisk -l outputs a three page+ list filled mainly with snaps.  The output of a recent (1 week old) Ubuntu install and I have not installed any snaps:    $ lsblk   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT   loop0    7:0    0  14.5M  1 loop /snap/gnome-logs/37   loop1    7:1    0   2.3M  1 loop /snap/gnome-calculator/170   loop2    7:2    0  86.6M  1 loop /snap/core/4486   loop3    7:3    0  86.6M  1 loop /snap/core/4650   loop4    7:4    0   1.6M  1 loop /snap/gnome-calculator/154   loop5    7:5    0  14.5M  1 loop /snap/gnome-logs/34   loop6    7:6    0   3.3M  1 loop /snap/gnome-system-monitor/36   loop7    7:7    0   2.3M  1 loop /snap/gnome-calculator/178   loop8    7:8    0    13M  1 loop /snap/gnome-characters/101   loop9    7:9    0   3.7M  1 loop /snap/gnome-system-monitor/45   loop10   7:10   0 139.5M  1 loop /snap/gnome-3-26-1604/64   loop11   7:11   0   140M  1 loop /snap/gnome-3-26-1604/59    loop12   7:12   0   3.7M  1 loop /snap/gnome-system-monitor/41   loop13   7:13   0    21M  1 loop /snap/gnome-logs/25   loop14   7:14   0  12.2M  1 loop /snap/gnome-characters/69   loop15   7:15   0    13M  1 loop /snap/gnome-characters/96   sda      8:0    0 298.1G  0 disk   ├─sda1   8:1    0   512M  0 part /boot/efi   └─sda2   8:2    0 297.6G  0 part /   sr0     11:0    1  1024M  0 rom     (supplemental screen capture of above text):     My snap list shows 6 results:       core   gnome-3-26-1604   gnome-calculator   gnome-characters   gnome-logs   gnome-system-monitor     Meanwhile, gnome-disk-utility shows nothing at all for snaps, only showing my HDD and optical drive.    It won't be very efficient if every installed snap gets listed as a block device (2-3 times each to add). Should I expect future updates to deal with this?  Edit: fdisk-l also dumps out a very long list with 16 instances of these "disk loops" (Disk /dev/loop0, Disk /dev/loop1, etc., each with details which I won't show here because it's too long). This can't be intended behaviour, can it? blkid also lists 16 loops, as TYPE="squashfs". At least parted -l works as expected, only outing my actual disk partitions.    I just tested this, and installing more snaps does add more to the lsblk output. Therefore, fdisk, lsblk, blkid could have potentially huge output lists, according to the number of snaps available, and installed.


Is the duplicate question flag being overused?

Within the Stackoverflow community (and probably others) it has become common place for a question to be marked as a duplicate if it has the same or similar answer to another question.   Do people agree with this? In my opinion, the two questions should be compared to ascertain whether it's a duplicate, not the answers.   The duplicate question flag seems to have become more like a signposting/reference flag. If someone has a question, they are highly unlikely to search for the answer, they will search for the question. Is this not therefore promoting the wrong behaviour?


Mesh A changes after joining it to mesh B

so im tring to make my first character and everything was fine until i made the hands and when im done with it i tried to join it to the rest of the body (Ctrl+j) but whenever i do it be smoother/changes the color or whatever you want to call it  (i applied all of the modifiers before so there are none)  so i got 2 questions  1. how can i fix it?  2. why it changes\what is going on?  Before  After


Using xfreerdp with variable IP/hostname

I got a very simple alias on my bash:  alias xfreerdpp='xfreerdp /v:ip_address /u:username /d:domain /p:password /size:1024x768 /clipboard /cert-ignore &'   All I want to do is to make the ip_address a variable so that I can type xfreerdpp xxx.xxx.xxx.xxx, passing ip_address as an argument.


I am getting ready to migrate my data collection (using arduino Yun) from my local virtual server to a live website.  Below are the two files I am using to post and receive data.  There is no need for any human interaction with the data until after it is loaded into the data base. More than one device will be uploading data which why I thought to use the receiver.php file.  I wonder if someone would be willing to help educate me on a secure way to implement the below.  I am not concerned with someone intercepting the data, just don't want someone messing with my database.  post.py (on the Arduino Yun)  #!/usr/bin/python  import sys import sqlite3 as sqlite import requests import json  url = 'http://xxx.xxx.x.x/reciever.php' headers = {'content-type': 'application/json'}  def dict_factory(cursor, row):     d = {}     for idx, col in enumerate(cursor.description):         d[col[0]] = row[idx]     return d  con = sqlite.connect('/mnt/sda1/sensor_flow.db') con.row_factory = dict_factory cur = con.cursor()  cur = con.execute("SELECT * FROM data_log") recs = cur.fetchall() data=dict(payload=json.dumps(recs)) #print data con.commit() con.close()  response = requests.post(url, data=dict(payload=json.dumps(recs)))  print response   Receiver.php (on the Server)  <?php     $servername = "localhost";     $username = "root";     $password = "";     $dbname = "practice";      $conn = new mysqli($servername, $username, $password, $dbname);     if( $conn->connect_error ) die("Connection failed: " . $conn->connect_error);     $payload_dump = $_POST['payload'];      $payload_array = json_decode($payload_dump,true);      if( is_array( $payload_array ) ){          $queries=array();          foreach( $payload_array as $row ){             //get the data_payload details             $device = $row['device'];             $type = $row['data_type'];             $zone = $row['zone'];             $sample = $row['sample'];             $count = $row['count'];             $time = $row['date_time'];             $epoch = $row['epoch_stamp'];              /*note: we do not need to add the semi-colon here as it gets added later when we implode the array */             $queries[]="INSERT INTO `data` ( `device`, `type`, `zone`, `sample`, `count`, `date_time`, `epoch_stamp` ) VALUES ('$device', '$type', '$zone', '$sample', '$count', '$time', '$epoch')";         }         /*             Previously the below query was being execute on every iteration             ~ because $epoch is now the last one encountered in the array,              the value that is updated in ALL records is as it would have been             previously.         */         $queries[]="UPDATE `data` SET `date_time` = from_unixtime( $epoch ) WHERE date_time = 0;";          $sql=implode( ';', $queries );         if ( $conn->multi_query( $sql ) === TRUE ) {             echo "New records created and updated successfully";         } else {             echo "Error: " . $sql . "<br>" . $conn->error;         }     }     $conn->close();  ?>   If my code has problems could you explain why it is a problem as well?  Thank you advance for any and all help!


Remove method in LinkedList returns a NullPointerException

I am trying to figure out why my Remove method is returning a NullPointerException. I have tested it against numerous scenarios and it seems to be working fine for the most part, but when I tested it against my professors code, I get a NullPointerException:  Against my Driver (this is the output):  List: Hamadi, Salisu, Galo, Ballo,  4 Replacing Galo with Abdullahi List: Hamadi, Salisu, Abdullahi, Ballo,  Removing Salisu from the list List: Hamadi, Abdullahi, Ballo,  List: 65, 21, 42,  Removing 65 from the list List: 21, 42,  List: 1, 3,  Removing 1 from the list List: 3,  List: 25, 3,    All works well until I test the code for my remove method (see below for the method) against my mentors code:  /** Remove a node at the specified index and return its data element.      * @param index The index of the element to remove      * @return The data element removed      * @throws IndexOutOfBoundsException If index is outside the bounds of the list      *       */     public E remove(int index)      {         // TODO: Implement this method         if (index < 0 || index >= size() || size() == 0) {              throw new IndexOutOfBoundsException("Nodes are not within the array");         }         int i = 0;         LLNode<E> currentNode = head.next;          while (i < size) {             if (i == index) {                      System.out.println("Removing " + currentNode.data + " from the list");                     currentNode.next.prev = currentNode.prev;                     currentNode.prev.next = currentNode.next;                      size--;                     return currentNode.data;              }             currentNode = currentNode.next;             i++;         }           return null;     }   Currently, the way I have implemented the removal of a node is to have the node that is being removedfor it's next node to point to the previous node of the removed node and vice versa.  Any input would be greatly appreciated on what I can do to further improve my remove method to prevent (and circumvent) any possible NullExceptionErrors. Thanks!


Splitting proportional/graduated symbols using QGIS

I am currently trying to make a split graduated/proportional symbol map on Classical music composers by country and musical era and I am having trouble with making the symbol in QGIS. I had to make a .csv-table consisting of the totals by country and by era, and I am able to join my this table to a shape file of European countries, but the desired column (totals, representing the total composers of each country from the entire span of all musical eras) from the joined table I want to show represent with the graduated symbol does not show up in the drop down bar on either program. I am able to get the split symbol using the pie graph feature on QGIS, but I still would like to be able to represent size changes of each pie graph showing the total composers from all eras.


If a body begins to collapse, it will form a black hole when its radius is less than the gravitational radius ($r_g$). However, for an observer (stationary in the Schwarschild metric), he/she will observe the surface of the body (which was originally at $r>r_g$) takes infinity amount of time to reach $r_g$ (although it takes finite proper time for the surface to do so). Do I understand correctly?  If so, why we can still find black hole? Isn't that it will take infinite time to form a black hole in our reference system in the universe?


How can I get an enum name from the name of the enum type and an int

From another layer in an application I can get back the name of the enum type and an integer value. How can I use this data to get the string representation of that value for that enum.  For example, if I have an enum:  public enum Cheese {     Edam = 1,     Cheddar = 3,     Brie = 201,     RedLeicester = 1001 }   and the data I have available is   string dataType = "Cheese"; int dataValue = 3;   How can I get the result:  "Cheddar"


By default, theorems (using amsthm) are printed like Theorem 1.1. Is it possible to print them as 1.1. Theorem? I have the following:  \documentclass{article} \usepackage{amsmath, dsfont,   amsthm , enumerate, graphicx, tikz,stmaryrd} \newtheoremstyle{stelling} {\topsep}   % ABOVESPACE {\topsep}   % BELOWSPACE {\itshape}  % BODYFONT {0pt}       % INDENT (empty value is the same as 0pt) {\large\bfseries} % HEADFONT {.}         % HEADPUNCT {5pt plus 1pt minus 1pt} % HEADSPACE {}          % CUSTOM-HEAD-SPEC    \theoremstyle{stelling} \newtheorem{theorem}[subsection]{Stelling}  \begin{document}  \begin{theorem} Some text \end{theorem}  \end{document}


D.Trump was elected president or "a" president

that when we put an article before president (a), we are referring to a specific position, but when we don't put an article, that means we are referring to a general position.      Trump was elected president.    Is president here is a general position?


Is there a safe way to determine how powerful an opponent is?

I'm playing with a DM that usually makes us encounter strong enemies in the middle of nowhere. That's fine since we can choose to fight or not, but the real challenge is determining how strong the opponent is so we don't die a miserable death. If the enemy is a beast, it's fairly easy to determine the encounter's difficulty, but, when it comes to spellcasters, it's hard to determine how difficult they'll be to take in a fight at a glance. I tend to look for items the enemy has for hints, but that's not very effective.  Is there another way (or, at least, a smarter way) to determine an opponent's level or how strong it is?  The party is a human ranger, human paladin, half-elf rogue, and elf necromancer. All are level 5.  Conclusion  First of all, thank you for the comments, questions and advises!! I think RPG is great because of discussions like this one! I came with some conclusions myself after reading everything you guys posted, but there's a background here I think I should share with you guys before start it. Me and my party had this 1-year-long campaign that ended tragically after a silly bar-fight against high-leveled guys we came to encounter and occasionally didn't know their reputation. In fact the DM alerted us about the danger, but it doesn't seemed something deadly.. at a glace. That was fast, and painful. But it was our fault.  Since that episode, I've been trying to be more careful and think before engaging into senseless fights. So I thought it would be helpful to be able to check the level of the threat before we choose to do something (something we see in movies or cartoons when the opponent emanates something like an dark aura...). And after hearing from you guys and talking with our DM I end up concluding it's just not fun to be able to control situations in that way. Like some of you guys wrote above: the best way to approach this "problem" is by role-playing (talking, looking, interacting) and perhaps that's why abilities like Know Your Enemy and Insightful Manipulator are made for more leveled players. Such a way to check the opponent is not as easy as it might look like and that makes sense!  By the way, the threat my party encounter yesterday (the reason why I wrote the question) end up been something beatable! By having the conversation with the NPCs, we decided to fight and that was actually part of DM's plan to make us choose to change the course of the history or not.  Thank you again!


I know how to run a command using cmd = subprocess.Popen and then subprocess.communicate. Most of the time I use a string tokenized with shlex.split as 'argv' argument for Popen. Example with "ls -l":  import subprocess import shlex print subprocess.Popen(shlex.split(r'ls -l'), stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE).communicate()[0]   However, pipes seem not to work... For instance, the following example returns noting:  import subprocess import shlex print subprocess.Popen(shlex.split(r'ls -l | sed "s/a/b/g"'), stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE).communicate()[0]   Can you tell me what I am doing wrong please?  Thx


How to install Google Apps And Services on Lollipop AOSP ROM?

I have a Lollipop AOSP ROM without any Google related service (Google Play is missing also).  To get Google Play working it seems(but I'm not sure) that I need to install:   Google Play apk Google Services apk Google Services Framework Google Login Service   I have also read that I have to convert them into system apps. My device is rooted so it should not be too difficult to convert these apps into system apps, but I have no idea of where I could find the updated version of the needed files. I have only found some tutorial for old kindle devices with an older OS.  Could someone help me to find updated version of needed files for Lollipop 5.1?  Any other solution is welcome.


Aside from the exponential family, where else can conjugate priors come from?

Do all conjugate priors have to come from the exponential family? If not, what other families are known to have/produce conjugate priors?


Running totals for Today in New Notification Bar

I notice we now have running totals in the recent achievements bar for Today. Why not Yesterday and Last 7 days as well?


Smarty: special characters get changed unwanted- utf8

I've data with special characters (french accent grave). When I select with php script and output (print) it looks fine. When I pass to Smarty the characters get changed. My html has follwoing setting:  meta http-equiv="content-type" content="text/html; charset=utf-8" Not sure what's missing or incorrect?  gr, Patrick


Is there a function $f:\mathbb{R}\to\mathbb{R}$ such that $f\circ f\circ f=Id.$, but $f\neq Id.$?

Is there any function $f:\mathbb{R}\to\mathbb{R}$, other than the identity, such that   $$f\circ f\circ f=Id.?$$   That is a pretty simple question, but surprisingly I am not able to say anything about it. If we require only $$f\circ f=Id.,$$ then, there are some answers, like $f(x)=1/x$ and $f(x)=-x$, for example. And if we allow $f$ to be over $\mathbb{C}$, then the original question also has some answers, like $f(x)=e^{2\pi i/3}x$. But none of these generalize to $f:\mathbb{R}\to\mathbb{R}$ such that $f^3=Id.$. Do you have any idea?


suddedenly increased in size of Log files form 32GB to 70 GB

I am not DBA ,but I need to check on the size of database files . my database log files earlier was around 32 GB but from last few days it starts increasing and finally reached to 70 GB . first I thought it was natural , but soon I realized  that I was wrong  .  For shrinking the size of log file ,firstly I used to determine the % of space occupied in log file  by using .          DBCC SQLPERF(logspace)   Result was :- log size(MB) > 70 and Log Space Used > 94%  with             DBCC LOGINFO   I found more than 700 transactions having Status = '2'  After that I took "log as well as full backup"  and run above query again but still got >700  transactions having Status = '2' detached and reattached , but still no difference in size .  Then I went for Shrinking log files and for testing purpose I gave the size 60GB .  Then run following query again      DBCC SQLPERF(logspace)   and result was :- log size(MB) > 66 and Log Space Used =  99.1258%.  Question is : How can I bring the size of log files near to earlier size i.e. around 32 GB or near by and how to keep check on it so that its size does not change dramatically .  ** Recovery Mode :- FULL   Thanks in advance ....


MSSQL Server Upgrade, go for latest or version before that

A dilemma probably faced by quite a few DBAs. Does one upgrade to the latest version, in this case SQL SERVER 2016, or play it safe and upgrade to 2014, which hopefully has most bug fixes in place by now?  I will only be upgrading in Standard Edition and from what I've read there isn't much between 14 & 16 in terms of functionality, enterprise is a different story.  The only things of interest to me at the moment in 2016 are probably the query store features and possibly the tabular BI stuff.  I have read 2016 does use fewer resources and depending on the tasks it executes faster, which is obviously a big bonus.  At the moment I am leaning towards 2016 as opportunities to upgrade are few and far between, just worried about potential bugs and applying them in 24/7 up time environment with no maintenance window.  Would be great to hear if anyone else has faced the same/similar upgrade path, and ultimately what decision they took.  I will probably get a down vote as there is no right answer...but its a question that must be asked a lot..


Finding application that is launching a command window regularly

I have a problem with my Win10 PC where I'm getting regular command prompt windows launching every 15 mins or so, trying to run an app or batch file then disappearing so fast I can't see what was run.   Only started recently and I have not installed any new software, and my Windows defender is up to date so hopefully not a virus.  Also checked the various registry settings for startup apps HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run and Windows startup folder / Task Manager startup, nothing suspicious added.  I get these regular invocations even if there is no application running so its likely something in the background.  Any tips about how to locate what is being launched and by what app/background process?


Cartesian product of embeddings is embedding

Let $M_1,M_2,N_1$ and $N_2$ be differentiable manifolds and $f_1:M_1\to N_1$, $f:M_2\to N_2$ two embeddings which in my literature is defined as an injective, proper immersion and a proper function is a function for which the preimage of every compact set is compact. Now I want to show that $f_1\times f_2:M_1\times M_2\to N_1\times N_2$ is also an embedding.   My ideas:  Well, the injectivity is no problem. To show that it is an immersion I want to calculate $d_{(x_1,x_2)}(f_1\times f_2)$ which is a priori a function from $T_{(x_1,x_2)}M_1\times M_2=T_{x_1}M_1\times T_{x_2}M_2$ to $T_{(f_1(x_1),f_2(x_2))}N_1\times N_2=T_{f_1(x_1)}N_1\times T_{f_2(x_2)}N_2$. Now I am not sure if  $d_{(x_1,x_2)}(f_1\times f_2)=(d_{x_1}f_1,d_{x_2}f_2)$ but if it was, it would be easy to show that it is an immersion. Furhtermore, to show that $f_1\times f_2$ is a proper function, I remebered from my topology class that every second-countable Hausdorff-space is compact if and only if it is sequentially compact and manifolds are second-countable Hausdorff-spaces. Then I took a compact set $K\subset N_1\times N_2$ and choose a sequence $(x_n^1,x_n^2)_{n\in\mathbb{N}}\subset f^{-1}(K)$. I considered taking the image under $f$ of this sequence from which I can choose a convergent subsequence because $K$ is sequentially compact. Then I thought about going back to $(x_n^1,x_n^2)_{n\in\mathbb{N}}$ itself because choosing a subsequence of the image is also choosing a subsequence of the original sequence, but I am not sure if the subsequence, say $(x_{n_k}^1,x_{n_k}^2)_{k\in\mathbb{N}}$, then has to converge in $f^{-1}(K)$.  Can someone please help me?


how to prepare sql statements to avoid sql injections

For learning purposes   This code:   <?php          if (isset($_POST['submit'])) {                 # code...                 $code = $_POST['code'];                 $cname = $_POST['cname'];                 $address = $_POST['address'];                 $email = $_POST['email'];                 $contact = $_POST['contact'];                  $newCustomer = mysqli_query($con,"INSERT INTO `tbl_customer`(`code`, `name`, `address`, `cemail`, `ccontact`) VALUES ('$code','$cname','$address','$email','$contact')") or die(                          '
                             Error! Code is already in use.
'                         );                  echo '
     Success! You inserted a new Customer.
';           }  ?>   is subject to sql injection. I am still learning so can you help me with how to prepare this statement to avoid sql injection? I need some implantation examples that are specific to this use case. please don't refer me to another post.


We have a SaaS application that we need to be highly available. We already have an expensive, well-maintained Hyper-V failover cluster, but today the datacenter where we host that cluster had a five-hour power outage that knocked us completely offline. So now we're wondering if a better approach might be to use servers at two separate datacenters. Assuming we get all the back-end file replication and data replication working between these two sites, we're wondering how to handle the front-end routing -- no wonder how we approach the problem, we always wind up with the load balancer being a single point of failure.  So the question is ... how can we set up load-balancing between two hosting sites such that the load balancer isn't the single point of failure? Is there a way to use two separate load balancers, one at each site? Should we be considering round-robin DNS?


Why do some Unicode text messages crash the iPhone OS?

Recently a new "glitch" has surfaced over the Internet over the last few weeks where if an iPhone user is sent:    effective.        Power            لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ  冗   via iMessage it crashes the phone OS temporarily and force restarts the receiving phone.  Why does this work?


Moving large files with cronjob: What happens if mv still running when next run?

On a Ubuntu 16.04 headless system, I have two directories. I want a cronjob to move every file from directory A to directory B (same partition, same hard drive, same file system etc.). The problem is/might be: The files will be quite large and for some reasons the cronjob has to run quite often, like every minute or so.  So, the following scenario is quite likely: cronjob starts for the first time, finds a big file in directory A, starts moving it to directory B. While the mv process is still running, the cronjob is executed for the second time. Will this cause any problems?  I've found this question and ansers , but I think that's about simultaneously started processes. I hope, there is a way for cronjobs to prevent unwanted behavior.


I have a normal distribution $X$~$N(\mu,\sigma^2)$. Is there an exact value for the mean and standard deviation of $X^2$?  Thanks


Install ubuntu packages to other machine?

I have installed ubuntu 12.04 on my laptop with all the packages. I am finished with it, everything is up and running.   Now i want to install Ubuntu on my desktop but don't want to download all the stuff again and install it one by one. Is there any way to clone my ubuntu from laptop to desktop.


I have a mixamo model (in plum color) who I got a walk cycle for. I need his colors to look exactly like the one behind him, but can't figure out how to do it. The colored model is separate shapes and objects, and so it was easy to assign colors. This new, one Item Mixamo model has got me stumped.


I'm coding a page that shows the user some information from database, the information contains some accents i make the request <input type="text" id="de" value="<?php echo $row->de; ?>" class="input" size="50"/> here he shows problems with charset the word have ( í, ã ) and value shows ( ? ? ) not the word, how can i solve this ? And yes i have <META http-equiv="Content-Type" content="text/html; charset=utf-8">  on my page. Sorry for my bad english.


Draw circuit diagrams with custom shapes?

I want all the benefits of dedicated schematic drawing software but I often don't like the way the diagrams actually look. I know it sounds trivial, but I find it easier to read nicely hand drawn diagrams than all-red wireframe type ones.  Is there a decent piece of software where for example I can customise the shape or colour of opamps/wires/transistors etc?


In python I did this experiment:  In [1]: a = 42  In [2]: b = 42  In [3]: a is b Out[3]: True  In [4]: a = 257  In [5]: b = 257  In [6]: a is b Out[6]: False   Can anyone explain why it shows false for the second time? It looks really odd...


Bike chain is skipping when pedaling with force

I've been having this issue for a few months, and it's getting more and more prevalent. When I'm pedaling with force, particularly when standing, the chain slips, which is annoying, counterproductive, and dangerous. Lately, it will happen I almost every other pump of the pedals. This occurs no matter which gear the bike is in, but for the record I usually keep it at the highest gear and highest friction. I've only had it for about a year, and I got it brand new. I would really like to fix this issue, since it's my only transportation.


How to zip a directory without zipping the parents directories?

I have a directory called Klox with whats of files and images.  Klox is located in ~/Projects/Klox  When I use zip -r Klox.zip ~/Projects/Klox the archive is containing all the directories until reaching Klox. /home/vk/projects/Klox  I want the zip file to contain only the Klox folder. So people don't have to open home folder, then open vk folder then open projects and finally open Klox


My Windows 8.1 windows key is "stuck" (not physically)

I recently purchased an MSI ge40 laptop.  It's been running fine (very hot laptop though) except for one issue. When I use windows key + L to lock the laptop, upon typing in my password and logging in, pressing any key that would normally be used in combination with the windows key activates that program.  So, if I hit win+L, type password, then hit 's' the search comes up. Etc.   This also randomly seems to happen when I am not using win+L. I might just be browsing the web and then I hit 's' when I am typing a url and then boom, search pops up. Very annoying.  I fix this by hitting the win key....sometimes onces, sometimes 10 times. Doesn't seem to have to do with the hardness of the strike.   I guess I'm at a loss. I researched this and only results about vista and 7 come up.


any advise how do I secure my GET code below to prevent SQL Injection or any hacking activities? http://localhost/hobby.php?hobby=soccer <?php  include "connect.php";   $hobby = (isset($_GET['hobby'])) ? $_GET['hobby'] : ''; $hobby = str_replace("'", "''", $hobby);  $hobby = strip_tags($hobby); $hobby = trim ($hobby);  if ($hobby != '') {          $sql = "SELECT Name, Hobby from myself where Hobby like '%$hobby%'";      $stmt = sqlsrv_query( $conn, $sql );          $result = array();     $row_check = sqlsrv_has_rows( $stmt );       if ($row_check == true) {         while ($row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC)) {             $result['Response'][] = array(         'Name' => $row['Name'],         'Hobby' => $row['Hobby']             );         }     }      sqlsrv_free_stmt( $stmt);     sqlsrv_close( $conn); ?>


Split a larger string and stop if a particular character is found

The input is a standard string input. Like this.  "Anand,Ramesh,Suresh#Anand,Ramesh,Suresh,Suresh,Anand"   I want to get get all the Names before the # and store it in an array. And use the names after the # to do some operation.   How do I copy the first three names before # to an array. So far I've figured out how to copy string seperated by comma. I couldn't find a solution to stop after a particular element is found.How do I stop when I encounter a #. Here is my code so far:  void findCombination(string input) {    stringstream ss(input);     string buffer;     vector<string>names;    int i=0;      while(getline(ss,buffer,','))    {          names.push_back(buffer);     }      for(int i=0;i<names.size();i++)            cout << names[i] <<endl;      //return NULL;   }


It was suggested that I should get myself a polarizer filter to get over my reflection problem. (  )  I found out that a Nikon 52mm Circular Polarizing Filter CPL   while I can get another filter for less than half the price — . (Please note that I know nothing about these filters and googled them just for the example.)  What is the difference between polarizer filters?  I need to remove the glare and nothing else — would either of the two do the magic for me? What filter do you recommend for me?


Given one ticker, how can I receive the ISIN for it?

I recently discovered the investpy library and I would like to know if there is any function where I can pass the stocks code and on return, among other data, receive its ISIN. I'm trying the function search_quotes, but the ISIN doesn't come back. import investpy as ip search = ip.search_quotes(text='CPLE11') for s in search:     print(s)  If anyone knows of any other library where I can pass the code and receive the ISIN, that helps too.


Cryptsetup login fails after applying proprietary ATI driver (fglrx-updates)

I encrypted my installation of Ubuntu 14.04 while installing it, later I switched the driver of my ATI Radeon HD 6970 to "fglrx-updates". After that I could only close but not open any programs. I guessed that a reboot would help and the Ubuntu cryptsetup login screen looked a lot more primitive (text based). Also I can't login any more. Error message "cryptsetup failed, bad password or options?"  I've done some research and apparently quite a few people face problems with those proprietary drivers, also while booting. For some the cryptsetup login screen looks different too, but I can't even get past the encryption. I'd prefer to not lose the installation, is there a different way than formating and reinstalling?


Is there a more efficient way of counting instances of a string with treemaps?

So I got a treemap to which I add courses that come from a random generator, the names are consistent but the order is not. For example I got these:  List course = new ArrayList();                      course.add("COP2210");         course.add("COP2250");         course.add("ENC1250");         course.add("MLP1337");         course.add("ENC3250");         course.add("REL2210");         course.add("MUS3200");         course.add("PHI1240");         course.add("SOL5000");         course.add("HAL9000");   Now that's ten courses in total, and while the code below works to count one of them it would mean i have to get about nine more int variables written and repeat the if statement another nine times, that would be undesirable. I should mention the treemap is inside a loop and resets everytime, which is something I want. but a second treemap can be made  outside the loop to add the courses, i got no issue with that. But it is entirely possible that some courses never even gets added to the treemap as they are randomly chosen from the ten above.  for (int i = 0; i < NumberOfStudents; ++i){          order = RandomCourse();          TreeMap<String, Integer> tmap = new TreeMap<String, Integer>();         tmap.put(courses.get(order[0]).toString(), 0);         tmap.put(courses.get(order[1]).toString(), 0);         tmap.put(courses.get(order[2]).toString(), 0);           String comparator1 = courses.get(order[0]).toString();         String comparator2 = courses.get(order[1]).toString();         String comparator3 = courses.get(order[2]).toString();          if(comparator1 == "HAL9000" || comparator2 == "HAL9000" || comparator3 == "HAL9000")         HAL9000students++;             courses.indexOf(order[0]);          //Clean variable         SortedCourses = "";          //Map logic         Set set = tmap.entrySet();         Iterator iterator = set.iterator();         while(iterator.hasNext()) {          Map.Entry mentry = (Map.Entry)iterator.next();         SortedCourses = SortedCourses + mentry.getKey() + " ";        }          students.add(ID_Prefix + i+ ", " + student.get(i) + " " + SortedCourses);                                                   }   Order is a int array of size 3. Where a random number is stored, it is then used to choose from courses list a position which corresponds to a course.


I know just enough networking to be dangerous. The nitty gritty low level details of NAT are not something I am particularly knowledgeable about.  I accidentally found myself in a discussion earlier today about placing a bunch of our nodes behind a NAT Gateway. (1 public IP address and X private LAN addresses). I called up the 16 bit limit to source and destination port fields in the TCP protocol, ( - page 15) and mentioned that it would limit us to some 65,000 connections (65536). -- I am not so confident about that answer anymore. Can you help me with some details?  I understand that an incoming port (server port) on our side can accept as many connections as there are sourceIP x SourcePort combinations. Let's discount those for the time being and focus on connections originating in the LAN, traveling through the NAT Gateway, and ending on a random host at a random port.  On a normal [Linux] system, outgoing connections I believe are limited to 1 per port per Source IP. If we pretend that we live in a simple world where each system only has 1 IP address, then a 'normal system' would be limited to an absolute maximum of 65536 connections.  1) In TCP is a single source IP limited to 65536 MAX theoretical outgoing connections?  2) Or is the limit actually 65536 connections for each Remote Host?  2) [Written another way]: Can the same source port be used for a different remoteHostIP:RemotePort combination?  For example: (Is the following OK?)  Source IP   |Source Port |Remote IP|Remote Port    192.168.0.20:36500   -->    8.8.8.8:23 192.168.0.20:36500   -->    8.8.4.4:23   3) Are the answers to questions 1 and 2 different for a ...'not normal system' [Cisco router acting as a NAT Gateway]?  Ex: A specialized networking device that has one public facing IP and up to ~65,000 Lan IPs [or more] behind it? Is there magic at place or is the answer to question 2 just always: yes? (or no)  4) The above questions all assume a stateful TCP connection. Is the story any different with a stateless conection like UDP?  And Ultimately:  5) Will our LAN be limited to 65536 (or some other theoretical limit) concurrent connections to the outside world through a single public IP address?  Thank you! :)    For purposes of this question, we are behind very BEEFY AND BRAND NEW Cisco Nexus gear (7000 series I think). It may be better to ignore memory/etc limitations unless they can be specifically quantified.


Is 'can' an appropriate substitute for 'may' to indicate possibility?

One definition of can in Merriam-Webster Online is:     c —used to indicate possibility < do you think he can still be alive> < those things can happen> ; sometimes used interchangeably with may   But in The Elements of Style written by William Strunk, Jr., it says:     Can. Means am (is, are) able. Not to be used as a substitute for may.   This contradiction makes me confused. So in what situation can can be used "interchangeably" with may, and in what situation it cannot?  EDIT: The two sentences in The Elements of Style make me feel that the author permits only one use of can (be able) in the first sentence and proscribes the other use (may; to indicate possibility) in the second sentence. Did I misinterpret the author's meaning? Or the text is ambiguous?


Let $A$ be an additive category, with objects $X$ and $Y$.  If there exists direct sum decompositions $X = Y\oplus Y'$ and $Y = X \oplus X'$ in $A$, must $X$ and $Y$ be isomorphic?   If one only assumes that there exist monomorphisms $X\to Y$ and $Y\to X$, the answers is No in the category of abelian groups, as explained in answers linked to in the comments.  However, the question about direct summands is not resolved there.


I tried all the things I found on here and nothing worked, is it because I have windows 7 on my PC too?


How can I quickly know the rank of this / any other matrix?

I have looked this up on several sites but they confused me because some of the given information was wrong / unclear / contradicting whatever.  I hope you can tell me all / most important ways to calculate the rank of a matrix.  As example, I take the matrix  $$A = \begin{pmatrix} 1 & 2 & 3\\  0 & 5 & 4\\  0 & 10& 2 \end{pmatrix}$$  Now several sites included that info so it must be true: If, we are looking at this example, there is no line with zeroes only, the rank of this matrix will be $3$. (?)  Here is the problem. It will cost time to form this matrix to see if there will be lines with zeroes only. For this I can use Gaussian Elimination.  I have tested it with that Gauss and I couldn't get a line with zeroes only, so I conclude that this matrix $rank(A)=3$.  This however seems very inefficient way, I hope you can tell me better ways?


Below is a diagram that I drew to help me rewire a couple of switches. The left switch is a standard 3-way switch. The right switch Cooper 275W-BOX combination single pole and 3-way switch. The single is the top switch; the 3-way is the bottom switch. They share a single power source.   The single pole switch works. The 3-way PARTLY works. The right 3-way will only control the ceiling fan/light if the left 3-way is in the up position. What did I do wrong?  I had 2 existing, separately wired and powered single pole switches. One went to a light in a foyer and the other to the ceiling fan (the light and fan are wired together, so not separate switches). I disconnected and capped off the power wire that was powering the ceiling fan/light, and rerouted the wire to the other switch for the 3-way.   Since I was using existing wires coming up from the switches, I added some junction boxes and tied into those wires rather than pulling new wire. (The electrician stapled the original wiring to the studs everywhere he could. That coupled with insulation in the exterior walls made it very difficult for me to pull new wire.)  The original home wiring was 12-2, and the new wire I ran is 12-3. I did not use any of the ground wire.  If this wiring diagram is accurate, then I may have made a mistake in one of the junction boxes, and will need to figure out where I messed up. I hope it's something I can fix without getting back into the attic.


How to calculate interest rate from start and end amounts in Google Sheets?

What is the formula and result for working out the interest rate required for making £38106 into £73036 in 20 years?  (As if you put £38106 into a bank account and left it for 20 years, never taking anything out or putting anything else in.)


I lost control of my account before registering, can it be recovered?

I asked and answered a question on an SE site without registering. I was accessing my unregistered account through my browser, which kept me logged in. However, someone reset my cookies and now I've lost my account.   Is there anyway to regain it, or should I give it up for lost?


I need to reinstall Windows on a laptop. Normally I before doing this I would back up the drivers using .  However this time the computer will not boot, and for some reason even if I take out the drive and hook it to another computer using enclosure, the drive does not get recognized. The only luck I have had is by using a Linux Live CD, this has allowed me to back up documents, pictures, etc.  I was thinking I might be able to simply copy the driver files to a flash drive, so I can use them after I reinstall Windows. How could I go about doing this?


How to make a custom bash tab completion?

I want to make tab completion to complete on specific programs in path although there maybe other possible completion in path.   For example, if I type mpl and tab, it should complete to mplayer though there might be other programs in the path starting with mpl. I know of bash alias builtin for ~/.bashrc but thats not what I'm looking for.


show that the solution is a local martingale iff it has zero drift

Most financial maths textbook state the following:  Given an $n$-dimensional Ito-process defined by \begin{equation} X_t = X_0 + \int_0^{t} \alpha_s \,d W_s + \int_0^{t} \beta_s \,d s, \end{equation} where $(\alpha_t)_{t \geq0}$ is a predictable process that is valued in the space of $n \times d$ matrices and $(W_t)_{t \geq 0}$ is a $d$-dimensional Brownian motion, \begin{equation} (X_t) \text{ is a local martingale } \quad \Longleftrightarrow \text{ It has zero drift.} \end{equation} Can anyone show me a reference for the proof of this statement or at least give a hint of how to construct this proof? (I know how to prove the ($\Leftarrow$) direction, but I am not so sure about the other one.)


If someone is using poor coding technique, should you point that out?

In general; if you see someone post a question which includes code, and you know there's a better/safer way to perform the same function, should you address their coding deficiency or just stick to answering the question they've posed?  I'm just thinking in terms of what SE stands for; a repository of coding questions and answers and NOT for specific questions geared towards one individual.  Addressing issues outside the question won't help future visitors as they'd never be looking in a question about, say, connection strings if their question relates to If/Then/Else loops.  The flip-side is, if it only takes you a minute to point out a better way to do something, then that person has learned more and will be more likely to return/stick around and join the community.  Just curious what the masses feel about this topic.


Problems decoding old-school BBS ANSI with telnetlib

Was trying to use telnetlib to help me play TradeWars on an old-school BBS.    As I recall (this was 30+ years ago) BBS's used some kind of extended ASCII and/or something called ANSI.   Made for colorful text and some simple graphics, like edges, corners, etc.  A generic telnet terminal, like gnu telnet, cannot render these sites correctly.  SyncTerm (ancient software) kind of runs on my mac and does display the text and graphics properly.   My problem is that telnetlib.read_until() returns bytes which i am unable to decode into something readable.  a fragment of my login reading/writing:  print (tt.read_until("Show today's log?".encode('ascii')),3) tt.write('\r\n'.encode('ascii')) print (tt.read_until('[Pause]'.encode('ascii')),3) tt.write('\r\n'.encode('ascii')) print (tt.read_until('Password?'.encode('ascii')),3) tt.write('NOTMYPASSWORD\r\n'.encode('ascii')) zaa = tt.read_until('[Pause]'.encode('ascii')) print(zaa) tt.write('\r\n'.encode('ascii'))   read_until() is giving me bytes.  print (type(zaa)) zaa.decode('utf-8')  <class 'bytes'> ' ****\r\x1b[0m\n\r\n\x1b[1;33mYou have been on today.\r\x1b[0m\n\x1b[32mSearching for messages received since your last time on\x1b[1;33m:\r\x1b[0m\n\x1b[32mNo messages received.\r\x1b[0m\n\x1b[35m[Pause]'   But I don't know how to decode them into something nicer to read,  or at least just strip out all the awful color-control codes or whatever they are.    Any advice on how to parse this nicely?  Thanks  ==========  Here is what I've come up with for now.  But still wondering if there are  better solutions.   def de_ansi(somebytes):     #https://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences     #https://stackoverflow.com/questions/14693701/how-can-i-remove-the-ansi-escape-sequences-from-a-string-in-python     ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')     text =  ansi_escape.sub('', somebytes.decode('utf-8'))     return text.splitlines()   This doesn't work because there are some non utf-8 codes that come up: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xde in position 265: invalid continuation byte  If I decode as Latin-1 no errors are thrown, but the output is awful:  ['ú.   Üßßß Ûßßß  ßÛß        ÍÞÍÞðÞÍÞÍÞÍÞðÞ', 'ÞÍÞ  ..ÜßßÜÛÜ      ßÛÛÛÜÜ   ÛÛÛÍÞÍÞÍÞúÞÍÍÍÞÍÞ', 'ÞðÞ   Visit : telnet://mtlgeek.synchro.netÛÛÛÛ ÜÛÜ      ßÛÛÛÜÜ ÛßÍÍðÍËÞÍÞÍËÍÞÍÞ', 'ÞÍ¹   ÜßÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÜßßßÜÜÍÞÍÞÊÞÍÞÍ¹ðÞÍÞ', 'ÞÍÞÍÞÉÞÍðúðÍÞ»ÞðÞÍÞÉÞÍÞúÞðÍÍÍðÞÍÞðÞÍÞÍÞðÞÍÍÍÞÍÞÍÞúÞÍðÍÞÍÞÍÞÍÞðÞÍÞÍÞÍÞÍÎÍÞÍÞÍÞúATrade Wars 2002 Win32 module now loading.', '', 'Mearratwe', 'tcfho SMearra', 'twetcfho SMea', 'rratwetcfho ', 'SMartech SoftwareMartech SoftwareMartech Software', 'Martech SoftwareMartech SoftwareShocfe', 'ttwraarMeSh', 'ocfettwraarM', 'e             ', '  psrtensepsrt', 'ensepsrtensepresen', 'tspresentspresentspresentspresentspresentse', 'snetrspseenrtp', 's              ', '  úúúúúúú', '.ßÜ°°°°±°°±±°  ²±°±°°±°   °    °    °±±°±±°±', '


How can Star Trek: Countdown ever be considered canon?

I've just read this on the :     The main setting for the films Star   Trek: First Contact (1996), Star Trek:   Insurrection (1998), and Star Trek   Nemesis (2002).[6] According to   Star Trek: Countdown (2009), Data   assumed command of the Enterprise   after Captain Picard retired from   Starfleet to become the Ambassador to   Vulcan.   (emphasis added by me)  I haven't read Star Trek: Countdown, but looking at  I read this:     The comic came about because Anthony   Pascale, editor of TrekMovie.com, kept   requesting to the film's co-writer   Roberto Orci a way of having The Next   Generation characters "pass the baton"   back to the originals. When asked   whether the filmmakers' involvement in   the comic made it canonical, Orci   stated he was in no position to   declare whether it was, though he felt   it could easily remain as such unless   it was contradicted in a future   film.   (emphasis added by me)  How could that ever be canon if Data sacrifices himself during  while saving Picard, still captain of the Enterprise?     Data arrives with a single use personal transporter and has the captain beamed back to the Enterprise before ultimately sacrificing himself to shut down the weapon and destroy the ship.   Am I missing something? Was Data revived? Was Star Trek: Nemesis un-canonized? Was Data of Star Trek: Countdown really B4?


How can i get Population Density as a polygon layer?

I have some points (population) and using function Kernel Density i have calculated population density, then i reclassified the information. Now i would like to use the population density data in "union"function but the problem is that the input data has to be polygons! How can I solve this problem? I'm using ArcGIS10.


I've downloaded a driver for a video card (*.run) and tried to install within a terminal. When I started the installation process I got this error: ERROR: nvidia-installer must be run as root. I'm logged in with my own profile.


How to find sum of the following series  $$\frac{1}{6}+\frac{5}{6\cdot12}+\frac{5\cdot8}{6\cdot12\cdot18}+\frac{5\cdot8\cdot11}{6\cdot12\cdot18\cdot24}+\cdots={1\over 6} + \sum_{n=1}^\infty{\Pi_{i=1}^n{3i+2}\over (n+1)!6^{n+1}}$$  Please give me some hints. Thanks in advance.


What are the uses for SV_POSITION in the pixel shader?  Previously this was the POSITION semantic and it wasn't readable in the pixel shader, but now that it is, what can it be used for?  In an SM2 deferred renderer, you'd typically take the texture coordinates, transform them to the [-1, 1] range and then use an inverse view/position matrix to get the world position of a pixel.  Would SV_POSITION be usable here to reduce any of the calculations?  And if so, how would you do that?


Blender not saving changes to object's origin point

On my current .blend file, when I edit a particular object's origin point and save it, opening the file again resets the origin back to where it was before. I'm unable to save the object with a new origin location. I tried doing CtrlA to set to apply location, rotation, and scale, and then saving it, but upon reopening the object was scaled strangely and the origin once again not in the right location.


I have this class in my .hpp file  template<class T = int> class Matrix {     public:     Matrix(); }   and I have this Matrix.cpp file   #include "Matrix.hpp" template<class T> Matrix<T>::Matrix() {     vector<T> vecN(1, 0);     _matrix.resize(1, vecN);     _rows = 1;     _cols = 1; }   but it won't work, when adding a main  #include "Matrix.hpp"  int main(int argc, char** argv) {     Matrix<int> test();     return 0; }   i get a very weird error saying   main.cpp:19: undefined reference to Matrix<int>::Matrix(unsigned int, unsigned int)' main.cpp:19:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol Matrix<int>::Matrix(unsigned int, unsigned int)


How to install TP-LINK T2UH Wireless adapter Driver (Ralink mt7610u)

I recently got a wireless adapter (TP-Link Archer T2UH V1). After plugging it in, I found out that the drivers for Linux are not native on Ubuntu. They do, however, have the drivers available for download (in the form of compilable/ makefile). What I am not sure of is how to install these drivers. I know that I need to build the drivers, place things where they need to be, and tie things together with the kernel. I am not sure how to do this, however, and need some help.  TL;DR: I need to know the terminal commands to install these drivers.  Driver/Device info:   Output of lsusb:  Bus 003 Device 004: ID 148f:761a Ralink Technology, Corp.


What are the differences between men's and women's bike frames?

Why do women's bikes have a diagonal bar in the frame instead of a horizontal frame? Is this the only difference?  Sorry if this has been asked (but I cannot find it by searching) and I also just cannot think of a reason why.


Which repository source do I need to add to my sources.list to access the package firmware-linux-nonfree?  I am using Deb 6 testing 32 bit.


Is there a way to limit concurrent downloads in apt-get?

I'm using:  apt-get dist-uprade   and it's about to drive me insane.  To make a long story short, I grew up in the country-side. We have electric fences to keep the bovine off the roads. 56k was actually 2k for us because of the static on the line. DSL speeds are anywhere from 1kb to 70kb/s. Apt-get is connecting to multiple servers concurrently on these swinging conditions. I feel it would be better to just limit apt-get to a single connection at a time instead of downloading two or three package files at once.


Convex function almost surely differentiable.

If f: $\mathbb{R}^n \rightarrow \mathbb{R}$ is a convex function, i heard that f is almost everywhere differentiable. Is it true? I can't find a proof (n-dimentional).  Thank you for any help


Image of Stack Exchange button is blocked by Adblock

Chrome and IE 11 are fine, I'm only able to reproduce this in Firefox. Using version 27.0.1 on Windows 7. Meta as well as all the other sites are affected.        I can still see the hover effect, but the image is gone. I see this in Firebug:        The image doesn't show up in the Network tab. I am able to see the image by visiting  which goes to   I've done Ctrl-F5, I've cleared the cache and I've tried Private Browsing. Possibly related to  ?


Stack Exchange site to ask Health and Medical related questions

Where can I ask Health and Medical related questions on this site?  Is there a stackexchange site to ask questions about Health and Medical ?


Two Perfect Squares--$(3n+1) \& (4n+1)$.

Assume $n$ is a Natural Number which satisfies the following 2 properties simultaneously:    $01$ . $(3n+1)$=$a$12 for some Natural Number $a$1. $02$ .  $(4n+1)$=$a$22 for some Natural Number $a$2.  Prove that $n$ is divisible by $56$.  For example, if we take $n$=$56$, we have $(3n+1)$=$169$=$13$2 and $(4n+1)$=$225$=$15$2.  I could prove that $n$ is a multiple of $4$ but coud not proceed any further.However my strategy was to prove that $n$ is divisible by 8 & then that $n$ is divisible by 7 because $G.C.D (7,8)=1$ and $L.C.M.(7,8)=56$.


Is saving array in mysql good do i need separate new table?

This is my data: {   "bookingFee": "0",     "inventoryId": "2001600236110005688",     "inventoryItems": [{         "operatorServiceCharge": "0.00",         "passenger": {             "age": "26",             "gender": "MALE",             "title": "Mr"         },         "seatName": "5",         "serviceTax": "19.00"     },     {         "operatorServiceCharge": "0.00",         "passenger": {             "age": "26",             "gender": "MALE",             "title": "Mr"         },         "seatName": "5",         "serviceTax": "19.00"     }],     "status": "BOOKED",     "tin": "123", }  As you see , "inventoryItems" can be just single object sometimes and some times multiple arrays like above ! Can it be saved in mysql column like "inventoryItems" or i need to create a new joint table to add these ? And each "inventoryItems" items has passenger with various data also - how to handle that ? Kindly suggest ? which is best practice ?


I've taken about an hundered of pictures of a large painting with an iPhone at a distance of about 40cm. For each picture I moved the camera along the painting.   I was thinking to use  to build the final assembly. Unfortunately all the possible projections seems to apply only on a sphere not on a rectangle.   How can I automate the assembly of the painting I captured?


Python method/function arguments starting with asterisk and dual asterisk

I am not able understand where does these type of functions are used and how differently these arguments work from the normal arguments. I have encountered them many time but never got chance to understand them properly.  Ex:  def method(self, *links, **locks):     #some foo     #some bar     return   I know i could have search the documentation but i have no idea what to search for.


Functional programming diagrams of map, filter, reduce

I would like to create similar diagrams to these:    I am quite new to Latex. What package or tools should I use? Thank you for your help.


Calculate the limit: $\lim_{x\to\infty} \sqrt[x]{3^x+7^x}$

Calculate the limit: $$\lim_{x\to\infty} \sqrt[x]{3^x+7^x}$$  I'm pretty much clueless on how to approach this. I've tried using the identity of $c^x = e^{x \cdot \ln(c)}$ but that led me to nothing. Also I've tried replacing $x$ with $t=\frac{1}{x}$ such that I would end up with $\lim_{t\to 0} (3^{1/t} + 7^{1/t})^{1/t}$ however I've reached yet again a dead end.  Any suggestions or even hints on what should I do next?


What are some best practices when constructing your defense?

Are there any pointers to think about when placing defensive structures? For example, should all defensive structures be walled off from each-other? Obviously it is ideal to have walls between every single building, but because of the limit on the amount of walls you can build this is not possible.  Right now, I'm winging it. I am using a strategy where the defensive structures and the storage are walled in, while the other buildings (barracks for example) are outside the walls to act as cannon fodder.  How can I improve this strategy?


"Dare speak" vs. "dare to speak" vs "dares to speak"

Which is the most appropriate improvement in the following     I am surprised that he dares speak in such a tone to his father.     a) he dares to speak b) he dare to speak c) he dare speak    I think the answer should be 'c' but the book says 'a'.


I'm making two api calls and result of one should be merged with second api call i need to write these two like below  @RequestMapping("/greeting") public Greeting greeting() {     for(RTM rtm: callAPIFuncA()) {         try {          }       catch(Exception e) {           log(e);           }   }      for(NonRTM nRTM: callAPIFuncB()) {        try {          }       catch(Exception e) {            log(e);          }      }  return new Greeting(responseMap);  }   But the problem i am running into is first api returns data but second one gets an exception , i wanted to return the response even if any one of the api call fails. please tell me what i need to change in my code to make it work. rightnow the api calls return data but in next for loop when i make a second api call it gives exception and never return the data eve from the first successful api call


How to find  $$i^{i^{i^\ldots}} \quad :\quad i=\sqrt{-1}$$ I'm able to find the solution for the finite powers  using  $$i=e^{i(2k\pi+\frac{\pi}{2})}\quad:\quad k\in\mathbb{Z}$$ $$i^{i}=e^{-(2k\pi+\frac{\pi}{2})}$$ $$i^{i^{i}}=e^{-i(2\pi k+\frac{\pi}{2})}=-i$$ $$i^{i^{i^i}}=e^{(2\pi k+\frac{\pi}{2}) }$$ $$\text{and so on}$$ but what should be the approach to solve for infitie powers$\space$?


Summation Of Series of $\binom{x+k}{k+1}$ where $k$ is $0$ to $n$

Want The formula or to find The Sum of Series where  $$S=\sum_{k=0}^n \binom{x+k}{k+1}$$  where $x$ is any constant $\geq 1$  and $n$ is another constant.


How to remove this extra space before url in bibliography?

How do I remove this space please? I'm using the natbib package    Code from ref.bib  @article{stats2017,   title={Digest of Education Statistics 2017},   author={\text{Statistics Mauritius}},   year={2017},   url={\url{http://statsmauritius.govmu.org/English/Publications/Pages/Edu_Stats_Yr2017.aspx}} }   bibliography style  %\printbibliography \setcitestyle{numbers} % set the citation style to ``numbers''. \bibliographystyle{agsm} \bibliography{ref.bib}


I am attempting to change the following array line into an ArrayList that will function the same way:  private String[] books = new String[5];   I changed it to this but it is not functioning properly:  private ArrayList<String>(Arrays.asList(books))   I thought this was how an ArrayList was created


Java android studio null pointer exception

When I click nav order the page is automatically closed. This is my logcat:      E/AndroidRuntime: FATAL EXCEPTION: main Process: com.udaya.smartfoodserver, PID: 12671 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference at com.udaya.smartfoodserver.Common.Common.convertCodeToStatus(Common.java:15) at com.udaya.smartfoodserver.OrderStatus$1.populateViewHolder(OrderStatus.java:54) at com.udaya.smartfoodserver.OrderStatus$1.populateViewHolder(OrderStatus.java:49) at com.firebase.ui.database.FirebaseRecyclerAdapter.onBindViewHolder(FirebaseRecyclerAdapter.java:184)


The effective power bug made my iMessage not work

I gave a "friend" my number and he sent the effective power code and now my iMessage doesn't work anymore I click on the app for iMessage and the app crashes


how do I create programs for ubuntu, with the same ease that I have with visual studio express on windows?


Encode string URL without using HttpServerUtility

I have a Sandbox solution webpart1 that receives a absolute URL in the webpart settings's section.  Due to native limitations of sandboxes solutions, I'm looking for a C# - code for encode an absolute URL without using HttpServerUtility and related/pre-built classes.  I already search and try the following  and also this , but I can't understand or get a more legible code or approach for create a more sutile for my specific situation.    1 I'm working on a sandboxed solution that I was developed a few months ago and change sandboxed solution to Apps/Add-ins is not valid in this case.


Cannot answer protected question on iOS app

Question in point: .  I should have sufficient reputation to be allowed to answer - and I can, on the normal site. However when I view this question through the iOS app, the "answer" button does not appear for me - on two separate devices.  On other (unprotected) questions there is no problem. I don't recall noticing this behavior before...  And submitting this with just "iOS-app" and "bug-reports" tag generated an error. When I tried adding the "bug" tag and resubmitted I was told I could not submit my change for another 23 seconds. What gives?


Why is a duplicate file sometimes created after editing a file?

I use gedit to modify/create files in my system, and sometimes I see that after editing, a duplicate file is created by the name of samename~  Just that ~ is extra. Why does this happen? Is there any significance of this file or is it okay if I delete it (I usually do)?


Let $f(x)$ be continuous on [$0,1$] to $f(x)=0$ for each $x\in[0,1]$

Let $f(x)$ be continuous on [$0,1$] such that $f(x) \ge 0$  for each $x\in[0,1]$.If $\int^{1}_{0}f(x)dx = 0$ , Show that $f(x)=0$ for each $x\in[0,1]$


What characters are allowed for the display name?

I tried editing my display name and for some names it gives me this error:     Display Name can only contain a-z, 0-9, spaces, apostrophes or hyphens and must start with a letter or number   That is clearly not the case, because it will take the following names:   NullUserException -龍- NullUserException Ω    NullUserException ఠ_ఠ NullUserException ಠ_ಠ NullUserException இ_இ   But it won't let me do:   NullUserException  (╯°o°)╯ NullUserException ٩๏̯͡๏)۶ NullUserException ☜(ﾟヮﾟ☜) NullUserException อ้_อ้   So what's the regex used (assuming that's what's being used), so I can try out allowed names without actually changing it?


Outlook recipient receiving winmail.dat file

I am sending mail to a recipient that is using Outlook.  Normally Outlook opens winmail.dat files automatically. However, this is not happening. Instead he is receiving the winmail.dat file as an attachment. This is probably happening because the email was sent encrypted.  How can he open the ATTACHED winmail.dat file using Outlook?  Note: I have changed settings so that I am sending in plain text format (see below) and he STILL cannot open it (it is still being sent in winmail.dat) so those settings are not working.


how to assign value to pointer string in C

In C language I am trying to assign a value to pointer string. I cannot use char array, I have to use pointer string. So please tell how can I do that?  I am doing something like this (code given), but when I run my code an error is prompted program stopped working.  #include <stdio.h>   int main (void) {      char *myString = " ";     int value = 1;      myString[0] = value+'0';      printf("%s\n",myString);      return 0; }


In my physics class, we recently learned how to compute RIV-tables for resistors using a diagram of a complex circuit, and we covered the properties of series and parallel resistors. However, I'm having some trouble simplifying the following circuit diagram and separating it into a conjunction of series and parallel resistors:    Can someone show me how to rearrange this to make it manageable? I left out the voltage and resistances because I'm not having trouble with that part of the problem - just with the rearrangement. But if anyone is curious, each resistor is $1\Omega$ and the battery is $5$ volts.


Existence of entire function s.t. for all $z\in\mathbb{C}$ with $|z|\geq 100:|f(z)|=|z|+1$

Is there a function $f$ such that $f$ is entire and for all $z\in\mathbb{C}$ with $|z|\geq 100:|f(z)|=|z|+1$.  An observation is that $\lim\limits_{z\to\infty}f(z)=\infty$ and so $f$ must be a polynomial.  Therefore, the problem reduces to showing that no polynomial can uphold the given constraint.  My problem is in doing so. Is there another way?  Let $a\in\mathbb{C}$. For a large enough $R>100,|a|$, by Cauchy's formula we get  $$f''(a)=\frac{1}{\pi i}\int_{|z|=R}\frac{f(z)}{(z-a)^3}dz\implies $$  $$|f''(a)|\leq\frac{1}{\pi}\frac{1}{|R-a|^3}\cdot2\pi R$$  The latter goes to $0$ as $R\to\infty$, so $f''(a)=0$. Therefore, $f''\equiv 0$.  We get that $f$ is a linear function $f(z)=az+b$.


I want to remove my version of Ubuntu and install win 8 ,but when I go through win8 installation and choose custom I found ( in the window of choosing partitions that "windows can not installed on this drive " this message appeared in  every partition I choose ...what can I do to remove Ubuntu and install win8 without loosing my own partitions?


Have I misunderstood the amount of "automatic optimization" that PostgreSQL does without me having to be "clever" when designing my tables?

Suppose I have a table such as this, for logging all web requests made to my website: CREATE TABLE weblog (     id      bigserial,     moment      timestamp with time zone NOT NULL DEFAULT now(),     ua      text, -- user agent     ref     text, -- referer     "IP-addy"   inet NOT NULL,     PRIMARY KEY (id) )  Most people will be sending the same user-agent, such as "MOSAIC 1.0". Many will send the same referer as well. This means that, although the id, moment, and IP-addy columns will differ, a huge amount of records/rows in the table will end up having the same values for "ua" and "ref". This really got me thinking about storage space and efficiency, but having experimented with this for a few weeks now, I've basically come "full circle", back to thinking that this does make sense after all. Allow me to explain. Although seemingly a gigantic waste, storing these repeated values on the disk may be necessary for performance. I'm not sure about it, but it seems like it probably is. When I back up my database, which was my biggest worry rather than it taking a lot of disk space while "live", I apply the maximum compression to pg_dump (level 9), which I assume means that all of those duplicated values will turn into a single string stored, and then just referenced with small bits for each record which contains the same cell value. This seems to be the case because the difference between using level 0 (no compression) and 9 is pretty huge in the file size of the resulting .pg_dump archive (using the oddly named "custom" (binary) format). I didn't originally think about this, but since it applies compression, the backups probably already are as small as they could be, regardless of my table structure. Currently, I have them structured like this: CREATE TABLE weblog (     id          bigserial,     moment          timestamp with time zone NOT NULL DEFAULT now(),     ua          bigint, -- user agent     ref         bigint, -- referer     "IP-addy"       inet NOT NULL,     PRIMARY KEY     (id),     FOREIGN KEY     blabla,     FOREIGN KEY     blabla )  And then I have one table for each of "ua" and "ref", where I just store a unique string value with a bigserial id and then associate it with the ua/ref bigints (they are no longer text). This makes both SELECT and INSERT queries cumbersome and require an extra query for each INSERT where it puts in the new string (if it doesn't already exist in the table). Basically, it's an "ugly" (not very elegant) solution to the user (me). And it makes me wonder if this method saves so much disk space anyway. I have only done this for my biggest tables -- not for ones that I know will remain "reasonable". It's not worth it to do this for every single text column, and it would feel like I'm really fighting PostgreSQL and probably am doing something wrong. What do you all say about this? Have I fundamentally misunderstood something? Does PG just "expand" my table structure back into the original structure internally, in order to boost performance at the expense of "live" disk space taken up by my database? I feel as if I have a bad understanding of just how much (or little) PG actually "abstracts away", and how "clever" I have to be in my structure these days. I may be mentally stuck in the 1970s or something by thinking like this. Maybe I've gained nothing from all this work with extra tables, FKs, and extra/complicated queries?


What does the command "sudo mv home/* *" do?

I know each part of this command.  sudo mv home/* *    sudo: super-user do, execute with root privileges. mv: move a file or directory. home/*: argument of mv command. It indicates the content of home directory. The asterisk * is a wildcard that expands to the list of files in the current directory in lexicographic order.   The next argument is the destiny folder. However, I specify an asterisk as destiny directory, and if I execute the command the folder disappear completely. So, what does the * in this case?


Finding general formula of $\sum_{i=0}^n i^2 \binom{n}{i}$

Lets define formula: $$f(n)=\sum_{i=0}^n i^2 \binom{n}{i}$$  What would be genral formula of that?  I first went to discover $$f(n)=\sum_{i=0}^n \binom{n}{i}=2^n$$ (cardinality of power set), and $$f(n)=\sum_{i=0}^n i^2=\frac{2n^3+3n^2+n}{6}$$ then multiplied those together, realising that I am way off.  Then I tried to deduce general presentation of $f(n)$, finding difference of $f(1),f(2),f(3)\cdots$, differences of differences, etc etc, trying to figure what degree of polynomial can represent it, however even after $100$ iterations difference of difference of difference do not converge to some constant, so figuring out polynomial is not working (seems to be that its not polynomial then but some form of $c^n$ function, where $c$ is constant and $n$ is argument of function).  Any idea?


With Multiple Regression, the R-Squared gives the researcher an estimate of the explanatory power of the regression equation.  What is the equivalent for Decision Trees?


I am the beginner of LaTeX and I have tried the below code to make table in appropriate place. But when I compile the code table moves down to end of the page.  \documentclass[12pt,a4paper]{article} \usepackage[hmargin=2cm,vmargin=2cm]{geometry} \title{Tutorial on Tables and Figures} \date{\today} \begin{document} \maketitle \centering \begin{table} \caption{Cost of fruits in India} \begin{tabular}{||l|c|c|c|c||}\hline \multicolumn 2 {||c|}{Fruit details} &  \multicolumn 3 {c|}{Cost calculations} \\ \hline Fruit & Type & No. of units & cost/unit & cost (Rs.) \\ \hline Mango & Malgoa & 18 & 50 & \\ \cline{2-4} & Alfonso & 2 & 300 & 1,500 \\ \hline Jackfruit & Kolli Hills & 10 & 50 & 500 \\ \hline Banana & Green & 10 & 20 & 200 \\ \hline \multicolumn 4{||r|}{Total cost (Rs.)} & 2,200 \\ \hline \end{tabular} \end{table} \end{document}


How to Split list into multiple different lists in Python 3

Basically i want to split a list into multiple lists For example: If I input: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]  Would split and return [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [20, 21, 22, 23]]  Another example: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]  Would return [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]]  And another one: [0, 1, 2, 3, 4, 5, 6]  Would return [[0, 1, 2, 3, 4, 5, 6]]  Here i made each split to be 10 items each. So if the total item in the list is not divisible by 10, the last list would just have less than 10 items I've been thinking of a way to do this for a while, but the way i was thinking on how to do this is kinda long and probably is not a very good way to do it. So what would be a good way to do this?


Wifi driver not working after last Ubuntu 20.04 update

Did last Ubuntu update changed something for Broadcom WiFi? In September I had to disable "Secure boot" in BIOS to make it working. Now it does not work at all. *-network UNCLAIMED               description: Network controller        product: BCM43142 802.11b/g/n        vendor: Broadcom Inc. and subsidiaries        physical id: 0        bus info: pci@0000:08:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress cap_list        configuration: latency=0        resources: memory:b5500000-b5507fff


I need a word or phrase to describe the sensation people experience when they hear nails scratching on a chalkboard.  I don't want to describe the noise , just the sensation.


I would like to connect a USB Mouse, Keyboard or Storage Device to my Nexus 4. So far I know, for this USB OTG must be supported. Unfortunately I can not find any actual information about this.  Does anybody know whether USB OTG is supported by Ubuntu-Touch? If yes, does anybody know if it would work with a Nexus 4 device?


A loan is issued for 12 months for 1000 and is paid back with monthly payments of $140 each month.  Does this loan have an APR of 68%?


How to prevent misalignment of a vertical column when a node label is displayed

I am trying to make a vertical column of various moon phases using a macro that generates circles, but when I add a node label to a circle (to designate that it is a full moon) it shifts the circle that contains the label slightly up and to the right.  \documentclass[leqno,12pt]{article} \usepackage{tikz} \usetikzlibrary{calendar,fpu}  \newcommand{\moon}[2][]{% \def\lunarage{#2}% \pgfmathsetmacro\textF{ifthenelse(\lunarage==15,"F","")} \tikz []{     \draw (0,0) circle [radius=1ex];     \node[color=black] (0,0) {\textF};     %     }% } \begin{document}\noindent%     \foreach \d in {0,1,...,30}{%     \moon[]{\d}  \\   } \end{document}   THANKS for any help!


Relation of this antisymmetric matrix $r = \left(\begin{smallmatrix}0 &1\\-1&0\end{smallmatrix}\right)$ to $i$

I was reviewing some matrices and found this interesting  if $r = \begin{pmatrix} 0&1\\ -1&0 \end{pmatrix}$ then $rr=-I$, also $$\exp{(\theta r)} = \cos\theta I + \sin\theta r$$ No wonder, the matrix $R(\theta) = e^{\theta r}$ is the 2d rotation matrix, just like $e^{i\theta}$ rotates a vector in the Argand plane. I have a very cursory knowledge of complex analysis, so I would like to know where I can find the details, i.e what is the unifying theme and in which literature can it be found.


Given $x, y$ are acute angles such that $\sin y= 3\cos(x+y)\sin x$. Find the maximum value of $\tan y$.  Attempt at a solution:  $[sin y = 3(cos x cos y - sin x sin y) sin x] 1/cos y$  $tan y = (3 cos x - 3 sin x tan y) sin x$  $tan y + 3 sin^2 x + tan y = 3 sin x cos x$  $tan y = (3 sin x cos x) / (1 + 3 sin x)$     I'm stuck here...


Can attributes be added dynamically in C#?

Is it possible to add attributes at runtime or to change the value of an attribute at runtime?


Active directory setting for auto-logon of a computer; Windows Server

I remember there was a setting in Windows Server 2003 that made a user account on the domain auto-logon when the computer booted up. It was just one setting on the server, and not a registry edit on the local computer. Does anybody know what it was called and where to find it?


$\triangle ABC$ is an isosceles triangle such that $AB=AC$ and $\angle  BAC$=$20^\circ$. And a point D is on $\overline{AC}$ so that AD=BC, , How to find $\angle{DBC}$?    I could not get how to use the condition $AD=BC$ , How do I use the condition to find $\angle{DBC}$?  EDIT 1: With MvG's observation, we can prove the following fact.     If we set on a point $O$ in $\triangle{ABC}$ such that $\triangle{OBC}$ is a regular triangle, then $O$ is the circumcenter of $\triangle{BCD}$.   First, we will show if we set a point $E$ on the segment $AC$ such that $OE=OB=OC=BC$, then $D=E$.  Becuase $\triangle{ABC}$ is a isosceles triangle, the point $O$ is on the bisecting line of $\angle{BAC}$. $\angle{OAE}=20^\circ/2=10^\circ$.   And because $OE=OC$, $\angle{OCE}=\angle{OEC}=20^\circ$, $\angle{EOA}=20^\circ-10^\circ=10^\circ=\angle{EAO}$.   Therefore $\triangle{AOE}$ is an isosceles triangle such that $EA=EO$. so $AD=BC=AE$, $D=E$.  Now we can see the point $O$ is a circumcenter of the $\triangle{DBC}$ because $OB=OC=OD.$  By using this fact, we can find $\angle{DBC}=70^\circ$,


What ways could you create a data extension that contains all the subscribers (SubscriberKeys) that are currently “in” a Journey (Journey Builder)?  The Journey I would like to do this for is a complex activity with multiple decision branches resulting in multiple possible journey durations. For example; if the customer didn’t open Email1 after 2 days, then send Email2; else Exit Journey. If the customer didn’t open Email2 after 2 days, then send Email3; else Exit Journey. Wait 2 more days, then End Journey. The minimum journey duration for the above example is 2 days, while the maximum is 6 days.  Note that I don’t want a list of subscribers that “entered” a Journey, but a list of the ones that are “currently in” a Journey and have not yet exited. Answer must account for non-standard Journey exits including Unsubscribes/Contact Deletes, etc.


What techniques or tools can be used to show that a UFO or cryptid has been manually added to an image on a web page?

People sometimes post images showing alleged UFOs, cryptids, or other unusual content.  Are there techniques or tools can be used to conclusively show that the UFO/cryptid/etc has been manually added to the image?


mysqli bind_param vs '".$var."'; whats the difference?

I'm trying to figure out the difference between using prepared statements and and escaping/converting a variable into a string as follows:  $sql = "SELECT `user_id`, `user_name` FROM table WHERE `user_id` = ? and `user_name`= ?"; $sqlPrepare = $conn->prepare($sql); $sqlPrepare->bind_param('ss', $user_id, $user_name); $sqlPrepare->execute(); $result = $ $sqlPrepare->get_result();             if($result->num_rows ===0)                          {                         // Do work                          }   VS  mysqli::real_escape_string($whatever_vars_needed);  $sql = "SELECT `user_id`, `user_name` FROM table WHERE `user_id` = '".$user_id."' and `user_name`= '".$user_name."'"; $sqlQuery = $conn->query($sql);     if($sqlQuery->num_rows ===0)                          {                         // Do work                          }   as far as protecting against sql injections go, would they both serve the same purpose? And if so, wouldn't it be preferred to use the second method since it does save a bit of extra typing?  I realize that I'm using query vs prepare but even then I don't really see the difference if I'm converting the variables into strings?  Which is a better method?


Show that the number of permutations of $n$ numbers, for $n ≥ 2$, with two cycles is at most $(n−1)!\log n$. I know so far that from my notes that $S(n,1) = (n-1)!$ and that $S(n,2) = (n-1)!H_{n-1}$ also according to them. I assume you can make $H_{n-1}$ equal $\log n$. And also understand that $n ≥ 2$. Any help would be appreciated.


It is obvious that   $\sum_{n=1}^{+\infty} \frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$  is alternating series, therefore, before we could talk about finding the sum of the series, we have to check if it's unconditionally convergent, if we look at $a_n=\frac{2n-1}{2^{n-1}}$ it is obvious that we could use d'Alembert's test and easily prove that this is unconditionally convergent series. So now, we should find the sum:  $S_n=\sum_{k=1}^{\infty} \frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$  because of the denominator, it really looks like geometric series, but i could't find a way to simplify it in order to determine the sum. Any ideas?


(MS SQL only 2008R2) I would like to know how to add a Char(10) line feed before and after each occurrence of a timestamp (##:##:##) in a string.    So, if I have a string of "askdfjaksdfja asfd kj 03:56:34 sdfas 09:56:12 sdfa sd sss dg", then I want all of the ##:##:## have a line feed place right before and after each one.  The timestamps could be any time and the string could be anything.  Thank you!


What would you call someone who makes no lasting impression?

What word would describe someone who doesn't generally leave much of an impression on people?


Given that $$2017 = 9^2 + 44^2,$$ use this relation to find at least one group of positive integers $m$ and $n$ that satisfy $$2017^2 = m^2 + n^2.$$


Preserve blend mode effect when underneath layers are disabled? (Photoshop)

So I'm working with this image:   And I'm hoping to achieve an effect with it similar to what was done on this website , where independent image layers respond to mouse movements creating a sense of depth to the overall picture.  To do that I would have to break my image into several different layers. I'm not just not sure if that would be possible whilst still maintaining the original look of it, because a number of layers, particularly the music notes and their auras, heavily rely on blending modes like screen and color dodge, to achieve their glow. On top of that I make use of the "blend if"/"underlying layer" slider on many layers as well. If I try to disable the layers below them the blend modes lose their effect, but that's the only way I would be able to break the image down into the appropriate individual pieces.  Is there any possible way to break this image down in the way I'm aiming for? Most of the examples I've seen don't really work for what I'm ultimately trying to achieve with the depth effect. It may just be that the image is too complex for that.  Thanks


Individual user-generated saved responses

I am trying to see if anyone is aware of a plugin/utlity where I could keep a list of common responses like      "Welcome to Stack Overflow. This site is for..."    or      "Do you have any code we can build on? This would be a better question ....    If I VTC a question (on Stack Overflow for example) as unclear it won't add a comment. I try my best to add one manually and I end up writing the same text over and over.   Yes, I could keep a text document and save these responses there. I thought I might be able to find something on Stack Apps however I could not find exactly what I was thinking about.  Does anyone have any utilities they use for these sort of scenarios. My primary browser is Chrome if that influences the responses.


Find all functions such that $f(m)+f(n)|m^p+n^p$

For fixed prime number $p$, find all $f:\mathbb{Z}^+ \rightarrow \mathbb{Z}^+$ such that $f(m)+f(n)\mid m^p+n^p$ for all $m,n\in \mathbb{Z}^+$  I managed to get only that for prime $q$ we have $f(q)=q^k$ for some nonnegative integer $k$.


I have a laptop which I hook up to an external display when I'm at home. I also connected an external keyboard and mouse which makes it more comfortable for me.  I have noticed that pressing caps lock on the external keyboard does not light up the capslock indicator of the laptop keyboard (and vice versa).  When googling, I came across the setleds function, but when I type it into a console all I get is this:  KDGKBLED: Inappropriate ioctl for device Error reading current flags setting. Maybe you are not on the console?   Any idea if I can get this working?


Javascript Variables initialization types

I need to know the difference between these three types of variable initialization.   1)- The first type is using the "this" keyword.  var x=function (data1,data2){ this.data1=data1; this.data2=data2; }   2)- Second is using the "var" keyword...from what i know the var keyword makes the scope of a variable local which means that var can only be accessible when we are inside the function.    var x=function (data1,data2){ var data1=data1; var data2=data2; }   3)- Third type is without using any keyword..from what i know is that we don't specify the var keyword with a variable then it becomes global for the complete application. So you can access it any where you want...but in this case i think this would throw an error...because how would javascript know if data1 is a variable or a parameter (the passed on argument) ?  var x=function (data1,data2){ data1=data1; data2=data2; }


Wifi Router 'Region' setting - what does this affect? Transmission power?

I have a NetGear WGR614 wireless router.  There is a 'region' setting in the wireless options.  I'm wondering what technical purpose of this setting is?  The admin help states:     It may not be legal to operate the router in a region other than the region shown here.    Which makes me wonder if it could be adjusting it's max power output based on regional radio laws?


q is power of odd prime.How to show that  $-1$ is square in $\mathbb{F_q}$ if $ q=1(mod4)$ i.e order of field divide 4 and -1 is not square if $ q=3(mod4)$.  I know that since q is power of odd prime;  order of $\mathbb{F_q}^*$ is $q-1$ and its cyclic group of even order. I also know only element of order 2 there is -1. Then how to proceed for both this claims?


Are moderators required to report users younger than 13?

Users younger than 13 are deleted immediately once SE is informed about the case. The reason for this is , the US law intended to protect children online.  The guidelines as far as I understand them for me as a moderator are that I should report such users to SE, and they'll use a special deletion procedure to comply with the law.  The  about this topic made me wonder, am I actually required to report such cases to SE? I don't think this specific law serves any useful purpose in the case of SE, and I'm not a US citizen anyway. From that point of view I don't see any reason why I should help to enforce this.  But I am also a moderator, so I'm bound by a few more rules, the main one being the moderator agreement we all have to agree to. I'm acting on behalf of SE to some extent, but not really in a legal way as far as I understand.  Do I as a moderator have an obligation to enforce the minimum age here on SE, do I have to report any user below that age that I notice, or am I free to ignore such cases?