Are these 2 queries the same?  Query #1  select      e.last_name, e.first_name, d.department_name, l.city from      employees e inner      join departments d on e.department_id = d.department_id inner join       locations l on  d.location_id = l.location_id;   Query #2  select      e.last_name, e.first_name, d.department_name, l.city from      employees e, departments d, locations l where      e.department_id = d.department_id      AND d.location_id = l.location_id;


Choosing feature classes by wildcard from file geodatabase in ModelBuilder?

This must be easy and I have done it a few years ago (I can't recall if it was using a custom python script inside the model) but is there a way to select certain feature classes from a geodatabase to then feed it to another tool (merge in this case)? I tried Model Only tools - Select Data and Iterators - Feature Classes and Datasets to collect values but it doesn't work...  So I need to select all the files that have r_End_ for one merge and r_Start_ for a seperate merge. I had a look at  and  as well as the arcmap help.


So I've started playing Gathering Storm, built a bunch of coal plants and now Global Warming is out of control mainly because of me. I've been trying to remove these power plants, but I haven't found any option to sell/destroy or even replace these buildings.  Is there seriously no way to do this?


How do I display Chinese Character in Mac Excell 2011 using PHP

Good day everyone.  As the title above, I can print out everything perfectly but the Chinese Characters alien-ed me :(   I tested a few solution which is below:  <?php  //Some Database code //header("Content-Type: text/csv; charset=UTF-8"); *TESTED*  header("Content-Type: text/csv"); header("Content-Disposition: attachment; filename=pru90th_shoutout_messages.csv");  while($row = mysqli_fetch_assoc($result)) {     outputCSV(array($row)); }  function outputCSV($data) {   $output = fopen("php://output", "w");      foreach ($data as $rows) {     //fprintf($output, chr(0xEF).chr(0xBB).chr(0xBF)); *TESTED*     fputcsv($output,$rows); } fclose($output); } ?>   but miracle doesn't work on my side.  Again, I'm using MAC Excel 2011.  Please do let me know if there is other solution, I would willing to explore anything. Thanks in advance.


How to prepend a particular text file contents to every text file in a directory and its subdirectories?

I hate to clutter my source code files with licensing/attribution comments but some times it is a requirement. So having dozens of source code files (organized in a tree of subdirectories) written I need to add the same multiline comment to the beginning of each of them.  I suspect this is a very easy task to do with standard GNU/Linux command line tools though I am hardly proficient in making any serious use of them, so I beg your pardon and ask for your help.  What I need is to replace every theTargetFile.txt in ./*.txt (including in subdirectories recursively) with something like cat theCommonComment.txt theTargetFile.txt.   I would also prefer to exclude files fitting a particular more specific mask like consider all *.txt but leave *.DontTouch.txt intact.  I think the hardest part of what I actually need is a fancy find-based spell that would run through subdirectories, include *.txt files and exclude *.DontTouch.txt files.


I feel ill or sick. Both mean the same. But when they modify a noun, do they mean the same? For example,  Sentence A: He is a sick person.  Sentence B: He is an ill person.  Do they mean the same?  I want to know the difference because 'ill' can mean 'bad' in some senses.


Capacitance and introduction of conducting slab

If a parallel plate capacitor is fully filled with a conducting slab and is connected to a battery then how does current flows in the circuit?   As the electric field between the capacitor plates is zero then how does charge flows?  Does the capacitance of the capacitor infinite? Now consider an isolated capacitor which is charged and then we introduce a conducting slab then the whole charge on the capacitor should flow from one plate to the other and the capacitance should be zero but in all textbooks,  it is said that introducing a conducting slab will increase capacitance


How to resize the partition in ubuntu 14.04

I have only one partition right now. I want to make two partitions. But I am unable to do so. I am using GParted for this. Here is the screenshot of gparted.    When I click on resize. The minimum amount is always 0.


I am trying to configure Wifi Direct to connect to a 4.1 Android Phone. What are the correct steps to setup and configure wifi Direct to connect to a Phone that supports the same feature.


Make an object copy without memory reference

I have this code and I want to make a copy of characters[currentCharacter]  without a memory reference. Do I have to copy the value of each variable individually or there is some method that allows me to do it? public void Choose(object _info)         {             choosing = false;             characters[currentCharacter].SetDimentions(new Vector2(80,80));             world = new World(characters[currentCharacter]);         }  Character class public class Character: Unit     {         protected _Keyboard keyboard;         protected string name;         protected string description;         protected bool shield;         protected double currentTime;         protected float cooldown;         protected bool readyToShoot;           public Character(string _path, Vector2 _position, Vector2 _dimensions, int _ownerId, List<Projectile> _projectiles) : base(_path, _position, _dimensions, _ownerId)         {             keyboard = new _Keyboard();             shield = false;             readyToShoot = true;                                  }          public string GetName()         {             return name;         }          public string GetDescription()         {             return description;         }          public void SetShieldStatus(bool _status)         {             shield = _status;         }         public bool HasShield()         {             return shield;         }     }


The dragon ball super anime started last week.  I'm wondering when this takes place. I know it takes place after the defeat of buu, like a few months or something.  But with the releases of the movies I'm wondering where does those fit in? Can anybody answer me this?


Why couldn't Cobb show the totem to Mal?

In Inception, why didn't Cobb just spin the totem in the real world to show Mal that she is finally back to reality so she wouldn't have killed herself?


when doing global replace in javascript should I do /\%/g or /%/g

I am trying to replace all the occurrences of character % and _.    Say var inputStr = '_temp_temp2%temp3'; I can replace it by var replacedStr = inputStr.replace(/_/g, '\\_').replace(/%/g, '\\%');    And this also gives me the same result var replacedStr = inputStr.replace(/\_/g, '\\_').replace(/\%/g, '\\%');    What is the difference between these two? Is there any significance of putting that extra \ in second case? Currently I am getting same output for both the cases, is there any risk of using the first method i.e. without the escape caharacter \? I have tried to understand from , but didn't understand it properly.


What is the difference between Flash memory and EEPROM?

Flash memory storage and EEPROM both use floating gate transistors for storage of data. What differs between the two and why is Flash so much faster?


If I only use when needed, does enabling the "su" account present dangers?

So I'm the only the user of my computer, and I eventually figured out how to enable the "su" user on my account with a password (really quite simple actually), just in case I ever needed to do something where I would keep having to authenticate permission.  I have no fear of hackers because I'm such a discrete/boring internet user, but I was curious if enabling my su would make my computer more vulnerable to cyber attacks, or what your concerns would be if your computer contained more sensitive information or you had more of a reason to be paranoid.  Or do the Ubuntu makers just try to stop you from making a su account just to keep you from screwing up your computer?


If $G$ is a torsion-free group, such that there exists a subgroup $H \cong \mathbb Z$ of finite index, then $G \cong$?   I guess $G\cong \mathbb Z$. It clearly satisfies the requirements, but I'm afraid that there are multiple possibilities. Is this a characterization of $\mathbb Z$? Thanks in advance.


Compare to dictionary elements typescript

I've got model like this:    class Model {   from: number;   values: { [id: string]: number };   originalValues: { [id: string]: number }; }     Then I create arr = Model[] = [];  I need to check whether values match originalValues and that's how I do it:   for (let edited of this.arr) {   edited.model.forEach(m => {     if (Object.values(m.originalValues) == Object.values(m.values)) {     // console.log(equal);     } else {       // not equal     }   });   But even though they are equal, I always get not equal. Example of how values and original values look like:  originalValues: {11c33aaaaaaaaasafsdf33: 23.5} What I'm doing wrong here?


does the session_start() automatically gives a value to session_id after executing?

I was wondering if after starting the session, session_id automatically stores a value? or does session_id will ever have a value if some user successfully logged on the page?


How do I change the boot sequence on my computer?

I have windows Vista and Ubuntu 13.1 on my computer. It keeps trying to default boot to Windows. How do I change this?


I searched a couple of times today for an answer and received 0 results. I then asked a question, and was immediately downvoted due to it being a duplicate question. And it was almost a word-for-word duplicate. The weird part was that the search I did was almost word for word the title of the question that almost existed. So, I tried a couple more searches and received some interesting results.   I have included the 3 searches I performed to demonstrate what seems to me to be a faulty search. The first 2 searched returned 0 results, even though the second search was almost word-for-word; and the third had the answer I was looking for as the first answer.  Is this the expected search behavior?


How does the Girl-Genius web-comic relate to the Agatha H. books?

After spending some time reading  I was convinced to buy the book.  I've ordered what I think is the  in my local bookstore (yay local) and it seems to relate to the first one or two years of of web content, but I can't be sure.  My question is: "how does the book series line up with the Web comic?"  Does it contain specific episodes/adventures, relate to strips from a specific time-span or is it simply an assortment of episodes?  UPDATE: They are amazing.  It is interplanetary war in the introduction!!!!  Yes!


It seems that the Impact space has gotten larger and the Badges space narrower. In my opinion, this looks rather uncomfortable to me as there is that really unnecessary gray space.     Also, the X-axis of the reputation graph is broken:    Can this please be fixed?


In JavaScript can I make a "click" event fire programmatically for a file input element?

I'd like to make a click event fire on an <input type="file"> tag programmatically.  Just calling click() doesn't seem to do anything or at least it doesn't pop up a file selection dialog.  I've been experimenting with capturing events using listeners and redirecting the event, but I haven't been able to get that to actually perform the event like someone clicked on it.


I'm trying to solve the pde: $$u_t = (u_x)^{-1} \quad u(t,x) \geq 0 \text{ for positive real }x,t, \text{ and } u(0,0)=0$$  by separation of variables with $u(t,x) = f(t)g(x)$.  By rewriting with the substitution i get to $f f' g g' =1$. Trying to solve for $f(t)$ I keep $x$ constant so $g g'=c$ and then $ff' = \frac{1}{c}$.   From here though I can't see how to proceed, should I guess a function $f$ to satisfy this and if so how do I go about it?


vertical alignment of two columns in a beamer frame

I'm trying present two concepts side by side in a frame. And I want each lineitem to be vertically aligned. Here is is an example where they are not aligned.  \begin{frame}{An Example of using columns in beamer}  \begin{columns}  \begin{column}{0.48\textwidth} \color{red}\rule{\linewidth}{4pt} foo \begin{itemize} \item this is line 1 of foo \item this is line 2 of foo which is long \item this is line 3 of foo \end{itemize} \end{column}  \begin{column}{0.48\textwidth} \color{blue}\rule{\linewidth}{4pt} bar \begin{itemize} \item this is line 1 of bar \item this is line 2 of bar \item need this line to be aligned with line 3 of foo \end{itemize} \end{column}  \end{columns}  \end{frame}


What is the difference in meaning between "photo" , "image" and "picture"?

I checked some other questions, and found that "a photo is an image taken by a camera". But what is an image? What is the difference between image and picture?


Fatal error occurred, no output PDF file produced in php file

We are using following code in .php script for generate .pdf file.  $result1 = exec("R CMD Sweave /var/www/html/r/r_latex_sweave.Rnw");  $result2 = exec("pdflatex /var/www/html/r/r_latex_sweave.tex");   but, we are getting this errors when we are executing .Rnw and .tex files.  ! I can't write on file `r_latex_sweave.log'. Please type another transcript file name:  ! Emergency stop !  ==> Fatal error occurred, no output PDF file produced!  Note: We have .tex and .Rnw folder in /var/www/html folder?


I issued the command   sudo chmod 700 <directoryname>   in the hopes of getting the permissions for that directory to look like drwx------  Instead, they look like drwx--S---  Why does this happen and how do I go about removing the S?


If I root my Android phone, will I lose all of my data?

As the question title implies, if I root my Droid Incredible (or any Android phone), will I lose all of my data? I'm not interested in installing a custom ROM right now so will rooting cause me to lose my data? Also, which tool should I use to root the phone?  Edit #1: Based on a suggestion, I rooted my Incredible using Unrevoked, and I didn't lose any information.


How to determine the architecture of an installation or Live CD/DVD?

How can I determine which architecture (x86 or x64) my Ubuntu installation medium is for?  I don't have it installed, I just need to know which files on the installation media I can use to determine the architecture.


fancyhdr: Wrong page number for chapter* in the prefix

In my thesis I have a list of abbreviations between the list of tables and the first chapter. I want to continue the page numbering from the other prefix parts (roman) and then switch to arabic with the first page of the introduction.   I use fancyhdr and redefined the plain settings, which works great for everything except for my list of abbreviations.   The page right before is the list of tables with page number iii and the first page of the abbreviations has a iv. However, the second page of the list of abbreviations suddenly starts with a 1, followed by a 2 on the next page.   How do I get roman numbers for all pages of the abbreviations? The list is done using longtable. I tested using tabbing too and had the same problem.   My document class is \documentclass[a4paper,11pt,oneside, numbers=noenddot]{scrbook}  Here are my fancyhdr settings:  \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\chaptermark}[1]{%     \markboth{\MakeUppercase{\thechapter \quad \ #1}}{}}  \fancypagestyle{plain}{%     \fancyhf{} % clear all header and footer fields     \fancyhead[LE,RO]{\thepage} %pagenumber on chapter pages,     }  \fancyhf{} \fancyhead[LO]{\leftmark} \fancyhead[LE,RO]{\thepage}   The prefix part of the main document looks like this:  \renewcommand{\contentsname}{Table of contents} \tableofcontents \pagenumbering{roman} %start page numbering i, ii, iii, ... \renewcommand{\listfigurename}{List of Figures} \cleardoublepage \addcontentsline{toc}{chapter}{\listfigurename} %list of figures in table of content  \listoffigures  \renewcommand{\listtablename}{List of Tables}  \cleardoublepage   \addcontentsline{toc}{chapter}{\listtablename} %list of tables in table of content  \listoftables   \cleardoublepage \addcontentsline{toc}{chapter}{List of Abbreviations}  \input{pre/listA.tex}   and the input pre/listA.tex looks like this:  \chapter*{List of Abbreviations}  \markboth{LIST OF ABBREVIATIONS}{List of Abbreviations} \pagenumbering{roman} \setcounter{page}{4}  \section*{Symbols and units}   \begin{longtable}{lll}      $a_s$ & Angstrom constant - clear-sky days [-]  \\     $b_s$ & Angstrom constant - completely overcast days [-] \\ \end{longtable}  \section*{Abbreviations}  \begin{tabular}{ll}      ASCE & American Society of Civil Engineers \\     \end{tabular}  \renewcommand{\chaptermark}[1]{%     \markboth{\MakeUppercase{\thechapter \quad \ #1}}{}}


I use the following code and got an error while calculation a value inside enum:  enum elPosition {     p1(             (boxX*0 + boxX/2),             (boxY*0 + boxY/2)     ),     p2(             (boxX*1 + boxX/2),             (boxY*1 + boxY/2)     ),     p3(             (boxX*2 + boxX/2),             (boxY*2 + boxY/2)     );      private double xPosition;     private double yPosition;      elPosition(final double xPosition, final double yPosition) {         this.xPosition = xPosition;         this.yPosition = yPosition;     }      private static final double boxX = 10;     private static final double boxY = 10;      public double getXPosition() {     return xPosition;     }      public double getYPosition() {         return yPosition;     } }   If instead of calculation some value is used, no error occurs.


Is there any full jailbreak for iOS 11.4 except Electra (it's for 11.2 — I cannot downgrade cause Apple doesn't sign that firmware anymore)? Because, honestly I think that Pangu Anzuchang is not a full feature jailbreak as it's just a web clip application which does not inject a kernel exploit (as Electra does, that's why it restarts the device), so what will you suggest?   UPDATE  iOS 11.4 is a stable release now. Any jailbreak methods are available?


How to find the Partner Community and Company Communities total and used Licenses

I am working on a requirement and thereby I was trying to fetch the used and unused license statusfor a particular license. I am able to check the Salesforce Total and Used License through internal logic , However Unable to get the Partner Community and Company Communities license information through query.  Is there any way to do that.


This is a Main class:    package hrmInfoModule;          public class HrmMain {              public static void main(String[] args) throws Throwable {                          Admin_UserMgmt AUser = new Admin_UserMgmt();             AUser.login();             AUser.AdminUsrMgmt();             AUser.AdminAddEmployee();             AUser.AdminDeleteEmployee();             AUser.AdminRecordVerification();         }     }  This is a Parent Class     package hrmInfoModule;          import java.util.concurrent.TimeUnit;          import org.openqa.selenium.By;     import org.openqa.selenium.WebDriver;     import org.openqa.selenium.WebElement;     import org.openqa.selenium.firefox.FirefoxDriver;          public class Hrmlogin {         WebDriver driver;              public void login()     {         System.setProperty("webdriver.gecko.driver", "D:\\Software\\geckodriver.exe");         WebDriver driver = new FirefoxDriver();         driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);         String Url="https://opensource-demo.orangehrmlive.com/";         String ID ="Admin";         String Pswrd="admin123";         driver.get(Url);         WebElement login = driver.findElement(By.id("txtUsername"));         login.sendKeys(ID);         WebElement paswrd = driver.findElement(By.id("txtPassword"));         paswrd.sendKeys(Pswrd);         WebElement btn = driver.findElement(By.id("btnLogin"));         btn.click();     }     }  This is a Child Class package hrmInfoModule;  import java.util.List;  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.Select;  public class Admin_UserMgmt extends Hrmlogin{          WebDriver driver;     public void AdminUsrMgmt() throws Throwable      {               WebElement Admin = driver.findElement(By.xpath(("//*[@id='menu_admin_viewAdminModule']")));         WebElement UseMgmt = driver.findElement(By.xpath("//*[@id='menu_admin_viewAdminModule']/parent::li//following-sibling::ul//li[1]//a[@id='menu_admin_UserManagement']"));         WebElement UseMgmt2 = driver.findElement(By.xpath("//*[@id='menu_admin_viewAdminModule']//following-sibling::ul/li/ul/li/a"));         Actions act= new Actions(driver);         Thread.sleep(2000);         act.moveToElement(Admin).moveToElement(UseMgmt).moveToElement(UseMgmt2).click().build().perform();     } }  Error Exception in thread "main" java.lang.NullPointerException     at hrmInfoModule.Admin_UserMgmt.AdminUsrMgmt(Admin_UserMgmt.java:18)     at hrmInfoModule.HrmMain.main(HrmMain.java:9)  Now the problem is whenever I execute main class by object reference variable "AUser", it will not call login method of parent class as well as AdminUsrMgmt method of child class and shown error. Let me know how to handle exception in thread "main" java.lang.NullPointerException


How to restart gnome shell but daemonise it from a script?

I have a couple of scripts to work around Gnome Shell's inability to work well automatically when swapping between FHD (1080p) and UHD (4k) screens. I set various things with gsettings, restart nemo, but the final bit of the puzzle is how to restart gnome-shell.  If I do gnome-shell -r from my script then that process then owns gnome-shell, so I can't close the terminal without it killing the shell. Doh!  Is there a way to tell Gnome to restart itself and carry on running separately from the process that requested the restart?


The rep count for "today" has many issues

Please refer to this snapshot of my English.SE profile rep page:    I have found six items that are confusing. I think they are by design, but they really fail on being intuitive and passing the user friendly bar. I have color coded them for easy reference.   Red - The two red bars encapsulate the exact same thing. This reiteration implies that I have collected 10 upvotes and 2 downvotes for this question when I have actually collected half. Orange - The orange boxes show that the events count is not equal to the total below it. I presume that it relates to there being those events in the time block, but with all daily events listed below this looks like a count error. Yellow - The yellow boxes show that the number there does not equal the sum of what is listed below. Again, I think it is relative to the time next to it, but, again, this is confusing at best when the whole day's events are listed below it. Green - The total daily rep count in the green box is correct, but because of the reiterations, it does not equal the sum of the events below. Plus it looks like it is off by one for what it appears to be summing. Blue - This is a reiteration as well, though it shows different content.   My profile now shows correctly, but this has happened before on a different SE site (don't remember which one). I figured it was a fluke, but with it happening a second time I thought I should post about it.


Does there exist a nowhere monotonic continuous function from some open subset of $\mathbb{R}$ to $\mathbb{R}$? Some nowhere differentiable function sort of object?


Method for proving the functional completeness of connective sets

I've read that when dealing with sets of connectives, one approach to proving the functional completeness is taking an already known functionally complete set, i.e {$\land,\lor,\neg$} and try to express a given set,{$\rightarrow,\lor,F$} using the given f.c. one. However, I don't understand what it actually means for a set to be functionally complete, why {$\land,\lor,\neg$} is even complete at all and how one can prove/disprove the completeness of any set. Thanks in advance for any tips or pointers.


I have a navigation mesh. In Edit Mode, the coordinate of the first plane of the navigation mesh has a completely different coordinate than that of a cube mesh at the same location. How can I align the coordinates of both these objects?


Normal Maps can I create my own or download it?

How I can download or create my own what is normal map can we edit in Gimp or Photoshop ?


How does a <3000 rep user cast a close vote on their own question?

A question on The Workplace -  - was recently put on hold, but something looked funny in the close votes:        The author has less than the  to cast close votes but still managed to cast a close vote on their own question.  I guess voting on your own question is possible - but I would expect it to be subject to the same 3,000 rep requirement as any other close vote.  This seems strange. Is it the way close voting is expected to work?


How to recover drupal password in localhost?

I have a complete Drupal website on localhost. I forgot the password and username for my account. I found the username in the database, but the password is hashed.  I can't send emails from localhost, so recovering the password using the email is not possible.  How can I recover the password?


I am trying to draw a lattice in a coordinated plane such as this but have no idea how to do it. I have searched for similar posts but cannot find anything similar to this.


What causes changes in frequency in the Nation Grid electricity supply?

Following  in Britain this week, we were told that lack of power being generated led to a drop in the AC frequency as shown in this graph:    I understand why a stable frequency is important how how nationwide frequency is kept in sync but am not sure what exactly caused the drop in frequency and why.


I want to convert the code from C++ to C#, there is one line code regarding with memcpy. Not sure how to convert it.  memcpy(Bucket, nBucket, 4 * L);   The original code is from  I finished most of them except a few lines.


Is every noninvertible matrix a zero divisor?

Is every noninvertible matrix over a field a zero divisor?  Related to this: What are sufficient conditions for a matrix to be a zero divisor over a noncommutative ring?


Is hole in semiconductor really positive?

My confusion starts with HALL EFFECT. If Hall Effect is really true then holes should have a positive charge. But I have always and everywhere read that holes are just the electron deficiency and they move relatively, in the sense that electron moves in there position and hence relatively they move in opposite direction to the electron. So are holes "really" positive?  P.S.  this discussion didn't help.  Also  - I don't completely agree with this answer, as this answer says that electrons in valence band have negative mass, but according to what I have read 'holes' when considered as electrons in the valence band are said to have negative mass and not 'electrons'.


A simple attack on DESX in time $2^{120}$

Let $\mathcal{M}$ be our message space and $\mathcal{K}$ our key space. Now, let $\mathrm{E} : \mathcal{K} \times \mathcal{M} \to \mathcal{M}$ be a block cipher. Define the block cipher $\mathrm{EX}((k_1, k_2, k_3), m) := k_1 \oplus \mathrm{E}(k_2, m \oplus k_3)$, where $m \in \mathcal{M}$, $k_2 \in \mathcal{K}$, and $k_1$ and $k_3$ are of the same length as the message (I suppose I could write $k_1, k_3 \in \mathcal{M}$).  In the case of DES, we get , giving us a total key size of $64 + 56 + 64 = 184$ bits.  At the end of  (as well as what can be inferred from the Wikipedia entry), prof. Dan Boneh mentions that there is a simple attack on all block ciphers of the form $\mathrm{EX}$ in time $|\mathcal{K}| \cdot |\mathcal{M}|$, meaning a simple attack on DESX in time $2^{120}$.  I finished the course during this summer and generally had no problems, but could not figure this attack out for DESX / the general case. Can anyone explain to me what it is?


If $f(z)$ is differentiable, show that $|f'(z)|^2=(\frac{\partial u}{\partial x})^2+(\frac{\partial v}{\partial x})^2$.

Let $f(z)$ be a complex valued function which can be represented by $$f(z)=u(x,y) + iv(x,y).$$ If $f(z)$ is differentiable, show that $$\left|f'(z)\right|^2=\left(\frac{\partial u}{\partial x}\right)^2+\left(\frac{\partial v}{\partial x}\right)^2.$$ I am a beginner in complex analysis, so bear with me. In my solution, it is given that $$f'(z)=u_x + iv_x=\frac{\partial u}{\partial x} + i \frac{\partial v}{\partial x}$$ and things follow from here. My doubt is, how does the above came into picture. As far as i know, $f(z)$ is a complex valued function with real part as $u(x,y)$ and imaginary part being $v(x,y)$ which are both functions of $x$ and $y$. How does one calculate the derivative of $f(z)$ by taking partial derivative with respect to $x$ only? Any help would be appreciated from the community.


Python QtCore.Object Baseclass inheritance

I've searched around online for the answer however I was not entirely clear on the content i was readying so i figured i would post it here.  I wanted to know if the way I'm creating a class inheriting from Baker is being done correctly.  Say I have a base class:  class Baker(QtCore.QObject):      changedProperty = QtCore.Signal()      def __init__(self, **kwargs):         QtCore.QObject.__init__(self)         ...   Then I create classes based off of Baker like this:  class NormalBaker(Baker):     def __init__(self):         Baker.__init__(self, name='Normal Baker')         ...   is this correct?  UPDATED  Is this snippet of code the proper way to subclass from Baker?  def __init__(self):      Baker.__init__(self, name='Normal Baker')


Having a java program turn into a exe file

I'm still really new to coding, and was just wondering if the following was possible.  I created a program just for fun using java, and want to put the program on a USB stick for my friends to see. But after I finished the program I found out I can only make '.jar' files, which will need to have JDK installed to run.   Is there anyway to have my program converted to a exe file, so that my friends/family can see the program I created without having to install all the java files(jdk etc)?


Presumably the x86 was called so because the machines used  and  processors. Is that correct?  Is that the right way to refer to 32-bit and 64-bit machines?


People in a white room in space shrinking

So I watched this movie when I was younger (early 2000, I guess) and the only thing I remember is this one scene.  There were some people exploring the space and somehow they ended up in this white room and they shrank and in they were looking for someone in this form. And that's it and I am not even sure on the shrinking part, hah. But the white room/space stuck in my head.


lightning:select - Set default value based on sObject List from apex controller

Trying to populate an lightning attribute if a single record exists and if multiple records exists would like to provide the user a select list to choose the record then set the attribute.  I cannot seem to get the lightning:select to get its value to be set:  Component  <aura:component description="Account_Selection" controller="MyController">         <!-- Handle component initialization in a client-side controller -->         <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>          <!-- The list of accounts to display -->         <aura:attribute name="accounts" type="Account[]"/>          <lightning:select aura:id="a_opt" name="a_opt" label="Accounts"  onchange="{!c.onSelectChange}">             <aura:iteration items="{!v.accounts}" var="account">                 <option value="{!account.Id}">{!account.Name}</option>             </aura:iteration>         </lightning:select> </aura:component>   Controller  ({     doInit : function(component, event, helper) {         //console.log('here');         helper.getAccounts(component);     },      onSelectChange : function(component, event, helper) {         // Print out the selected value         var selected = component.find("a_opt").get("v.value");         console.log('@@@@@@@: ' + selected);     } })   Helper  ({     getAccounts : function(cmp) {          var action = cmp.get("c.getAccounts");          action.setCallback(this, function(response){             var state = response.getState();             if (state === "SUCCESS") {                 cmp.set("v.accounts", response.getReturnValue());                 cmp.set("v.accountId","ANIDTOTESTTHESET");                 var sel = cmp.find('a_opt');                 sel.set("v.value","ANIDTOTESTSETTINGTHEVALUE");             }         });          $A.enqueueAction(action);     } })   Now, the select DOES show the available select options but I cannot for the life of me get the value to be set via the code.   The above component is within a parent component as so:  <c:Account_Selection aura:id="a_selection"/>   The parent component has an attribute  <aura:attribute name="accountId" type="Id"/>   What I would like to happen:   If only one account record returned from the apex controller, set the value of the accountId attribute to the Id of that record If multiple accounts found, set the default value of the select list to a specific value and set the attribute value If user selects a value then set the value of the attribute   I have tried everything I can think of searched but cannot get it to work. The select list has all the options but the first value seems to always be selected regardless of the value I attempt to set.   The outPutText does not have any value despite explicitly setting it from the component..  Any ideas how to make this work?   Update  I think the issue is the "cmp" is not the lightning component it is the apex controller? How do i get a reference back to the component on the callback?


How to convert 160 digit binary string to 20 byte array?

I have a binary string containing 160 digit. I have tried:  new BigInteger("0000000000000000000000000000000000000000000000010000000000000000000000000000001000000000010000011010000000000000000000000000000000000000000000000000000000000000", 2).toByteArray()   but it returns the 15 bytes array with removed leading 0 bytes.  I would like reserve those leading 0 bytes, keep it 20 bytes.  I know some other ways to accomplish that, but I would like to know is there any easier way might just need few lines of code.


Same distance between chapter head and text / toc

With the following example, I get a different vertical distance between "Contents" and "1 bar 5" and "foo" and "Lorem". How do I get the first entry of the TOC to the same height as "Lorem ipsum", that is the base line should be the red rule in the image below:    \documentclass{book} \begin{document} \tableofcontents  \chapter*{foo} Lorem ipsum  \chapter{bar} Lorem ipsum   \end{document}


Is my mysql search secure enough to prevent basic injection attacks?

I recently have made a search engine using an html form , php and mysqli. What it does is whatever terms i put in the form it searches that in my mysql database and echos it back on my html page. So far its working as I wanted. However I have seen people warn for Mysql injection attacks on the tutorial i made this engine from so can anyone please check my code below and give me an advice.    <?php  $k = mysqli_real_escape_string($_GET['k']); $terms = mysqli_real_escape_string(explode(" ", $k)); $query = "SELECT * FROM xaplinks WHERE "; $i = 0;  foreach ($terms as $each) {  $i++;  if ($i == 1) {    $query .= "xap_name LIKE '%$each%'"; }  else {    $query .= "OR xap_name LIKE '%$each%'"; } }  $con = mysqli_connect('mysql.hostinger.in','steve','password', 'win');  $query = mysqli_real_escape_string(mysqli_query($con, $query)); $numrows = mysqli_num_rows($query);  if ($numrows > 0) {   while ($row = mysqli_fetch_assoc($query)) {     $name = $row['xap_name'];     $link = $row['xap_link'];      echo "$name
";   } } else {   echo "No results found. :( "; } mysqli_close($con); ?>     I read online that escape string in mysqli can help prevent injection so ive used it but not sure if its properly implemented. Im very new to mysqli.   Any help / tip would be appreciated , Thanks in advance. :)


Input of integer in the range of 10^1000

Is it possible to take an input of range greater than what C/C++ provides? Is it possible to accept an input range greater than that of unsigned long long and even larger up to the range of 10^1000? If it is possible in C/C++, please answer how it can be done, thanks.


Stored Procedures vs SQL in code, What is the Best Practice.

Currently we have developers writing SQL Queries written in java code, which is placed in over different areas of code.  The queries themselves are not much optimized. The DBA's cannot take ownership of optimizing the query as they are in application level.   Will writing each and every query in a stored procedure help to make this situation better ? What is the best practice to control the quality of SQL in the application ?


Data Explorer - You can only run 2 queries

So I tried running a query on the data explorer against stackoverflow.com and am faced with an error:    The thing is, I just visited the site to run a query, and haven't run anything since Friday last week. Does that mean I've got a couple of queries that are stuck running on the server? I've only used a handful from the "featured" tab so I'm surprised if anything has got stuck as these should be run fairly frequently surely?  Anyway - it doesn't run and I don't know how to fix it. Can anyone offer any suggestions?


Can a PSU start failing a week after installation with the same components to supply

I recently bought a desktop computer in parts. It worked nice for about a week and then it started rebooting weirdly.  I tried reinstalling the system but the problem persists. Is it possible that the PSU stopped working properly even though it did work for a week with the same components?  This is my set up :  MSI MPG X570 AMD RYZEN 5 3600 AMD RX580 2x8 GB corsair vengeance ddr4 1 SSD, 1 HDD Pcie WiFi card  PSU: Corsair VS650  Please, I need to fix this problem I have spent a lot of money on it.


Integrate $\frac{1}{x\,\log{x}}$ by parts

A naive indefinite integration of the function $\dfrac{1}{x\,\log{x}}$ can be performed as follows:  Let   $ \begin{eqnarray} I  &=& \int\dfrac{dx}{x\,\log{x}}\\ \therefore I &=& \dfrac{1}{\log{x}}\int\dfrac{dx}{x} - \int\left\{\dfrac{d}{dx} \left(\dfrac{1}{\log{x}}\right) \int \dfrac{dx}{x} \right\}dx\\ &=& \dfrac{1}{\log{x}} \cdot \log{x}-\int - \dfrac{1}{(\log{x})^2}\cdot\dfrac{1}{x}\cdot\log{x}\,dx\\ &=& 1 + \int\dfrac{dx}{x\,\log{x}}\\ &=& 1+I \end{eqnarray} $  This obviously leads to something like $1=0$. Can anyone please tell me what is going wrong? Thanks in advance.   PS. I know that the corrct answer would be $\log(\log{x})$.


Why doesn't LD_PRELOAD "v4l1compat.so" work with 64-bit Skype?

Possible Duplicate:          I am trying to troubleshoot my webcam and make it work with skype.  One workaround that is often suggested is to LD_PRELOAD the v4l1compat.so file. But when trying that, I get an error message:  fdr@maggie:~$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so skype ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored.   and I am rather sure the path is correct:  fdr@maggie:~$ ls /usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so  /usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so   and the kernel and skype have matching architecture:  fdr@maggie:~$ uname -a Linux maggie 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux fdr@maggie:~$ dpkg -s skype | grep Architecture Architecture: amd64   So my question is:  What is causing the "... from LD_PRELOAD cannot be preloaded: ignored" error message?


I have a few watched tags I would like to pay attention to. But the problem is when I'm going through StackExchange questions, sometimes I have to double check to see whether I have subscribed to that tag or not. This a problem when you don't remember all tags that you're subscribed. This could be easily avoided if we can easily identity watched tags from other tags.    However, this should not be aggressive or distractive. Users must always be able to focus on the questions.  This is an example...  Normal (without the feature): Watched  Tag:     Highlight (after feature implemented): Watched Tag:


How to specify font size less than 10pt (or more than 12pt)?

I'm trying to make a document that has a very small font throughout, I tried this:  \documentclass[0.5mm, a4paper]{article} \documentclass[7pt, a4paper]{article}   But it doesn't seem that they allow me to go anything below 10pt.  This hack make it work, but not for the section headers:  \fontsize{4mm}{5mm}\selectfont   Does anyone know any better ways to do this?


Page Object Model or External property file for Selenium Object Repository

I am a beginner in Selenium WebDriver (Java with TestNg). I'm trying to create a framework of my own.  My question here is what would be the better option to store my objects (basically all the webelements of my website under test), Page Object Model or External Property file? Why? Is there a better method than those? Please help.


How can my breadmaker made wholemeal bread taste less salty?

My wife makes my wholemeal bread as she insists. She says every recipe lists 5 grams of salt otherwise the bread will end up having missing patches in baked form- it has happened with early loaves. We live in Japan and the loaves here are rather small. The bread tastes salty. What are my options to reduce the salty taste while maintaining the result of a decent loaf of wholemeal bread?  I have heard that soy sauce can reduce salty taste in other foods. This recipe includes 50% wholemeal flour and 50%  self-raising flour.


I'm helping write a mod for Minecraft, and I've decided to try and code in some special capes for our staff, and people who win our contests. I've got it so it downloads the .txt files containing the player UUIDs, which works. I've also got it to display the capes just fine when I force it to.  Keyword... When I force it to. I'm a Java amateur, and I'm completely stuck on actually printing the file to a string. Other solutions I've seen print each line to a string, but that's not what I want. I want to print the ENTIRE file to a string, then set a boolean if it contains something which matches a string variable I have set earlier in the code. Printing the entire file shouldn't be an issue as it's a very small file.  So the reason why I don't want the above because the code I've Googled around for iterates using while statements and such. I'd assume that would be constantly changing the string to the line it's reading, so if I used one of these examples and checked for a matching UUID it'd set the variable to true if it found the matching one, then immediately set it back to false after it goes to the next line, right?  The reason why I made these assumptions, is that at this point it would take a long time to test something and find it isn't working and test again because I cannot use the test environment in Eclipse; for this to work I must compile my mod and log in with my account, since to get the information required with this code I need to log in with my account. The version I'm using is a little old (I am a Beta 1.7.3 player) and doesn't support the login variables. Even though I'm using Beta 1.7.3, our mod properly updates the game's authentication and allows the use of the Mojang API, so if you're wondering why or how I'm even trying to get UUIDs in that version, that is the reason.  The reason why I'm posting here and not a Minecraft forum or something is that while this code is for Minecraft, file checking stuff is a general Java thing, so hopefully, this is the right place. Sorry if this is considered a duplicate of a few other posts that cover file reading but I found my case to be a little different.  Also sorry if anything here is stupidly written, or confusing. I'm exhausted after playing with this all night and failing to do so, and thus my proofreading skills are basically gone.  Basically, all I need is to just set a boolean if a UUID that matches one in the downloaded text file. My goal is to set a boolean for the staff capes file and the contest capes files you can see, using a string variable and .toString().contains(profile.getId().toString()). Thank you in advance for reading this. Here's the code I use to grab and download the files in case you wanted to see it.           InputStream staff;          InputStream contest;           File staffList;          File contestList;          String capeInfo =  System.getenv("APPDATA") + "/.minecraft/capeinfo/";         try {             staffList = new File(capeInfo + "staff.txt");             staffList.mkdirs(); staffList.createNewFile();             staff = new URL("https://www.dropbox.com/s/q6f4729i2zu02nz/staff.txt?dl=1").openStream();             Files.copy(staff, Paths.get(capeInfo + "staff.txt"), StandardCopyOption.REPLACE_EXISTING);              contestList = new File(capeInfo + "contest.txt");             contestList.mkdirs(); contestList.createNewFile();             contest = new URL("https://www.dropbox.com/s/kvvkfk6emms3qg5/contest.txt?dl=1").openStream();             Files.copy(contest, Paths.get(capeInfo + "contest.txt"), StandardCopyOption.REPLACE_EXISTING);         } catch (MalformedURLException e) {             e.printStackTrace();             return;         } catch (IOException e) {             e.printStackTrace();             return;         }


Why is the covariant derivative of the metric tensor zero?

I've consulted several books for the explanation of why   $$\nabla _{\mu}g_{\alpha \beta} = 0,$$  and hence derive the relation between metric tensor and affine connection $\Gamma ^{\sigma}_{\mu \beta} $  $$\Gamma ^{\gamma} _{\beta \mu} = \frac{1}{2} g^{\alpha \gamma}(\partial _{\mu}g_{\alpha \beta} + \partial _{\beta} g_{\alpha \mu} - \partial _{\alpha}g_{\beta \mu}).$$  But I'm getting nowhere. May be I've to go through the concepts of manifold much deeper.


Is it possible to call AT-commands in android?

I am newbie in android, I have a very simple question for android experts:- " Is it possible to call GSM AT-Commands in android just like we use in microcontroller programming through USART".


Do the Elf creatures put into the battlefield by Planeswalker Nissa Revane suffer from summoning sickness?

The 3rd ability of  is   -7: Search your library for any number of Elf creature cards and put them onto the battlefield. Then shuffle your library.   So the question is do the Elf creature cards put into the battlefield as a result of this ability suffer from summoning sickness?


How to add SPF domain record for one email address only

I have a VPS hosting with public IP and custom domain. I am sending email from the server, but the email is recognized as spam by google. I want to add and SPF domain record. I could follow the documentation, but I could restrict it a bit more.  I use only one email address noreply@example.com. Should I add SPF record for that only one address? Or the entire domain?


Please consider the following MWE:  \documentclass{article} \usepackage[spanish]{babel} \selectlanguage{spanish} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \begin{document} Works: áéà  Does not work: \(\pmod1\) \end{document}   The áéà text is copied correctly, but if I try to copy (mód 1) it says: (m´od 1).  Does anyone know why this happens? How is it solved?  Thanks!


Does healing self-damage contribute to a healer's ult charge?

Let's say you're playing Mercy and your Pharah damages herself with her rockets until she's almost dead. Then, once the round starts, you start healing her. Does it help you build up ult charge?


im new to Java and Spring. Im doing my first app with Spring MVC Begginers Guide and i have problem with my "category" field validator. It doesnt work correctly.. Tbh It doesn't work at all.  category.java  @Target( { METHOD, FIELD, ANNOTATION_TYPE }) @Retention(RUNTIME) @Constraint(validatedBy = CategoryValidator.class) @Documented public @interface Category {     String message() default "{com.packt.webstore.validator.Category.message}";     Class<?>[] groups() default {};     public abstract Class<? extends Payload>[] payload() default {};     String[] allowedCategories() default {"Laptop","Tablet","Smartfon"}; }   CategoryValidator.java  public class CategoryValidator implements ConstraintValidator<Category, String> { String[] allowedCategories; public void initialize( Category constraintAnnotation ) {     this.allowedCategories = constraintAnnotation.allowedCategories(); } public boolean isValid( String value, ConstraintValidatorContext context ) {     for( String category : allowedCategories ) {         if( value == category ) {             return false;         }     }     return true; }   The problem is that everything i type in my "category" field it return that its not correct category :/  I was googling about my problem but didnt find anything :( Can somebody explain me what am I doing wrong :)? Thanks!


Null Exception Error while returning values to driver

So, this is my class which contains my constructor and accessor methods:  public class sac { // Initializing instance variables. private double bal; private double[] dep; private double[] wit;  /**  * Constructor for objects of class sac  */ public sac() {     //Declaring instance variables     bal = 500;      //Deposits:     double[] dep = new double[5];     dep[0] = 100.00;     dep[1] = 124.00;     dep[2] = 78.92;     dep[3] = 37.55;     dep[4] = 83.47;      //Withdrawals:     double[] wit = new double[7];     wit[0] = 29.88;     wit[1] = 110.00;     wit[2] = 27.52;     wit[3] = 50.00;     wit[4] = 12.90;     wit[5] = 15.20;     wit[6] = 11.09; }  /**  * Returns and sets the value of balance.  *  *   * @return bal  */ public double setBal(double b) {     //Declaring instance variables     b = bal;     return bal; }  /**  * Returns and sets the values of deposits.  *  *   * @return deposits  */ public double[] getDep() {     double[] d = new double[5];     //Deposits:     d[0] = dep[0];     d[1] = dep[1];     d[2] = dep[2];     d[3] = dep[3];     d[4] = dep[4];     return d; }  /**  * Returns and sets the values of withdrawals.  *  *   * @return withdrawals  */ public double[] getWit() {     double[] w = new double[7];     //Withdrawals:     w[0] = wit[0];     w[1] = wit[1];     w[2] = wit[2];     w[3] = wit[3];     w[4] = wit[4];     w[5] = wit[5];     w[6] = wit[6];     return w;     }  }   The code may be sloppy as I have been messing around trying to find out the solution to this error, however this is my driver which I am trying to run. The error occurs while trying to call my values from my accessor methods in the other class.   import java.util.*; /**   */ public class sacDemo { public static void main(String[] args) {     Scanner input = new Scanner(System.in); //Creates new scanner object.     sac sac = new sac(); //Creates accessor object to retrieve variables       from sac class.      int bal;     double air;     double[] dep = new double[5];;     double[] wit = new double[7];      double[] d = dep;     double[] w = wit;      w = sac.getWit();     d = sac.getDep();      System.out.println("What is your annual interest rate?");     air = input.nextInt();     air = air/10;      System.out.println("Your deposits for the month were: ");     for(int i=0;i<5;i++){          System.out.println(dep[i]);     }     System.out.println("Your withdrawals for the month were: ");     for(int i=0;i<6;i++){          System.out.println(wit[i]);     }  } }


What is the difference between "here we go" and "there we go"?

As a non-native speaker, I cannot grasp any difference between the expressions "here we go" and "there we go": both expressions seem to underline an event that is going to happen immediately.  Is there any subtle usage detail that I am missing?


What do search engines presently prefer us to use as word separators in URLs: dashes or underscores? Should I use  or ?


So, I am just starting out to learn Fortran programming. I am a complete newcomer to programming. I have little experience with Ubuntu. What are the recommended ways to install Fortran on Ubuntu?


Could you please give an intuitive definition of chemical potential?

Could you please give an intuitive definition of ? It seems that it is an extremely important notion of physics but definitions are really vague.


in the following code snippet:  import cv2 for color_space in (cv2.COLOR_RGB2HSV,                     cv2.COLOR_RGB2LUV,                     cv2.COLOR_RGB2HLS,                     cv2.COLOR_RGB2YUV,                     cv2.COLOR_RGB2YCrCb):        *print_it_as_name(color_space)*   With which real statement can I replace print_it_as_name such that the output is     cv2.COLOR_RGB2HSV   cv2.COLOR_RGB2LUV   cv2.COLOR_RGB2HLS   cv2.COLOR_RGB2YUV,   cv2.COLOR_RGB2YCrCb   Without hardcoding it using if statements?


I need to prototype something quickly as a proof of concept. Is it safe to use mains (UK 230V) on ? It will be going to a transformer so I can control some appliance. Or should I design a custom PCB to do this?


I got this problem from my textbook, not school. I tried various methods but was unable to solve the problem.  Let $\alpha$ and $\beta$ be the roots of the polynomial $x^2-3x+1$. I need to find the value of $$ \frac{\alpha^{2014}+\beta^{2014}+\alpha^{2016}+\beta^{2016}}{\alpha^{2015}+\beta^{2015}}$$


Can I somehow protect the whole Windows machine from stalling in case my 64-bit program consumes all memory?

Suppose I run some code which I know may contain a lot of defects. Those may be memory leaks or just bugs causing very high memory consumption. So let's say that today 8 gigabytes RAM is usual amount and that code gets crazy and consumes 8 gigabytes, then another 8 gigabytes forcing excessive page file operations, then 8 more gigabytes until the whole system just stalls. I tried that - Windows gets mostly unresponsive and useless in such case, the best bet is just powering the machine down and up.  Is there any way to protect the system from such cases? Perhaps some programmatic limits of how much memory the process is allowed to use?


Linebreak in definition heading (theorem package)

I have a problem with a too long line in the theorem environment. The following example shows the problem, I need a line break in the heading, but there is none. Any suggestions? \documentclass[a4paper,10pt,twocolumn]{article}  \usepackage{theorem} {\theoremheaderfont{\upshape\bfseries}  \theorembodyfont{\normalfont\slshape}  \newtheorem{definition}{Definition}}  \begin{document}  \begin{definition}[Long heading that should have a line break] A definition is a statement of the meaning of a term (a word, phrase, or other set of symbols). Definitions can be classified into two large categories, intensional definitions (which try to give the essence of a term) and extensional definitions (which list every single object that a term describes). A term may have many different senses and multiple meanings, and thus require multiple definitions. \end{definition}  \end{document}   Thanks for your help!


Question Why can I only choose certain sites for migrating a question? History This question has been asked before. Originally (6 years and 9 months ago):  and  Latest (3 years and 10 months ago):  Can we please revisit this issue? I find it asinine that I can't recommend that  be moved to .  What is currently suggested as a "solution" The latest official stance (from the original question) is:  The list of sites is limited because many people who vote to migrate do not fully understand the scope of the target site, or migrate questions that are of marginal quality, so many questions get migrated when they shouldn't be. This is further illustrated in Jeff Atwood's answer. Moderators do have this capability. If you do not have this capability in your "close as off topic" dialog, flag the question for moderator attention, with a comment specifying which site the question should be moved to, and we will migrate it if it is appropriate to do so.  (Bold emphasis is mine) Additional comments/questions I am trying to flag the question for moderator attention! How could it possibly be more convenient to flag a question in a jury-rigged way than to just give me the ability to flag it correctly in the first place? If for some illogical reason you don't want to give me the ability to choose any site to suggest migrating to, then why not add an option after the 5th and final choice of "Other", so it is obvious this is where I should write something in? As it is, it's complete guess as to what steps of flagging-button-presses I have to hit in order to get to an all-purpose "Other" page.


Prove that qubits can be represented on a unit sphere, avoiding the density matrix formalism

The Bloch Sphere is regarded as the most "intuitive" way of explaining a 2-level quantum system in computation and rotations of states described on Bloch sphere provides a really easy picture. Despite that, I've been having some problems with understanding this representation of quantum states. I read quite a few articles and answers on StackExchange too, but most of them try to explain things using Pauli Matrices and Density Matrices. But the real problem I've been struggling to solve and understand would be better stated as follows- Prove that a 2-level Quantum State (qubits) is mathematically equivalent to a point on the Unit Sphere in $\mathbb{R}^3$. Most of the explanations I've seen are based on hand-wavy arguments and lack proper formalism. I've been trying to prove this without involving Pauli matrices or Density matrices. By using the arguments of normalization and global-phase invariance, I've been able to deduce that we can write an arbitrary state as follows- $$|\psi \rangle=r|0\rangle + (a+ib)|1\rangle $$ where $r\in \mathbb{R}^{\geq0}$ and $ a,b\in \mathbb{R}$ with the constraint $r^2+a^2+b^2=1.$ If $a,b,r$ are the co-ordinates in the Cartesian system, then since we have $r\geq0$, the equation results in a hemisphere. If anyone has an explanation or a proof of how qubits have an equivalent description on the Bloch sphere, or some suggestion, I would be grateful.


Behavior of derivative near the zero of a function.

Suppose the function $f:[0,\delta) \to \mathbb{R}$ is continuous, differentiable in $(0,\delta)$ and $f(0)=0$.  If the limit $\displaystyle \lim_{x \to 0+}\frac{f(x)}{f'(x)}= L$ exists, then is it always the case that $L = 0$.  This seems to be true both for functions with well-behaved derivatives such as $f(x) = x,$  $$\lim_{x \to 0+} \frac{f(x)}{f'(x)}=\lim_{x \to 0+} \frac{x}{1}=0,$$  as well as functions with "bad" derivatives such as   $$f(x) = \begin{cases}x \ln x &\mbox{if }x>0 ,\\0  &\mbox{if } x=0,  \end{cases},$$  where  $$\lim_{x \to 0+} \frac{f(x)}{f'(x)}=\lim_{x \to 0+} \frac{x \ln x }{1+ \ln x}=0.$$  Is there a simple proof or counterexample?


Is it possible to convert vector graphics files into tikz?

I've not really used tikz much (to say the least); and I'm used to working on my diagrams in LibreOffice Draw and Inkscape, saving them as .osd or .svg files.  Is there a way I could convert those formats into (human-readable) tikz instructions which I could inline in my LaTeX code and maybe continue tweaking there?


I have answered . My answer had links to valuable information in context of the problem, but the conclusion was useless (striked through in my answer). Another user gave correct solution to the problem in question, in the comment to the answer.  I decided to quote his comment, so my answer would be more likely upvoted. (I could say also: to make my answer complete and more informational; but to be honest, in the end it is because of the reputation :) )  Although I quoted it, because of the reputation issue, I'm not sure how ethical it is. On the other hand, reputation is just a mechanism for getting quality answers to clearly stated practical questions, in short for the site to have the qualitiy and valuable practical information.   So, my questions are:   is this action ethical? is this action acceptable? does this action indeed add to the quality of solution of the problem in question (e.g for some unknown (probably, but not neccessary, non SO user) surfer who stumbles upon it searching for the solution)?


I've had this HP G72 notebook for about a year now. Yesterday I installed Ubuntu on it. (12.04, but it installed 12.10) When I had the install disc in the computer when I clicked try Ubuntu and whilst it was installing, the WiFi worked fine. Now that I don't have the disc in, it doesn't even show any networks to connect to. I've tried looking around for fixes but everything is for older Ubuntu versions and don't seem to work.  Output of lspci | grep -i Network:  03:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)


C Drive shows almost full space used, but not

C drive shows 1.8 gb free of 50gb on Windows 8 but when I select all the files(hidden files included) and check the property it shows 42.7gb. What could be the problem and what could be the possible solution?


Basic understanding of stress tensors in a fluid

So, after having spent the last 9 hours attempting to understand the basic tenets of stress tensors in fluids, I can honestly say that I think I know less now than when I began.  My questions are these: what precisely is a stress tensor in the context of fluid dynamics, and why is it the case that stress tensors are necessarily symmetric in this context?  One of the resources I found referred to the entries of the stress tensor matrix as being the representations of the directional stresses on an infinitesimal cube in a flow, supposing that this cube of fluid is static.  This would explain the symmetry of the tensor (since the fluid cube is not rotating, the shear stresses would have to be equal in magnitude at the corners), but it would also indicate to me that the perpendicular forces (the diagonal elements of the tensor) must all be zero, since the particle is also not translating in the fluid.  I know this is incorrect, but why?


LP Maximising a negative objective function

How can I turn this into canonical form and then use the two-phase simplex method to solve it?  $$max\quad -2x_1-x_2-x_3 \\ \text{subject to: }-x_1-x_3 \le -1 \\ -x_1+x_2 \le -2 \\ -x_2+x_3 \le -1 \\ x_1,x_2,x_3 \ge 0 $$  When I put it into the tableau with only slack variables there are no negative coefficients in the bottom room to find the column to pivot around


If the first Death Star had the weakness installed on purpose

If the first Death Star's weakness was purposely built in so the rebels could destroy it according to Rogue One, is the same true for the second? Because it seems like an even bigger weakness and you would've thought something like that would've been prevented considering what happened last time.


Does the Wall of Force spell block teleportation?

Does the Wall of Force spell in 5e block teleportation? This does not seem to be addressed in the 5e spell description.


Why it doesn't allow me to resize my partition?    I want to create separate partition for windows (7) but no idea how. /:


How to add a script to Startup Applications from the command line?

I have a shell script. I want to configure my script to run automatically during startup. I know how to do this from GUI. But I wanted to do this from terminal. How can I do this?  On a primary research I found that the file needs to be moved to /etc/int.d/ directory. But this operation needs sudo permission. I wanted to do this without super user permissions.   I also found that there are files under ~/.config/autostart/ which are having some settings regarding the startup applications. But I don't know how to edit them to achieve this.   Can someone tell me the exact procedure to achieve this?


Why does AES-GCM need a hash/MAC in TLS?

"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" is just one example for a cipher suite, as far as I'm concerned it means this:  It uses the TLS protocol, exchanges keys with Elliptic Curve Diffie Hellman Ephemeral, whose public keys are signed with RSA and afterwards AES 128 bit is used with the Galois Counter Mode, which provides authenticated encryption. The last function is a hash algorithm which is used for calculating the message authentification code for each packet.  Given that AES-GCM already provides integrity, why is an additional hash algorithm for authentication needed? Or am I mistaken with the interpretation of this?


Formally show that the set of continuous functions is not measurable

Let $C(\mathbb{R})=\{ f:\mathbb{R}\to \mathbb{R} \colon \ f \text{ continuous}\}\subseteq \mathbb{R}^{\mathbb{R}} $. How to prove formally that $C(\mathbb{R}) \notin \mathcal{B}(\mathbb{R}^{\mathbb{R}})$ (the product sigma algebra)?  The classic proof said that   $A \in \mathcal{B}(\mathbb{R}^{\mathbb{R}})$ iff exists $J\subseteq \mathbb{R}$ with $|J|\leq \aleph_0$ and $B\in \mathcal{B}(\mathbb{R^J})$ such that $A=B \times \mathbb{R}^{\mathbb{R}\setminus J}=\{f \in \mathbb{R}^\mathbb{R} \colon  \ (f(j) \colon \ t \in J) \in B\}$. In simpler terms,  $A$ only can have countable restrictions but the set of continuous functions have uncountable restrictions since every function on $C(\mathbb{R})$ needs to be continuous in every point $x \in \mathbb{R}$.  The last part of this proof always didn't satisfied me at all, and I don't really know how to do this proof formally.   Any help or references will be appreciated.


$x_1=\sqrt{2}$ and we have $x_{n+1}=(\sqrt{2})^{x_n}$. Find out the limit.

Suppose we have $x_1=\sqrt{2}$ and we have $x_{n+1}=(\sqrt{2})^{x_n}$. We have to find out the limit of the sequence.  I was observing that $x_2=(\sqrt{2})^\sqrt{2}$   and $x_3=(\sqrt{2})^{{\sqrt{2}}^{\sqrt{2}}}$ and so on now it is clear that the function is increasing. Now how to prove that the sequence is convergent and then how to find the limit? The calculative value is going towards $2$. But how to prove it!!


Hello ive been trying to work out how to do this for years and ive a feeling its one of them eureka moments when i go 'oh aye thats how you do it'. I think thats why i have never been able to find anything on it.  Using Views 3 my lists look like this when using total views and total comments-    and i would like to get rid of the label for a wee pic like this-   Could anyone point me in the right direction?  Thanks


How can I apply a texture to a single mesh face?

What is a simple way to apply a texture to a specific face of a mesh?


i still can't connect gt-s5360 Samsung phone to windows 7 PC but it charging i can't get "connect to pc" option and  i can connect another Samsung phone to PC with same usb cable


Proving no polynomial $P(x)$ exists such that $P(a) = b$, $P(b) = c$, $P(c) = a$

If $P(x)$ is a polynomial with integer coefficients and $a, b ,c$ are three distinct integers, then show that it is impossible to have $P(a) = b$, $P(b) = c$, $P(c) = a$.


how to insert % symbol in a statement without intending comment?

I wish to insert a % symbol in a line. But the rest of the statement goes missing since % is usually intended for comment. How can I resolve this problem?


I am new to Ubuntu and is trying to configure my environment so i can launch Sublime Text 2 directly from the terminal. I followed the solution on this post but no luck so far.  These are steps I did (steps from this ):   -> cd  -> mkdir bin -> sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl   In my .bash_profile I added:  export PATH=$PATH:~/bin  This is the error I got:  ~$ subl --help No command 'subl' found, did you mean:  Command 'subs' from package 'libsubtitles-perl' (universe)  Command 'publ' from package 'atfs' (universe)  Confusions:  First of all, I don't understand why we need to create a bin folder. This folder is now in Home/bin and I don't think I am using it. (I know there are two bin folders. One in File System/usr/bin and the other one File System/usr/local/bin. I am not sure the difference here.)  Second, I noticed  that after I ran the command above (sudo ln -s...) I created a link in my usr/bin folder. However, when I checked this link file, it said the link is broken so i suspect that there is something wrong with the sudo command I executed.   ERROR: This link cannot be used, because its target "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" doesn't exist.  This commnad:   sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl   Does /Applications/Sublime Text 2.app indicates the location of my sublime text 2? If yes, then my sublime text is actually in Home/Programs/Sublime Text 2. So should I change the command to sudo ln -s "/Programs/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl ?   I already tried this, but since there is already a link file in my usr/bin, I got an error when I tried to run the command above.   ERROR: ln: failed to create symbolic link `/bin/subl': File exists  When I attempted to remove it, it said permission denied.   Sorry, I am asking a lot because I am new to Ubuntu. Any help will be appreciated. Thanks a lot.


Do the spells from Drow Magic need slots to cast?  Or can they be used by characters without spell slots, like a fighter?


I have a big problem. I'm a beginner Ubuntu user. My laptop is a Lenovo Legion Y530 (Intel Core i7 8th Gen - 16 GB RAM - NVIDIA GTX1050). I'm running Ubuntu 20.04 LTS on it, and I had a problem with the Wi-Fi. When I turn on Ubuntu, the Wi-Fi doesn't find a modem. I tried lspci -knn | grep Net -A3, rfkill list and this is the output:   Subsystem: Lenovo ThinkPad E595 [17aa:b023]     Kernel modules: rtwpci 08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) 3: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no   Output of sudo lshw -C network:     description: Network controller        product: RTL8822BE 802.11a/b/g/n/ac WiFi adapter        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:07:00.0        version: 00        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: iomemory:ffffffff0-fffffffef ioport:4000(size=256) memory:a4300000-a430ffff   *-network        description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:08:00.0        logical name: enp8s0        version: 15        serial: e8:6a:64:ce:c7:7c        size: 1Gbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.208 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s        resources: irq:17 ioport:3000(size=256) memory:a4204000-a4204fff memory:a4200000-a4203fff   And when I tied ip addr show:  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host         valid_lft forever preferred_lft forever 2: enp8s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000     link/ether e8:6a:64:ce:c7:7c brd ff:ff:ff:ff:ff:ff 3: wlp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000     link/ether 48:5f:99:56:f1:a1 brd ff:ff:ff:ff:ff:ff     inet 192.168.1.41/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp7s0        valid_lft 3466sec preferred_lft 3466sec     inet6 fe80::3ba0:6306:9d97:c72a/64 scope link noprefixroute         valid_lft forever preferred_lft forever   Thank you very much!


Is it possible to get the focus away from a button inside an invisible panel to the form itself?

I've got a winform application (Formname f1). Inside that form is a Panel (p1) with 2 Buttons (b1 and b2).   The Panel is by Default enabled = false and visible = false.  Now when I press enter in the form (keypress Event) I make the Panel visible and enabled.  When I then click on a button (b1) and press enter again (preview_keyodwn Event) I do the following:  f1.ActiveForm.Focus p1.Enabled = false; p1.visible = false;   Now though when I press enter the Panel does not come visible again. After checking why I found out that the Focus is STILL on the button instead of the form itself.  Is there any way to set the Focus away from the button onto the form itself when the Panel goes invisible and disabled?


How much reputation do I get for positive feedback?

I have been using Stack Overflow for a month now. There are "yes" and "no" options for positive and negative response, respectively. I was wondering, how does this feedback affect my reputation?


Mouselag under Ubuntu 16.04. What can I do?

How can I get rid off my mouselag under Ubuntu 16.04?  The lag is not related to firefox or a webbrowser. Graphic card is regognized correctly.  nuc@nuc:~$ sudo lshw -c video [sudo] password for nuc:    *-display                       description: VGA compatible controller        product: Haswell-ULT Integrated Graphics Controller        vendor: Intel Corporation        physical id: 2        bus info: pci@0000:00:02.0        version: 09        width: 64 bits        clock: 33MHz        capabilities: msi pm vga_controller bus_master cap_list rom        configuration: driver=i915 latency=0        resources: irq:45 memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64)


$$\frac{dx}{dy} = \frac{x(\alpha - \beta y)}{y(\delta x - \gamma)}$$    How do I extract two differential equations (y as a function of x and x as a function of y) from the equation above? I could separate the variables, but I don't see how that would help.


I've been at this all day and I just can't seem to figure it out. Our client wants us to save their uploaded files into a table in our database (mssql). There is no restriction as to what kind of files they could upload so following the limited knowledge that I had I did a bit of googling and tried the following:  I created this table:  CREATE TABLE files   (     id int NOT NULL PRIMARY KEY IDENTITY,     name varchar(256),     content varbinary(max) NOT NULL,     type varchar(30) NOT NULL,     size int NOT NULL     table_id INT NOT NULL FOREIGN KEY REFERENCES myTable(id)    );   And then I try to add content like this:  $newfileName = $_FILES['uploadfile']['name']; $newtmpName  = $_FILES['uploadfile']['tmp_name']; $newfileSize = $_FILES['uploadfile']['size']; $newfileType = $_FILES['uploadfile']['type'];  //need to get the content of the file $fp = fopen($newtmpName, 'r'); $file_content = fread($fp, filesize($newtmpName)); $file_content = $file_content; fclose($fp);  $sql = 'INSERT INTO files ([name], [content], [type], [size], [table_id]) VALUES ("'.$newfileName.'",CAST("'.$file_content.'" AS varbinary(max)),"'.$newfileType.'","'.$newfileSize.'","'.$table_id.'")';   but it just doesn't work... I can upload txt files no problem but anything else will just break. I get errors like the following (which are different with every file):     [42000][105] [Microsoft][SQL Server   Native Client 10.0][SQL   Server]Unclosed quotation mark after   the character string '����'.   [42000][102] [Microsoft][SQL Server   Native Client 10.0][SQL   Server]Incorrect syntax near '����'.   Now I figure this is a problem with the content of the file breaking the SQL but I have NO CLUE how to deal with them (or how to convert them into a string that won't break the sql). Any help would be greatly appreciated as I am completely lost with this.  (Yes I know I haven't protected myself from attacks here, but right now I'm just trying to get the basics to work)


Does the Infestation cantrip cause the target to provoke opportunity attacks?

Infestation is one of the new cantrips from Unearthed Arcana: Starter Spells. Here is the relevant text     The target must succeed on a   Constitution saving throw or take 1d6 piercing   damage. If the target takes any of that damage,   the target moves 5 feet in a random direction.   Roll a d8 for the direction...   Does the target's movement here provoke opportunity attacks from any of my adjacent allies?


How does one achieve a 'shimmering' effect similiar to the ones from the Pokemon games?

I have an assignment to make a game in C++ using Winapi. As such I've decided to recreate pieces of the Pokemon games. I'm pretty well underway with the project, but there's one effect I would like to achieve that I don't really know how to achieve.   It can first be seen just before the game's title screen. (Pictured below)   As you can see, the logo sort of 'shimmers' from left to right a few times.  A similiar effect can be seen inside of combat when a pokemon's stats are altered. (Pictured below)   The effects I am talking about are the reddish shimmer appearing on the wolf (Poochyena), and the blue 'waves' appearing on the beaver (Bibarel).   I would like to know if there is a generalized method of applying such effects, as I aspire to have more than one Pokemon in the project, and I would therefore want a method that works on all cases. If the effect cannot be effectively achieved using winapi, then I am open to suggestions of other libraries, etc, to use.


Why is $\lim_{n\rightarrow \infty}\sqrt[n]{n!} = \infty$?

Why is $$\lim_{n\rightarrow \infty}\sqrt[n]{n!} = \infty$$ if : $$\lim_{n\rightarrow \infty}\frac{n!}{n^n} = 0 \implies n^n >n! \quad\text{for "big" n}$$ I don't understand it.


How would one go about recreating this "flowchart" in LaTeX?

There's an interesting flowchart that I came across with various things I wouldn't expect to normally see in a flowchart. Parts of it are fairly straightforward to implement using tikz, such as A, B, D, and the conclusion box. The arrows themselves also shouldn't be too difficult, but I'm unsure of the best way to draw arrows to the breaks shown in the flowchart (rather than to other boxes), and I'm also unsure of how to create the breaks themselves. Is there another flowchart creation package I should know about, or maybe there's a way to modify tikz to work for the below example?  Any help would be appreciated!


Proving $T$ and $U$ are equal if I know $(X,T)$ and $(X,U)$ are hausdorff and compact

This question is from Wayne Patty Exercise 4.2  Let $T$ and $U$ are Topologies on set X. Suppose $ (X,T) $ and $(X,U)$ are compact Haurdsorff Spaces. Prove that $T=U$ or $T$ is not a subset of $U$ or $U$ is not a subset of T.  I thought of proving it by this way: Assuming that if $T$ is a subset of $U$ or $U$ is a subset of $ T$ then $T=U$ must be true. But I was unable to think on how to use compactness or hausdorff property and was unable to proceed. Well, also this question was asked before on this website. But I am unable to understand how the solution will work despite trying to understand it for a fair amount of time as it was just outlined. So, I am looking for a detailed solution.


How to make a new command for inserting an inline matrix?

I know I will be doing many calculations with the basis vectors (1,0) and (0,1) so I'm trying to define a command so I can write this vector inline. However, I'm getting the following error: "LaTeX Error: Missing \begin{document}."  Here is my code:  \documentclass[11pt]{article} %  \usepackage{fullpage} \usepackage{graphicx} \usepackage{graphics} \usepackage{psfrag} \usepackage{amsmath,amssymb} \usepackage{enumerate} \usepackage{amsthm} \usepackage{scrextend} \usepackage{float}  \setlength{\textwidth}{6.5in} \setlength{\textheight}{9in}   \newcommand{\basis0}{\bigl[ \begin{smallmatrix}1\\0\\ \end{smallmatrix}\bigr]} \newcommand{\basis1}{\bigl[ \begin{smallmatrix}0\\1\\ \end{smallmatrix}\bigr]} \begin{document}    The vectors $|0\rangle = \basis0$ and $|1\rangle = \basis1$ are useful for...   \end{document}


Group of order $p^k q$ where $p$ and $q$ are distinct primes - how to prove this property?

I'm trying to figure out this problem:  Problem: Let $G$ be a group of order $p^k q$ with $p$ and $q$ distinct primes and $k \in \mathbb{N} \setminus \left\{0\right\}$.   a) Prove: $G$ has a subgroup of order $p^k$, or $p$ divides $|Z(G)|$. (Here $Z(G)$ means the center of $G$).   b) Prove: if $p$ divides $| Z(G)|$, there there exists an $x \in Z(G)$ of order $p$.   Attempt: For a) I tried proceeding by induction.  Base step: Assume $k=1$. Then $|G| = pq$ with $p \neq q$. Case 1: if $G$ is commutative, then $Z(G) = G$ and then $p$ divides $|Z(G)|$.   Case 2: Assume $G$ is not commutative. Then the center of $G$ is trivial, i.e. $Z(G) = \left\{e_G\right\}$ (this is a theorem of group theory). So $p$ does not divide $|Z(G)|$. Then we must show that $G$ has a subgroup of order $p$. Let $H$ be a non-trivial subgroup of $G$, that is $H \neq G$ and $H \neq \left\{e\right\}$. Then by Lagrange, $|H|$ divides $pq$. So we must have either that $|H| = p$ or $|H| = q$ (is this correct? Since $H$ is non-trivial). If $|H| = p$ then we are done. If $| H | = q$, then $|G / H| = p$ and so $G/H$ is cyclic. I want to derive a contradiction from this, and so show that $H$ cannot have order $q$, but I don't know how.  Induction step: Assume the claim holds for $|G| = p^{k-1} q$. We must then show that it also holds for $|G| = p^k q$.  I want to use the class equation. We have that $$ p^k q = |Z(G)| + \sum_{i=m+1}^n |Cl(a_i)| $$ where $|Cl(a_1)| = \ldots = |Cl(a_m)| = 1$ and $|Cl(a_i)| > 1$ for $i > m $. Since $p$ is a divisor of the LHS, it must also divide the linear combination. But how can I conclude from this that $p$ divides $| Z(G)|$ ? I don't know how to use the induction hypothesis.   b) Assume $p$ divides $|Z(G)|$. I first assume that $G$ is abelian. Then by structure theorem for finite abelian groups, we know that $$ G \cong \mathbb{Z}_{p_1^{k_1}} \oplus \ldots \oplus \mathbb{Z}_{p_r^{k_r}}. $$ This means that $$ p^k q = p_1^{k_1} \ldots p_r^{k_r}. $$ So $p | (p_1^{k_1} \ldots p_r^{k_r})$ and so since $p$ is prime, $p$ must divide at least one factor. Assume that $p$ divides $p_i^{k_i}$. Since $p_i^{k_i} = p_i \ldots p_i$ with $k_i$-amount of factors, we must again have that $p$ divides $p_i$. So $p = p_i$.   Now, since every $\mathbb{Z}_{p_i^{k_i}} = \mathbb{Z}_p^{k_i}$ is abelian, we have that the center equals the whole group. Let $x_i$ be an element in this center. Then $order(x_i) | p^{k_i}$ and so $order(x_i) | p$. Hence the order of $x_i$ equals $p$ in $\mathbb{Z}_p^{k_i}$. Since $x_i$ is also in $Z(G)$, this concludes the proof?   And what about the case that $G$ is not abelian?  Help with this problem is appreciated!


How can I convert a capacitor circuit to a simpler one?

In the given question we have to find equivalent capacitance across A and C .  I do not understand how can we convert the given circuit into a simpler one or if that can not be done how do we find the equivalent capacitance of such a complex circuit .


Prove that matrix $A=c \cdot I$ where $I$ is an identity matrix

Prove that $AB=BA$ for all $B \implies A=c \cdot I $ for some $c$ where $I$ is an identity matrix.    Both $A,B\in M_{n \times n}.$ I don't know how attempt proof.


Estimated value of $\sum \limits_{i=1}^{50} \frac{1}{2i-1}$?

Anyone has any idea the estimated result(no need to be accurate) of $\sum \limits_{i=1}^{50} \frac{1}{2i-1}$? I think this problem is not hard but I don't have a generalized method to solve!  And I also remember this problem related to a very famous probability problem, any one has any idea? Thank you!


I'm upgrading from 18.04 to 20.04. Which of these files are the most important to backup?

I know most of the information I use in my daily basis is stored in the home folder, however, I want to be sure nothing important is left out of the backup. Edit: Which command I use to copy these files into an external HD?


I need an OS that I can install on older XP computers. I do not understand computer slang, brain is too aged. I do print instructions that use words identical to what is found in the OS.  So I need to BUY a plug & play option with simple settings. I am limited to dialup, long downloads fail because of telemarketer intrusions.  The OS needs to be proven & current & available in Ontario Canada. Can someone help this senior get out of the failing XP?


hello guys i need some help on how to model ponies, i couldn't start because i don't know what to do. Reference image is there, now what? YouTube is lacking of tutorial about modeling ponies. Hope to get some answer


How can I express in an informal way that I've eaten, and ready to continue what I was doing before, akin to saying that my phone's charged up, or a petrol tank has been filled up?  For example:     User A: Are you ready?      User B [who's just had lunch]: Yep, I'm ready. I'm [fed up] and ready to continue.


f is analytic on $D(0,1)\setminus\{0\}$ with an essential singularity at $0,$ show f is not one-to-one

I am working on following Question;  f is analytic on $D(0,1)\setminus\{0\}$ with an essential singularity at 0, show f is not one-to-one.  I am a bit stuck. All I have been able to figure out is the following;   $\lim_{z \rightarrow 0} f(z)$ does not exist since the singularity is not removable. $f(D(0,1)\setminus\{0\})$ is open by the Open Mapping Theorem $f(D(0,1)\setminus\{0\})$ is dense in $\mathbb{C}$, by Casorati-Weierstrass.   Now I suspect that we should try the proof by contradiction route and suppose that $f$ is one-to-one and show that then the singularity is maybe not essential, potentially removable. Or maybe we should construct two sequence converging to different limits while the images of the sequences converge to the same thing.  Cheers for the help in advance; If possible please do not give the whole answer but rather give hints and when I feel I have a solution I will post it as an answer (Of course I will accept the most useful hint as the answer to this question)


How to completely uninstall gnome-shell and all extensions?

I'm having a bit of trouble getting gnome-shell to work ever since I installed an extension (I don't know which) on 11.10. So what I would like to know is: How can I completely uninstall EVERYTHING gnome-shell related (all the extensions, gnome-tweak-tool, etc.), everything - so I can start fresh and re-install 'em all one by one?  Thanks in advance.  EDIT: After a long and hard search (for me anyway) I found it:  sudo apt-get remove gnome-shell-extensions-*


how JVM does memory management(or efficiently use memory) for the interface references?

we always use this code   List mylist=new ArrayList();   I look this statement into deep and i found that mylist is an interface reference which is referring to the ArrayList which is a class.I found(on internet) that there is some benefits of it like Loose coupling ,memory management etc.But How ?what are the benefits of using interface refernce?


How do you normalize a file path in Bash?

I want to transform /foo/bar/.. to /foo  Is there a bash command which does this?    Edit: in my practical case, the directory does exist.


I was reading the first chapter (about divisibility) of Elementary Theory of Numbers by W.Sierpinski and I stumbled upon the following exercise:     Prove that if $a$ and $b$ are natural numbers, then $a!b!|(a+b)!$   the book provide an answer that rely on the fact that the theorem is true if at least one of the numbers $a$ and $b$ is equal to 1, since for each natural $b$ we have $(b+1)!=b!(b+1)$, whence $1!b!|(1+b)!$. And by using induction the theorem is proved to be true for all natural $a$ and $b$.  I'm curious if there is annother answer that doesn't rely on induction.


Can we equip the power set $P$ of any set $S$ with a binary operation such that $P$ becomes a group (with some restrictions)?

This question is inspired by .  Please read my answer there to get better context. Settings. Let $S$ be a (not necessarily finite) set, and $P$ the power set of $S$ (i.e., $P$ is the set of all subsets of $S$).  A binary operator $*:P\times P\to P$ is said to be elementary if it can be given in terms of the standard set operations: the union operator $\cup$, the intersection operator $\cap$, the set difference operator $\setminus$, the symmetric difference operator $\triangle$, and the complement operator $(\_)^\complement$. Some Examples.  This operator $\star$ is considered an elementary binary operator: $$A \star B:= \big((M\setminus A)\cup (B\cap N)\big)^{\complement}\triangle \Big(A\cup B^\complement\Big)\text{ for all }A,B\subseteq S\,,$$ where $M$ and $N$ are fixed subsets of $S$.  On the other hand, if $|S|=2$, then this operator $\bullet$ is not an elementary binary operator: $$A\bullet B:=\left\{ \begin{array}{ll} S&\text{if }A\subseteq B\,,\\ \emptyset&\text{otherwise}\,, \end{array}\right.$$ where $A,B\subseteq S$ (a proof can be done by imitating ).  Question.  For which groups $G$ of order $2^{|S|}$ does there exist an elementary binary operator $*:P\times P\to P$ such that $(P,*)$ is a group isomorphic to $G$?  If the case where $S$ is an infinite set is too troublesome, then an answer in the case where $S$ is a finite set is very welcome.  Let $n:=|S|$.  Write $Z_k$ for the cyclic group of order $k$. Trivial Answer.  When $G\cong Z_2^n$, then the binary operator $\triangle$ does the work.  My conjecture is that there are no other groups. Known Result.  When $|S|=2$ and $G\cong Z_4$, then there does not exist such an elementary binary operator.


Are sets constructed using only ZF measurable using ZFC?

Suppose $S$ is a subset of $\mathbb{R}$ which can be defined without using the axiom of choice, i.e. which can be proved to exist using only the axioms of ZF. Does it follow that $S$ is measurable?  We know that ZF + "All subsets of $\mathbb{R}$ are Lebesgue measurable" is consistent (assuming ZF is), but the claim doesn't follow from this alone, since there could be a proof that $S$ is not measurable which uses choice.


javascript doesn't work on html elements from an included html file

I have an out of the box theme that works fine using jquery events to trigger certain effects in both the header and the sidebar parts of the page.  Since there are many pages, I've tried to take those header, sidebar and footer sections, and move the code into external files, which are included with the following javascript strategy:

        The problem is that when the header and sidebar codes are included using the javascript the jquery events stop working. Is there either a better way to include an external file so that javascripts called in the parent file will affect all elements in the child files? Or, is the something else that I can do?


Ubuntu 18.10: visual artifacts (black bar) in dock if extend-height is disabled

I am using the default Ubuntu dock with bottom placement and org.gnome.shell.extensions.dash-to-dock extend-height set to false. With Ubuntu 18.10 this produces a noticeable visual glitch, note the black empty spaces at the edges of the dock:    I am getting this both on an upgraded system and on a clean install inside a VM. This was working fine in Ubuntu 18.04. Also happens if the theme is set to something else than Yaru (the default theme in Ubuntu 18.10). Reboot does not help. Dock looks OK if extend-height is enabled.  Any ideas on how to fix this?


PHP: can't encode json with multiple rows

I've spent a couple of hours looking through several the similar answers before posting my problem.  I'm retrieving data from a table in my database, and I want to encode it into a JSON. However, the output of json_encode() is only valid when the table has one single row. If there is more than one row, the test at  returns an error.  This is my query:  $result = mysql_query($query);      $rows = array();      //retrieve and print every record     while($r = mysql_fetch_assoc($result)){         $rows['data'] = $r;          //echo result as json         echo json_encode($rows);     }   That gets me the following JSON:  { "data":      {         "entry_id":"2",         "entry_type":"Information Relevant to the Subject",         "entry":"This is my second entry."     } }   { "data":{         "entry_id":"1",         "entry_type":"My Opinion About What Happened",         "entry":"This is my first entry."     }  }   When I run the test at , it returns this error:      Parse error on line 29:     ..."No comment"    }}{    "data": {         ---------------------^     Expecting 'EOF', '}', ',', ']'   However, if I only use this first half of the JSON...  { "data":      {         "entry_id":"2",         "entry_type":"Information Relevant to the Subject",         "entry":"This is my second entry."     } }   ... or if I only test the second half...  {     "data":{         "entry_id":"1",         "entry_type":"My Opinion About What Happened",         "entry":"This is my first entry."     }  }   ... the same test will return "Valid JSON".  What I want is to be able to output in one single [valid] JSON every row in the table.  Any suggestion will be very much appreciated.


Achieving ideal credit card utilization above 0%

So everyone is aware of the general rule that you should keep credit card utilization below 30% of your credit limit. It's also a good idea to keep this utilization above 0%.   It's very easy to stay below 30% if you just always keep your balance below 30%. Whenever you get close to that 30% ceiling, you pay it down, or pay it in full.  What isn't so easy is making sure you stay above 0% without carrying a balance. A lot of websites say "You don't have to carry a balance. You should pay it in full before the due date every month. Just using your card is enough to show activity". That sounds great and all, but it doesn't specifically address how that ensures you don't have 0% utilization if you zero out your balance every month.  For example, I have had a Wells Fargo credit card for about a year now. I have used the max available credit every single month, and then paid it off in full at the end of the month. I just signed up on Mint.com and with that I got a free credit report. My credit card utilization on the report was 0% even though I maxed out my limit every month.  Ideally, I'd like my utilization to be 20-25%. Is it even possible to attempt to achieve this, or at least get it above 0%?   It seems like you need to know when your specific issuer reports your information to each of the 3 credit bureaus, or more importantly, at what point during the month they are taking this "snapshot" of your balance that gets reported to each bureau.  If anyone could have an answer to this, specifically for Capital One, that would be great. I'm switching to their quicksilver card.  Basically, I want to ensure that I maintain a utilization rate greater than 0%, while paying my balance in full every month.


Can someone send me a link to the first question on SO?


I'm on Ubuntu 18.10. Two packages which I'd like to use won't start up. First is pdfsam. Starting from terminal I get the following output:      Exception in thread "main" java.lang.NoClassDefFoundError: javafx/scene/layout/HBox     at java.base/java.lang.ClassLoader.defineClass1(Native Method)     at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)     at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)     at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)     at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)     at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)     at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)     at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)     at org.pdfsam.community.App.main(App.java:34) Caused by: java.lang.ClassNotFoundException: javafx.scene.layout.HBox     at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)     at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)     ... 10 more   Second one is mediathekview. Here the output is as follows:  Fehler: Hauptklasse mediathek.Main kann nicht initialisiert werden Ursache: java.lang.NoClassDefFoundError: com/jidesoft/utils/ThreadCheckingRepaintManager   I had purged and reinstalled both packages and java components, but still fails.  Any ideas please how to fix this?  Kind regards  Stefan


Where does the earths magnetic field originate

To my knowledge my knowledge magnetism comes either from an electric current flowing through an object or from a permanent magnet which can be created by heating certain ferrous metals to specific temperatures for the material. To get to my question: I have been told that the  core is iron and a permanent magnet formed from the process above, I since seen an article reporting that the core of the earth is thought to be 7000° C  yet the curie temperature for iron is about 780°C so this doesn't make sense to me. Could someone explain where this magnetic field originates to me?


Let $R$ be a ring and let $f(X)$ be a nonzero polynomial in $R[X]$. The content of $f$ is the ideal $c(f)$ generated by the coefficients of f.   The ring is called Gaussian if $c(fg)=c(f)c(g)$ for all $f,g \in R[X]$.     Do you know an example where $c(fg)\neq c(f)c(g)$?   Thanks a lot.


public class SubiectLicentaTrei {     public static void main(String args[]) {         double d = 12.34;         ScadeUnitate su = new ScadeUnitate();         su.scadeUnitate(d);         System.out.println(d);     } }  class ScadeUnitate {     public void scadeUnitate(double d) {         d = d - 1.0;     } }   Outputs 12.34 when I expect 11.34.


Time synchronization between computers offline

I have five computers with two of them with windows 7 and others have windows server 2012 OS. There is no internet access in the LAN. I want to sync the time automatically by making one of them as NTP Server others are clients. According to my research, meinberg NTP software should works in my cenario but I was unable to achieve my goal. Is there any another way?