A number of years back, while on Linux Mint 11, in the Software Store(not the actual name but you get the idea) I happened across Celestia, a fun little Astronomy program.  It seems as though it has been wiped out since then.  Is there somewhere I can get this program for installation in Ubuntu 18.04?  I really enjoyed this program, and would like to have it again.

Like the title said, I want to install Celestia. I already downloaded the packages  and then, I tried all the things that I found on some posts (also, they're outdated, cause the last one is for Ubuntu 16.04) but nothing works.  How can I install it on Ubuntu 18.04.1?


So I messed up my $PATH when trying to put BLAST into my /etc/enviroment. Now I can't log in to Ubuntu (version 20.04), each time I attempt a login it just loads a couple of seconds and then sends me back to the login screen. I have tried launching the terminal using Alt+Ctrl+F3 and ran sudo nano /etc/enviroment to write the following, according to an older an similar  and from : PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:"  Yet this does nothing for me and the problem persists. I did change the $PATH within .profile as well but I managed to remove these changes using vim inside the Terminal. Error messages:

To get an maven environment variable to run, I tried several options. Basically, I followed some options from , such as ~/.pam_environment, /etc/bash.bashrc and I don't really know anymore. Within them I exported sth like export PATH=/opt/apache-maven-3.6.0/bin:$PATH (I'm being so unconcrete because I cannot look it up).   Afterwards, I did run gnome-session-quit and my machine got stuck.   So after hard restart I try to login again, but I'm not able to do that: I see my username, enter the password, hit enter, screen turns black and after 2 seconds I'm back at the login screen.   So, that very strange and worrying. Next step: Login via tty (Strg + ALT + F3). Within there I can login, but can not do much. I thought about sth like . But whatever I do: The command could not be located because '\bin' is not included in the PATH environment variable. I think, altogether thats alarming and I'm getting really nervous.  Executing export PATH="/usr/bin:$PATH seems to work and echo $PATHgives an output starting with /usr/bin:/usr/bin:/usr/bin:/home/user/Documents/.../esper/examples/transaction/etc:/home/user/anaconda3/bin:/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin but does not really help.  I'm running an Ubuntu 18.04 on an Lenovo G50-70.   Can you help me accessing my desktop again and/or fixing my PATH issue?


I want to use the /clear command to remove a book with the name “block” from a player’s inventory. I don’t want to take away just a normal book, how do I do this with commands in 1.16.2? I've tried: clear @p minecraft:book 1 {display:{Name:”block”}}   Which did not work, any help? There is another similar question, but the answer to that is above, which does not work for me, maybe they changed how it works in an update?

How do you clear 1 item from the inventory that has a custom name? What I'm trying to do is make a torch that when you hold it, it gives you Night Vision effect but after like 400 ticks or so I want the torch to run out of fuel and clear 1 torch away from the inventory, I have the potion effects (giving and taking away) working and the testfor command but how do I clear the item? this is my code I'm trying to use /clear @a torch 1 1 {display:{Name:"Special Torch"}}


The Rebel crest was first seen in the Star Wars universe in the 1977 film Star Wars (A New Hope), at the very least it was on the rebel helmets.  It has become part of Star Wars lore and has, in-universe, been (to some degree) retcon-ed that the rebel crest either comes from Sabine Wren's phoenix crest (in Disney Canon) or Galen Marek's family crest (in old canon, what is now known as Legends).   Is there any indication of the design inspiration or rationale for the logo in the original film?    discusses the in-universe origins, and also the re-use of the logo in Star Wars Rebels, but not the original out-of-universe inspiration for the 1977 version of the logo.

This insignia is pretty common and recognizeable, but I'm not sure I have any idea what it represents. It looks sort of like the shape of a ship, but the Rebellion doesn't have any ships of this shape that I can recall.    So, what is it?


I have the ODE $y''+y'+y^{3}=0$ and I must prove that the solution $y(t)$ and $y'(t)$ converges to zero when $t\to \infty$. I try to write the associated system of two equations, this is one form \begin{equation*} y'=z;\qquad z'=-z-y^3 \end{equation*} and this is the other \begin{equation*} y'=z-y;\qquad z'=-y^3. \end{equation*} I try to use Lyapounov method with the function $V(y,z)=z^2+\frac{1}{2} y^4$ and obtain that $\nabla V\cdot (y',z') <0$. But I don't know how to conclude this proof. On the other hand, using the associated matrix for the linear system, the real part of the eigenvalues is not negative, in fact is zero and I don't know how to continue. I accept any suggestion, hint or book to read.

Consider the ODE $$y''+y'+y^3=0$$ I need to prove that $$\lim_{x\rightarrow \infty} y(x) = 0$$   and $$\lim_{x\rightarrow \infty} y'(x) = 0.$$  Well, introducing the change of variables such as $x_1=y,x_2=y'$ I get the system of equations nonlinear in $x_1, x_2$. My question is, if I linearize this system around $(0,0)$ and analyze the behaviour of the linearized system there, would I be correct to infer that the behaviour is the same for a nonlinear (original) system? Say, for a solution to the linearized system the limits above hold true. Would they hold true for the original system as well then?


I want to build a package to find out metadata dependencies and determine which classes, triggers, pages, components, lightning components and applications, flexi pages, layouts, objects, custom settings, custom metadata objects and records depend on each other.  So far I have found a brilliant way to determine external dependencies for classes, triggers, pages and components described in  using MetadataContainer and creating related ApexClassMember, ApexTriggerMember, ApexPageMember, ApexComponentMember records.  However, it is not clear how can I find that, for example, Lightning component is depending on ApexClass and which one or depending on another Lightning component, which custom objects depend on another custom objects or even custom managed objects. How can I find that FlexiPage depends on Lightning component or Layout depends on a Visualforce page?  There are no "AuraDefinitionBundleMember" which I can use for MetadataContainer and there are not "CustomObjectMember" or something like that.  Is this possible to implement or should I parse Lightning components, custom object definitions on my own? Can metadata container contain AuraDefinitionBundle or custom object or layout or flexi page?  My question is more generic than  since in my case I am looking for Symbol Table not only for Lightning components, but also for Layout, FlexiPage, Object and other metadata to find dependencies\references.

Like we do have SymbolTable for apex class, to find their references/dependencies; do we have anything for the Lightning Components(to find dependencies/references of lightning components/application/events).  Please let me know, if there are any other(native to Salesforce) mechanisms.


This program cannot run but I don't know why:  Abstract class  public class Mahasiswa implements Comparable {      private String nama;     private int nim;      public Mahasiswa(String nama, int nim) {     }     public String getNama() {         return nama;     }     public int getNim() {         return nim;     }     public void setNama() {         this.nama=nama;     }     public void setNim() {         this.nim=nim;     }      @Override     public int compareTo(Object o) {         Mahasiswa key = (Mahasiswa) o;         if (this.nama.compareTo(key.getNama()) == 0) {             return -1;         }else if (this.nama.compareTo(key.getNama()) > 0) {             return 1;         }else{             return 0;     }     } }   Method class:          public static Mahasiswa[] BubbleSort(Object[] object) {         Mahasiswa[] data =(Mahasiswa[]) object;         for (int i = 1; i < data.length; i++) {             for (int j = 0; j < data.length - i; j++) {                 if (((Comparable)data[j]).compareTo(data[j+1]) ==1 ) {                     Mahasiswa c = data[j];                     data[j] = data[j + 1];                     data[j + 1] = c;                 }             }         }         return data;     }   Main class      public class Main {      /**      * @param args the command line arguments      */     public static void main(String[] args) {         Mahasiswa[] data = {new Mahasiswa("Karel", 175314105),         new Mahasiswa("Fandur", 175314006),         new Mahasiswa("Yeski", 1753141104),         new Mahasiswa("Tiosu", 175314001),         new Mahasiswa("Jono", 175314090)};          Larik.BubbleSort(data);          for (int i = 0; i < data.length; i++) {             System.out.println(data[i].getNama()+" "+data[i].getNim());         }     } }   Output     Exception in thread "main" java.lang.NullPointerException   at SortingObject.Mahasiswa.compareTo(Mahasiswa.java:33)   at SortingObject.Larik.BubbleSort(Larik.java:16)   at SortingObject.Main.main(Main.java:24)   C:\Users\Yeski's Legion\AppData\Local\NetBeans\Cache\8.2\executor-   snippets\run.xml:53: Java returned: 1   BUILD FAILED (total time: 0 seconds)

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


I've split my SSD to 2 drives, one of them has 44GB and Windows 10 shows the red bar in Computer section and notify me to check the storage.    but when I'm getting the properties of all files and folders , I used only 27% of 44GB.    Is there a problem with my SSD or the bug of Windows ?

I have a Win7 laptop with a 750Gig C: drive.  It came partitioned with 714Gig usable from manufacturer.  I installed programs, music files, etc up to 285 gigs.  As of a few weeks ago it showed 285 Gigs.  Two weeks of house guests later and it shows HD is full.  I deleted some files but it still shows 652 Gigs on this drive while there are only 285 Gigs on drive.  Relevant details:   I am Administrator on laptop and have fair knowledge of what I am doing. I did not restore from backup, restore from mirror, upgrade HD's or anything else that would have touched the partition structure.  Just daily use as imaging machine and web. I have checked partitions under disk administrator - no change, still partitioned with 714Gigs usable. Have looked through computer C drive by hand showing Hidden files and folders - no change. I have used JDisk Report to double check - it shows I have only 285 Gigs on C drive. I triple checked with TreeSize run as Administrator and it also shows 285 Gigs on C drive - yet Windows 7 still shows almost full. I used Windows 7 Utilities to Check for Disk Errors, and Defragged the drive.  No errors shown and no change after Defrag.


I have a tablet that runs Android Ice Cream Sandwich and would like to convert it to run Ubuntu as the Operating System. How easy is it to re install a tablet with Ubuntu?  The tablet is an Model N900   CPU Allwinner A13  FSB 1.5GHz  OS Android 4.0 ICS  Memory 512MB DDR3  Nandflash 8GB  Extended TF card; U disk, support TF card up to 32GB max  LCD Display 9 inch capacitive screen, 800*480  Internet Built-in Ethernet, support WIFI (802.11 a/b/g/n)  3G support external 3G module  Camera Front camera 0.3MP  I/O ports USB port, Headphone Jack, TF card slot  Touch Screen 5-point capacitive touch screen

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


Question : Let $f(x,y)$ be a polynomial with real coefficients having two variables. If $f(x,y)\gt 0$ for any real number $x,y$, then does $f(x,y)$ have the minimum?      Motivation : I found the following question in a book without any proof:  Let $f(x)$ be a polynomial with real coefficients having one variable. If $f(x)\gt 0$ for any real number $x$, then prove that $f(x)$ has the minimum.    Proof : If $\deg (f)=0$, then it's obvious that $f(x)$ has the minimum. So, let $\deg (f)=n\gt 0$ and $f(x)=a_nx^n+f_1(x)$ where $a_n\not=0, \deg(f_1)\lt n$.     We get $$\lim_{x\to \pm\infty}f(x)=\lim_{x\to\pm\infty}|f(x)|=\lim_{x\to\pm\infty}|x|^n\left(\left|a_n+\frac{f_1(x)}{x^n}\right|\right)=\infty.$$  Hence, supposing $G\gt 0$ such that $f(x)\gt f(0)$ if $|x|\gt G$, let $m=f(x_0)$ be the minimum of the continuous function $f(x)$ in a closed-interval $[-G,G]$. Then, since $m\le f(0),$ we know that $f(x)$ has the minimum $m$ at $x=x_0$. Now the proof is completed.   This got me interested the question about $f(x,y)$. I can neither prove that $f(x,y)$ has the minimum nor find any counterexample. Can anyone help?

Must a polynomial function $f \in \mathbb{R}[x_1, \ldots, x_n]$ that's lower bounded by some $\lambda \in \mathbb{R}$ have a global minimum over $\mathbb{R}^n$?


I would like to just use Ubuntu from now on, I don't want to go back to windows unless I have to. The problem being, I have a few documents that I need to work on in Microsoft Word. Can someone give me directions on how to open them through Ubuntu?

Can I open Microsoft Word and Excel files with Ubuntu?


I am reading the Excel having a column of long numeric values of more than 8 digit. It also may start from 0 for example 003787677. Examples in my case are 173370148, 142350093 etc.  The values in dataset have issue for the columns having more than 8 digit length, it converts them in to exponential value like 1.4235e+008  I don't want this value to be converted to exponential or a way to convert it back to correct value.  I cannot change excel column format to number as i may have values started with 0 in front or 00 in front. So i am using text as column format cell  I am using following type of connection while reading .xls at windows 2003 server machine 32 bit:  provider = "Microsoft.Jet.OLEDB.4.0;Data Source=@filename;Extended Properties='Excel 8.0;HRD=Yes;IMEX=1";   Using below statements to read excel:  OleDbDataAdapter oleAdpt = new OleDbDataAdapter("SELECT * From [Sheet1$]", con);   oleAdpt.Fill(dtexcel);

I have a C#/.Net job that imports data from Excel and then processes it. Our client drops off the files and we process them. I don't have any control over the original file.  I use the OleDb library to fill up a dataset. The file contains some numbers like 30829300, 30071500, etc... The data type for those columns is "Text".  Those numbers are converted to scientific notation when I import the data. Is there anyway to prevent this from happening?


It's better use without sudo in some ocasions?

This question is actually non Ubuntu-specific. My understanding is that sudo is to prevent non-authorized users from doing administrative and other potentially harmful operations. The premise is that someone is here in front of my PC using it... or maybe remotely (but in that case they should know my login password to connect to the computer, and this is usually the same as my sudo password...) So someone is in front of my PC and she cannot delete certain important files or dirs or install harmful software without knowing my sudo password, but she can do a lot of other harmful and privacy-violating things without sudo. So, wouldn't it be better instead asking for admin privileges each time before opening the file manager or the terminal? I know this may be time-consuming and exhausting...


I have a server with Linux Mint OS which has a server-side Maven project that reads some environmental variables.   The environmental variables are declared in /etc/profile.d/my_env_vars.sh with:  export MY_VAR=/opt/my_app  export PATH=$MY_VAR:$PATH   My server side has a function that when I run it from eclipse (installed in my server) it works fine with no errors.  public File convert( byte [] image) throws IOException {     String filePath = System.getenv("MY_VAR");     File imageFile = File.createTempFile("TEMP", "tmp", new File(filePath));  ...     return imagenFile; }   My client-side also is a maven project. It sends a byte[] image to the function above and the server gives it back a result, but I got the NullPointerException error:  java.lang.NullPointerException java.io.File.<init>(File.java:277) the second line of my function File imageFile = File.createTempFile("TEMP","temp...   Immediately in my server terminal I verified the environmental variable by echo $MY_VAR and it gives me the correct value (/opt/my_app)  Why does my function work correctly in my server-side but it gives nullPointerException error in the client-side?  I have tried by declaring the environmental variables in other files as ~/.bashrc ~/.profile /etc/bash.bashrc and nothing works. I read in other post to try to edit ~/.bash_profile but Linux Mint doesn't have that file.  I really appreciate any advice.


Need to iterate WorkorderID .......values ....and these are List Objects which has List of Map and values is an array []   "answers": [     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.CustomerName",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "CustomerName"         ]       },       "label": "CustomerName",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Customer Name",       "values": [         "GALWAY CLINIC"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.CustomerAddress",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "CustomerAddress"         ]       },       "label": "CustomerAddress",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Customer Address",       "values": [         "Doughiska"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.CustomerCity",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "CustomerCity"         ]       },       "label": "CustomerCity",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Customer City (Location)",       "values": [         "Galway"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.Country",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "Country"         ]       },       "label": "Country",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Country",       "values": [         "Ireland"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.WorkOrderNumber",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "WorkOrderNumber"         ]       },       "label": "WorkOrderNumber",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Work Order Number",       "values": [         "WO-00293752"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.StartDate",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "StartDate"         ]       },       "label": "StartDate",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Start Date",       "values": [         "2018-12-12 21:45:00"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.InstalledProductID",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "InstalledProductID"         ]       },       "label": "InstalledProductID",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Installed Product ID",       "values": [         "42613320"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.SerialNumber",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "SerialNumber"         ]       },       "label": "SerialNumber",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "Serial Number",       "values": [         "712050PF"       ]     },     {       "labelFullPath": {         "path": "WorkOrderInformation.WorkOrderInfoFlow.WorkOrderID",         "components": [           "WorkOrderInformation",           "WorkOrderInfoFlow",           "WorkOrderID"         ]       },       "label": "WorkOrderID",       "dataType": "FreeText",       "controlType": "SmallTextbox",       "question": "WorkOrderID",       "values": [         "a3d290000007L5Q"       ]     },

How can I deserialize this json object:      {     "response": {         "count": 1,         "benchmark": 0.22567009925842,         "requests": [             {                 "request": {                     "id": 537481,                     "image_thumbnail": "",                     "title": "Request for new bin(s) - residential",                     "description": "Propmain ref  3234-1114",                     "status": "submitted",                     "address": "36 Pine Tree Close",                     "location": "Peterborough, England",                     "zipcode": "PE1 1EJ",                     "user": "",                     "date_created": 1417173208,                     "count_comments": 0,                     "count_followers": 0,                     "count_supporters": 0,                     "lat": 52.599967,                     "lon": -0.233482,                     "user_follows": 0,                     "user_comments": 0,                     "user_request": 1,                     "rank": "0"                 }             }         ],         "status": {             "type": "success",             "message": "Success",             "code": 200,             "code_message": "Ok"         }     } }   What i've tried:   Map<String,Object> rawObj = (Map<String,Object>) JSON.deserializeUntyped(jsonString);     Map<String,Object> responseObj = (Map<String,Object>)rawObj.get('response');     List<Object> reqs = (List<Object>) responseObj.get('requests');     System.debug('Map Size = ' + reqs.size());     Map<String, Object> i = new Map<String, Object> ();     for (Object x : reqs) {          i = (Map<String, Object>)x; }     Map<String,Object> requests = (Map<String,Object>)i.get('request');     System.debug('Map Size = ' + i.size());     for (String field : i.keySet()){          Object id = i.get(field);         Object title = i.get('title');         System.debug('Id : ' + id);         System.debug('title : ' + title);          //System.debug('Title : ' + title);       }


There is a long list of "Favorite Questions" in my Stack Overflow account. I think there should be some functionality to categorize questions according to their relevance, like:   JavaScript and its frameworks related questions should be displayed in a category. Browser related questions should be displayed in a category. Database questions should be displayed in a category. et cetera   If the list of favorites is too long, I'm not able to access questions quickly anymore. All I need to do is to see each question's tag and find it myself or do a Google search.

I'm a big fan of the favorites feature. I usually mark questions with good answers of code snippets for later use.  Most of the time I can't find the favorite I'm looking for so quickly as desired. I know I marked the question in Stack Overflow, but it takes time to find it again, because of the following reasons:   lot of favorites lot of answers for a question (last time I was looking for an answer in the question ) the question title is not always what I'm looking for   To make favorites more useful I suggest the following features to be added:   Allow to mark an answer as favorite Allow to tag questions with own tags (those tags are personal and can not be seen by others) Search function over favorites Allow to add a personal note to a question


I just tried logging into chat and it seems to have no effect. I am redirected to the login form which I fill out successfully, then I am redirected back to chat which still considers me as a guest and offers me to login again.  The Stack Exchange global chat seems to work fine though - I am redirected to a different-looking page (with an iframe to put in my SE OpenID credentials) and then I am redirected back to chat where I am considered logged in. No effect on Stack Overflow chat - still thinks I'm a guest.  The network login troubleshooting page says everything is fine, and I've tested in a brand new Internet Explorer 11 with no add-ons just to make sure it's not my main browser that's causing the issues (which does have uBlock and HTTPS Everywhere).  If that could be relevant, I've recently changed my e-mail and thus migrated all my accounts to a new SE OpenID.

I've used chatrooms for Stack Overflow earlier. Is it still available? When I go to  I get the message above. It's happening for a few weeks or more.


I just set up my PXE Server on Lubuntu, everything is running good so far.. PXE detects my DHCP Server, menu shows up, but when I select one of the entrys, for example the one that leads to ubuntu-installer, it shows the errormessage 'loading /ubuntu-installer/amd64/linux failed no such file or directory' I've tried nearly everything from moving 'linux' into another folder to chmod 777 my tftp root folder. Does anyone know how to handle this?

I have a problem with PXE booting. I followed  on the Ubuntu help wiki. But I get an error on client machine:  Could not find kernel image: vmlinuz-3.13.0-24-generic   And now, question. This image should be in pxelinux.cfg folder, am I right?


I'm trying to save figures to a certain directory. I'm trying to define the general path via below  path=r'D:\FLGPR Akela\YPG\test\'   Which I don't quite understand. I thought the r before the string would avoid the '\' error?

Technically, any odd number of backslashes, as described in .  >>> r'\'   File "<stdin>", line 1     r'\'        ^ SyntaxError: EOL while scanning string literal >>> r'\\' '\\\\' >>> r'\\\'   File "<stdin>", line 1     r'\\\'          ^ SyntaxError: EOL while scanning string literal   It seems like the parser could just treat backslashes in raw strings as regular characters (isn't that what raw strings are all about?), but I'm probably missing something obvious.


I have records like this in observable collection   ID Department salary joingdate  1    .NET   5000  04/08/2011 2    .NET   6000  04/07/2011 3    JAVA   7000  04/08/2011 4    JAVA   8000  04/07/2011 5    .NET   9000  04/06/2011   now I want new observable collection like   Joingdate    .NET(Salary)  JAVA(Salary) 04/08/2011  5000        7000 04/07/2011  6000        8000 04/06/2011  9000        NULL    How would I get this type of observable collection?


I have the following Python 3 code:  import re pattern=re.compile(r'\.') print(pattern.match('abc.de'))   The output is:  None   What am I doing wrong? Why the regex does not match the dot?

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


A complex number $z $ is called an algebraic number if there is $P \in\mathbb {Q }[X]\setminus\{0\} $  such that $P (z) = 0$. We say that $x\in\mathbb {C} $  is an algebraic integer  algebraic integer if there exists a monic polynomial $P\in\mathbb {Z} [X] $  unitary such that  $P (x) = 0$. we fix an algebraic number $z $. The set $$  I (z) = \{P \in\mathbb {Q}[X]\ :P (z) = 0\} $$ is an ideal of $\mathbb {Q}[X]$. There is therefore a unique monic polynomial $\Pi_z \in\mathbb {Q}[X]$, called minimal polynomial of $z$, such that $$I (z) = \{\Pi_z Q :Q  \in\mathbb {Q}[X]\}.$$ We admit the following results:  (1) The set of algebraic integers is a subring of $\mathbb {C} $.   (2) If $x \in\mathbb {Q}$ is an algebraic integer, then $x\in\mathbb {Z}$.  Problem Show that if $z\in\mathbb { C } $ is an algebraic integer then $\Pi_z \in\mathbb {Z} [X] $. An idea please

I want to prove the following theorem: Theorem. The minimal polynomial of $\alpha$ has integer coefficients if and only if $\alpha$ is an algebraic integer. Here is what I have done and I want to ask whether it has any problematic parts or not: ($\implies$) part is trivial. For the converse, let $q(X) \in \mathbb{Q}[X]$ be the minimal polynomial of $\alpha$ and $f(X) \in \mathbb{Z}[X]$ such that $f(\alpha)=0$. Then, since $q(X)$ is the minimal polynomial of $\alpha$, $f(X)=q(X)r(X)$ for some $r(X) \in \mathbb{Q}[X]$. Assume that $q$ has at least one non-integer coefficient. Define $ V = lcm\{$denominators of coefficients of $q(X) \}$. $ U = lcm\{$denominators of coefficients of $r(X) \}$. Then, $UVf(X) \equiv 0$ modulo ($UV$) but $Vq(X)Ur(X) \equiv UVq(X)r(X) \not \equiv 0$ . So, I think we are done.


How can we prove that $19^{20}\equiv 1 \mod  181$?

How am I suppose to find the remainder when $11^{2013}$ is divided by $61$?


What is the sum of the following series?  $$\sum_{N=1}^\infty\frac{N}{100} \cdot\left(\frac{99}{100}\right)^{N-1}$$?  This looks like a geometric series but I think the infinite sum formula wouldn't work here as there's an $\frac{N}{100}$ in front of the series?   I think the series converges to $100$, but I'm not sure how to get there

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


This isn't the first time it has happened, but now that I clean installed the new Windows, I'd like to have everything neat and sparkling. Unfortunately, these files are in the way of achieving that.  I'm not sure what's causing them, but so far, the only major software I've installed are Steam and Photoshop. I think it's Photoshop's fault, but as I said, I'm not sure.  What I want to know is what these things are, and more importantly, if I can delete them.


Of course it is intriguing. But I think the Schroedinger equation for a charged particle in a magnetic field was known at the very beginning of wave mechanics. Therefore, the  should not be more exotic than the Schroedinger equation.   A-B effect is simply an immediate consequence of the Schroedinger equation. So why was it debatable?

What is the conclusion that we can draw from the ? Does it simply suggest that the vector potential has measurable effects? Does it mean that it is a real observable in quantum mechanics? Does this effect has anything to do with the topology of the space?


In gedit, how can I write x^2 without using ^? Where 2 will be the superscript of x.

The title pretty much says it all: how can I type Unicode characters - specifically the em-dash —?


When i'm in a deep folder hierarchy the entire list of folders are seen before $    How can i make this short even though i'm in the same folder.

When using the terminal in a deep folder structure sometimes the prompt can take up most of the line.  Is there any way in which I can trim the working directory?  I know I can do  PS1="\W >"   to only print the current directory and not the full path, but is there a way to have something like:  /home/smauel/de...ther/folder >


I am usually using a combination of BibTeX and hyperref to create clickable citations, so a reader can easily jump from my text to the right place in my bibliography. Unfortunately there is no quick way to jump back: you have to manually find the place in the text where you paused your reading. Therefore I would like my reference list to contain hyperlinks to the location(s) in the text where I actually use the references.   Ideally this would work like it does in Wikipedia articles, e.g. , so there is a little clickable ^ if a citation is used once, and ^ a, b, ... if there are more 'calls' to a certain bibitem.   Is there a feature (or a package) that provides this functionality?   I can think of a way to implement this assuming all citations are used only once, but that's not the case in practice.

In GKP's Concrete Mathematics, there is a useful and interesting feature I would like to see in more books. The bibliography entries include:   a - the page numbers where the book or article is cited in the document. b - a few lines of review of the cited work.   It is a kind of mix between bibliography, index and review.  Are there stable LaTeX packages/BibTeX styles to do (a) and (b) ?  EDIT: I wrote (b) initially as "comments about the work cited". It could be understood as "gathering comments made in the book about the work and reproducing them in the bibliography".  This is not what I meant but this could be something useful for others.


Yesterday my laptop's built-in keyboard started typing random keys, i.e. when I press Down Arrow, it would type 3, when I press it again, it would delete a character, pressing the Right Arrow would get me several lines down, then suddenly it would start working normally. Some keys worked properly, but a lot didn't.  I have Linux and Windows, dual boot, happened on both of them. Tried turning off the laptop and removing the battery, but the problem was still there afterwards.  When I plugged in an external USB keyboard and typed through it, it was working just fine, while at the same time, the builtin keyboard was having this weird behavior.  What could be causing this?    Edit  I haven't poured any liquids on the keyboard, but I had the laptop opened a month or so ago, to clean the dust from the fan, and to replace the CPU thermal paste, because it had started heating a lot even when idle.

The keyboard on my laptop seems to be typing by itself:   It sometimes types characters like 134, whether by itself or when I hit certain keys. Repeating characters may appear unexpectedly. The system volume may change by itself, or windows like the Print dialog or Web browser may appear.   This can happen without any input or as I type, and may occur more often when certain keys are pressed. Sometimes, the keyboard fails to respond altogether. This is happening regardless of the software involved.  Is there a ghost in my keyboard—is my keyboard broken?  A sample of text from the keyboard might look like this (normal QWERTY...ASDF...ZXC... sequence is expected):   QWERTYUIOPASDF)(G@*HKLZXCVBN QWERTYIOPASDFGL!#ZXCVB13 QWERTYUIOPASDFGHJKLZXCVB!#N qwertyu41iopasdf19g13h28j113k4113zxcvb4n qwerty4u1iopasdf0g7h1jklzxcvb13m qwert13uuuuuuuuuuuuuuuiopasdf87091134ghhhhhhhhhhhhhhhhhhhhhhh13jk13zxcvb14      This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


I have 2 objects and  I am trying to merge 2 objects.    const obj = {    a: {},    b: {},    c: {      ca: {},      cb: {},      cc: {}   } };  const obj2 = {    a: {     aa: {}   },    c: {     cd: {}   } };  console.log({...obj, ...obj2});     I've expected the result like this  {   "a": {     "aa": {}   },   "b": {},   "c": {     "ca": {},     "cb": {},     "cc": {},     "cd": {}   } }    How can I achieve my expected thing?

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


As heat goes up, molecules start moving at a faster rate. A gas molecule, if unhindered, could speed across the United States in three hours. I don't even want to know about plasma. But if heat consists of the speed of the molecule (which is an if) then shouldn't there be an Absolute Infinity as well as an Absolute Zero? And if so, why isn't this mentioned in textbooks? Shouldn't "Absolute Infinity" be important in thermodynamics? And are there quantum repercussions if some plasma approaches the speed of light through the individual speeds of its molecules? Does this also mean that the process of heating objects up is not linear anymore (because as you approach c, it becomes harder to accelerate the molecules)?  Thanks guys! More questions coming :)  EDIT: In light of the fact that there are many contending theories for the Ultimate Heat Limit (Hagedorn temperature, Planck temperature, even 0 K) I will leave this open to a wide variety of answers. :)

If temperature makes particles vibrate faster, and movement is limited by the speed of light, then I would assume that temperature must be limited as well. Why is there no limit?


I play Borderlands 2 on my PS3. I defeated the first boss boom beiwm  (I think that's how you spell it), then saved and quit.  But when I decided to play the game again it took me back to the location where that guy fixed clap-trap's eye. I still kept Maya's (the girl I play as) newly found power and all of the weapons but lost progress and had to re-defeat everyone again, including the bosses.   I  thought It just glitched or something so I continued playing and got to the next boss after the boom brothers. I saved and quit then when I reloaded the game later on it did the same thing, sending me back to that stupid location. I really don't know what would cause this.   I do have different games running on different ps3 profiles and the other game works fine. Could anyone tell me what's wrong?

I've been playing Borderlands 2 on Xbox recently (havent played the first yet) and am wondering how the save game works.  If I hit Start and select Save and Quit from the menu then load my game again later it always returns me to the start of the level, meaning I have to go through and fight the same enemies again to get back up to where I originally saved. However, all my characters stats and items are saved.  Is the save meant to happen this way? I would have thought you would have loaded at the closest New-U machine rather then all the way back to the start of the level


While filling the online form, instead of ticking on female, i ticked on male. Though my passport has female written on it. I have made the online payment and have taken the printout. My interview with VFS is in one day.

I'm from the Philippines, and I plan on travelling to the UK with my sister to visit a relative.  I have just submitted my visa application and have already paid online, when I noticed that I've made a clerical error. In the 'visit or stay' portion of section "Do you have any friends or relatives in the UK?", I clicked the 'no' box, instead of 'yes'.  My sister's application is correct. She selected 'yes'. Our appointment is due next month. I am planning to email them about this, and also inform them on the day of application submission.  Is this the right path to take?


I wants to cite my document in latex(overleaf). and I used biblatex . but then i saw after compiling it's numbers changing in wrong  form and one of them disappearing.  \documentclass[12pt,onecolumn,a4paper]{article} \title{hw3} \author{alisafarpoor1108 } \date{May 2020} \usepackage{graphicx} \pagenumbering{roman} \usepackage{biblatex} \addbibresource{lib.bib} \begin{document} \begin{figure} \centering     \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{images/nemad.jpg} \end{figure} \vspace{2cm} \title{Third Homework}  \author{ IUST \\ }  \pagebreak \date{\today} \maketitle \pagebreak \tableofcontents \pagebreak \listoffigures \pagebreak \pagenumbering{arabic} \section{CRITERION} salam\cite{1}\cite{2}\cite{3}\cite{4}\cite{5}\cite{6}\cite{7}\cite{8}  \medskip \printbibliography \end{document}   and my lib.blb is:  @article{1,   author  = {M. Xi and L. Chen and D. Polajnar and and W. Tong},    title   = {Local binary pattern network: A deep learning approach for face recognition,},   journal = {IEEE International Conference on Image Processing (ICIP)},   year    = 2016,   pages   = {3224-3228}, } @article{2,   author  = {J. Deng and J. Guo and N. Xue and S. Zafeiriou},    title   = {ArcFace: Additive Angular Margin Loss for Deep Face Recognition,}, journal = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},     year    = 2019,    pages   = {4685-4694},     note    = {An optional note},    }   @online{3,     author = {O. Kharkovyna},   title = {An Intro to Deep Learning for Face Recognition,},   year = 2019,   url = {https://towardsdatascience.com/an-intro-to-deep-learning-for-face-recognition-aa8dfbbc51fb},   urldate = {2020-03-30} }  @book{4,   author    = {X. Jiang and A. Hadid and Y. Pang and E. Granger },    title     = {Deep Learning in Object Detection and Recognition},   publisher = {Springer},   year      = 2019,   isbn      = {9811051518} }  @article{5,   author  = {P. S. Chandran and N. B. Byju and R. U. Deepak and K. N. Nishakumari and P. Devanand and P. M. Sasi},    title   = {Missing Child Identification System Using Deep Learning and Multiclass SVM,},   journal = { IEEE Recent Advances in Intelligent Computational Systems (RAICS)},   year    = 2018,   pages   = {113-116}, }  @article{6,   author  = {J. Yu and D. Ko and H. Moon and M. Jeon},    title   = {Deep Discriminative Representation Learning for Face Verification and Person Re-Identification on Unconstrained Condition,},   journal = {IEEE 25th International Conference on Image Processing (ICIP)},   year    = 2018,   pages   = {1658-1662}, }  @article{7,   author  = {J. Zeng and J. Zeng and X. Qiu},    title   = {Deep learning based forensic face verification in videos,},   journal = {International Conference on Progress in Informatics and Computing (PIC)},   year    = 2017,   pages   = {77-80}, }  @article{8,   author  = {D. Voth},    title   = {Face recognition technology,},   journal = {IEEE Intelligent Systems},   year    = 2003,   pages   = {4-7}, }   but in output i see like the image with wrong citation. for making it simple I removed most parts but remaining that is here is still wrong.   '''

I'm facing a problem with biblatex citation order.  Using this configuration:  \documentclass {article} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \hyphenation{es-ta-bi-li-da-de} \usepackage{setspace} \singlespacing \usepackage[natbib=true,style=numeric]{biblatex} \addbibresource{frameworks.bib}   Being frameworks.bib this:  @Article{JONHSON88, author = {Ralph Johnson, Brian Foote}, title = {Designin Reusable Classes}, journal = {Journal of Object-Oriented Programming SIGS}, year = {1988}, key = {Johnson:88}, volume = {1}, number = {5}, pages = {22-35}, month = jun }  @book{UML-F:00, author = {Fontoura M., Pree W., Rumpe B.}, editor = {Addison-Wesley}, title = {The UML Profile for Framework Architectures}, year = {2000}, }   The PDF is generated with a text like:  Something about something[4], and moo foo other children[1].   This citation [4] is the first in all text. How can I order this correctly to [1]...[2] ...?


So here is my question, I have to columns of data. One of them is a black box model's output, and the other one is my actual numbers. The correlation between these two columns is 99%, but the MAPE is around 5%. How do I interpret this? I know R2 means the model output is able to predict 100% of the variability in my actual numbers, but how does the MAPE of 5% come into play? Do I just say the model's error is 5%? How do I use correlation to make any points about the model's output?

Usually regression models are evaluated using $R^2$. I understand this metric can be misleading too at times but as far as I understand the first parameter we look at is $R^2$.   There is another parameter which is often used and it is $MAPE$.  Both are functions of errors between predicted and true value. I am just wondering if there are certain cases where one should be preferred above another?   $R^2$ can become negative if being used on test data (on which the model is not built). Is this a reason to not use $R^2$ in these cases?  Can anyone give a qualitative insight on where $MAPE$ should be used and where $R^2$ should be used.


I have installed MikTex2.9 on my PC using Windows 10. Now I want to use latex so I can create a document, but I have so many folders and I don't understand which file I should open.

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc.  This question is undergoing a systematic refurbishment, see  on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question.  List of editors Links to answers.


I edited the form for a list item in InfoPath, and when I print, I just want to print the form itself.  It seems when I use the browser's print function, it still pulls up some elements from the page and it cuts off the content if it's longer than the popup window. Also, some of the elements of the form are hidden when I print, so that is not a good option.  I have read that others have attempted to create a custom action that resides in the InfoPath Ribbon, but I have yet to find one that works?  Thoughts?

I edited the form for a list item in InfoPath, and when I print, I just want to print the form itself.  It seems when I use the browser's print function, it still pulls up some elements from the page and it cuts off the content if it's longer than the popup window. Also, some of the elements of the form are hidden when I print, so that is not a good option.  I have read that others have attempted to create a custom action that resides in the InfoPath Ribbon, but I have yet to find one that works?  Here is an answer for this but we are unfamiliar with Java Script.  Maybe it will give you some direction: what we did in this case was to add a simple Print button (we used Content web part, but you can do whatever). The print button uses JS to cut out only the relevant portion (based on DOM/CSS) and show it in a new window - basically we open the form in a new window and pass a QS parameter, the JS picks it up and cleans the form. Worked well and was very simple to do, just a few lines of javascript  Does anyone have the Java Script code for this?


I grew up really poor, my parents were terrible with money and I want to make sure now that I have a family of my own that I don't follow the same path and leave nothing but a life of hard work and not a lot of hope for my daughter. I don't have a lot of funds and want to start investing in more than just my 401k but I'm really not sure which option(s) would work best for my family.  We have about 500.00 which we could start investing. Mostly spend our time paycheck to paycheck so extra money is rare for us.  Is there a good rule to follow about what types of investing to focus on with a lower amounts of assets? I've looked into a few things and to be honest my head starts spinning but I'll briefly put in what I've looked into   Precious metals, but I don't feel like what I could afford (silver) has enough growth to bother and everything I've found charges way more than what listings show the value at. Robo-advisors didn't sound appealing after hearing ads for STASH but I came across Wealthfront with seemed to have a much better system, I just don't know what kind of return I could hope for from a service like this vs me doing it on my own. High rate savings account, I feel like this is the safest bet but I've been told that it tends to require more than what I have. Mutual funds, my dad father was a freelance insurance salesman (I'm really not sure why but somehow the companies he worked for were connected to mutual funds) and always praised these, but he also fell for 4 money marketing schemes so I've never really trusted his judgment with finances. Personal stock investing, this mostly left me feeling like I was looking at latin, so outside of me trying to invest in a company I know by name that might continue to do well (all of those seem like their shares are insanely expensive for me), I feel like I was just playing really, really long game of roulette waiting for the the ball to drop. ???? I don't know the name of this one, I worked with a guy who was becoming a trader for this type of stock-esque investments, but roughly equated to buying oil or other raw goods that are just sitting on barges out at sea and waiting for the price become good enough to bring inland.   Sorry for the jumble of information, thanks in advance for any helpful tips!

I have been reading the top posts here, and the recommendations for what to invest in are often similar. What I'd like to know, in as simply of terms as possible, is what the consensus is on priority of these investments.  I am new to this, but here are some of the obvious options:   Paying off credit card debt Paying off mortgage / student loans 401k up to employer match 401k past employer match IRA Emergency fund Other important investments that I have missed   Clearly this will vary person to person, but if you were asked to put an ordered recommendation on a highway billboard, what would it be?  (For example:   Pay off credit debt Emergency fund for 6 months 401k up to match ... )


Is it okay to leave the water pressure on using a garden hose and turn the water off by just the sprinkle nozzle? My water faucet is difficult to get to.

I have an elderly person that is no longer able to walk the land to reach the faucet.  It's about 20' between the safe patio and the faucet.  She needs to turn on the faucet in order to hand water the garden (a task she enjoys so not thinking of using drip system).   My idea is to run a hose to the patio.  Then put a shut off valve there.  This means the hose and other equipment will need to be able to handle constant pressure for 3 months at a time in Texas.    Is there a hose and shut off that can handle this job?  My initial thought is a  and a .


I want to find a file and goto his directory. I made a bash script : #!/bin/bash  FILE=$1 FILEPATH=`find . -name "$FILE"`  if [ -f "$FILEPATH" ] then     cd $(dirname "$FILEPATH") fi  But this script does not work. I saw on  that I have to add exec bash or $SHELL but it create a new bash prompt ans display my welcome message. How can I do ? I just want a script, alias or something to find a file and go to the directory containing that file.

I run across many shell scripts with variables in all caps, and I've always thought that there is a severe misunderstanding with that.  My understanding is that, by convention (and perhaps by necessity long ago), environment variables are in all-caps.  But in modern scripting environments like Bash, I have always preferred the convention of lower-case names for temporary variables, and upper-case ones only for exported (i.e. environment) variables.  For example:  #!/usr/bin/env bash year=`date +%Y` echo "It is $year." export JAVA_HOME="$HOME/java"   That has always been my take on things.  Are there any authoritative sources which either agree or disagree with this approach, or is it purely a matter of style?


So, True Polymorph can be used to turn creatures into objects, like lumps of .     Creature into Object: If you turn a creature into an object, it transforms along with whatever it is wearing and carrying into that form. The creature's Statistics become those of the object, and the creature has no memory of time spent in this form, after the spell ends and it returns to its normal form.   So, what keeps players from reaching level 17 and holding back for a month to turn a bunch of fish into , , , ? Items are, as far as I understand, objects.  I had the notion that  was on another league, but other level 9 spells would only break combat for a few rounds. True Polymorph seems to stack its effects to the point where the party gets it and, after a month, has doubled its power, both in and out of combat.

The True Polymorph spell allows you to turn a creature into an object and if you concentrate on it for 1 hour it becomes permanent. The relevant text follows:     Choose one creature or non-magical object that you can see within   range. You transform [...] the   creature into an object [...].      [...]      Creature into Object. If you turn a creature into an object, it   transforms along with whatever it is wearing and carrying into that   form. The creature's statistics become those of the object...   Can polymorph be used to create magic items by polymorphing creatures into objects? Answers can have DM Fiat, but I would prefer a rules based answer or an answer by Jeremy Crawford or Sage Advice or some other 'official' source.


I want help on the following code      int arr_1[] = {1, 2, 3, 4, 5};     int arr_2[] = {6, 7, 8};     int arr_3[] = {9, 10};      int* arr[] = {arr_1, arr_2, arr_3, NULL};      // print all the elements in array of arrays     // printArray(arr);      cout << sizeof arr_1;     cout << sizeof *arr;   when I try the first cout, it gives me 20, which is correct. but when i try the second cout, it gives me 8 which is size of a pointer variable  why. !!  could anyone give me a correct explanation and how can i get the correct size in the second way i.e from array of arrays.  Thanks in advance

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I'm going to start my career in photography. I have a canon 70D plus prime lens which is 18 to 135mm. For portrait shot I'm not getting more blured background. So can you suggest me which lens is suitable for the candid and potrait shots 35mm, 40mm, or 50mm canon lens

What focal length or range of focal lengths are usually used for portraits?   What is used by professionals? Why would one select a certain focal length? What are the advantages and disadvantages of different choices, and are there certain situations where an unusual choice might be better?


Can I move a contact from the All group to another group in an iOS device? I don't see a way to do this on my iPhone XR with iOS 14.4.1

I have been successful in managing contact groups with OS X's Contacts.app and iCloud.com, but haven't found a way to do this as of iOS 9.  Is there a way to manage contact groups on iOS (iPhone, iPad, or iPod Touch) ?


I'm creating a quiz activity in which when the user inputs his or her answer into the EditText and presses 'Next' button, it will generate the next random word and also check if you are correct or wrong.   However, for some reason, even though my code was kind of able to detect both the EditText and the correct word answer, it returns back to me the 'wrong answer' code. Can anyone help me please? Thanks! (I'm still new at this...)  *Edited: This is not a duplicate question people. I seriously need someone to look at my code specifically and tell me exactly what is wrong because I don't know. It's not a general question which can be solved (for me anyway) just by looking at other people's questions because I'm still very new at this. Thanks a lot.*  btnNext.setOnClickListener(new OnClickListener(){           @Override         public void onClick(View v) {             EditText etGuess= (EditText) findViewById(R.id.editTextGuess);              etguess2 = etGuess.getText().toString();              //these two above were actually placed outside but no luck. didnt work here either              String etg2str = etguess2; // the users edittext input             String tgstr = theguess; // the correct answer, the guess is from outside              if (myCD > 0 && etg2str.toString() == tgstr.toString()){              myCD--; //this is a countdown of the number of qns             Toast.makeText(getApplicationContext(), "correct answer"+ myCD + rantitle + " now",                        Toast.LENGTH_LONG).show(); // this has nvr appeared for me             savePreferences("countDown", myCD);             RandomTitle(); //calling for random word on next load             Intent iNext = new Intent(QuizActivity.this,                      QuizActivity.class);             iNext.putExtra("dataR", rantitle); //inputting random word for next load             startActivityForResult(iNext, 1);             finish();             }              else if (myCD > 0 &&  etg2str.toString() != tgstr.toString()){                  myCD--;                 Toast.makeText(getApplicationContext(), "wrong answer " + myCD + rantitle + etguess2 + theguess + " now",                            Toast.LENGTH_LONG).show();             //now this one above appears for me everytime yet even tho etguess2 and theguess appears the same, I get wrong number                   savePreferences("countDown", myCD);                 RandomTitle();                 Intent iNext = new Intent(QuizActivity.this,                          QuizActivity.class);                 iNext.putExtra("dataR", rantitle);                 startActivityForResult(iNext, 1);                 finish();              }              else{                  Intent iScore = new Intent(QuizActivity.this,                          ScoreActivity.class);                 startActivityForResult(iScore, 1);                 myCD = 10;                 savePreferences("countDown", myCD);             finish();              }         }           });              }

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


I am new to a project and are looking in crashlytics for crashes, one of the top crashes have the following stack trace:  Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Map se.domain.android.api.a.b.theMethod()' on a null object reference            at se.domain.android.screen.zerohit.ZeroHitReportFragment.se.domain.android.api.request.MyRequest.zeroHitsRequest(SourceFile:4841)   First of all there are no class with that long package name and line number 4841, and the method is only called private, that seem strange way to get NPE?  So I am thinking this is some generated code? Any one have a clue?

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


I'm newbie to java.   class Demo{     public static void main(String[] args) {         String s1=new String("abc");          String s2=new String("abc");          String s3="xyz";         String s4="xyz";          System.out.println(s1==s2); //line 7         System.out.println(s3==s4); //line 8     } }   I just don't understand why line 7 got false and line 8 got true.  I would be so grateful if someone explain me this.


I want to do somethin when users closing my webs.  So I'd done like this:  window.onbeforeunload = function(){     #do something  }   But it's dispoint that I can't know the uers is doing close or not, because it's also can be refresh (like F5); do anybody would like to help me?

When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event. When we close the browser (X on right top icon),It will trigger ONUNLOAD event. Now when ONUNLOAD event is triggered, there is no way to distinguish between refresh the page or close the browser.   If you have any solution then give me.


Motivation for this question I'm studying preference relation (at MWG - Microeconomic Theory), and there's a relation $\succ$ (strict preference relation) which is defined as above: $x \succ y \iff x\succsim y \land y \not \succsim x$ Where $\succsim$ (prefence relation) is a complete and trasitive relation. It's easy to prove that $\succ$ relation is transitive (follows from the transitivity of $\succsim$) and antisymmetric (it is vacuous truth, because there's never a pair $(x,y)$ such that $x \succ y \land y \succ x$) For me looks like $\succ$ relation is very similar to a partial order relation, but it's not reflexive. So this question came to my mind. Why does the partial order relation needs to be reflexive? What's the idea behind that? What results can be derived from the reflexive property that makes it relevant? It's a bit strange for me because these two relations (a partial order and $\succ$) can be used to order some subsets from the original set.

I understand that why a partially ordered set needs to be antisymmetric and transitive. I just can't see the logic behind why it has to be reflexive?


What is the standard (out of the box) timeout for Chrome? How do I change the timeout settings and have a different timeout for developers and a standard users of my service?

I want to change the default timeout in Chrome. In Firefox I can set the value of network.http.connection-timeout in about:config - but how can I do that in Chrome?


CREATE TABLE `rings` ( `ID_RingType` char(2) default NULL, `Number` date default NULL, `ID_User` int(11) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;  INSERT INTO `rings` (`ID_RingType`, `Number`, `ID_User`) VALUES  ('AA', '2018-09-01', 1), ('AA', '2018-09-02', 1), ('AA', '2018-09-03', 1), ('AA', '2018-09-11', 1), ('AA', '2018-09-12', 1), ('AA', '2018-09-13', 1), ('AA', '2018-09-14', 1), ('AA', '2018-09-15', 1), ('AB', '2018-09-16', 1), ('AB', '2018-09-17', 1), ('AB', '2018-09-18', 1), ('AB', '2018-09-19', 1), ('AB', '2018-09-20', 2), ('AB', '2018-09-21', 2), ('AB', '2018-09-22', 2);   I wish to group the data based on ID_User and ID_RingType and for each contiguous range of dates list the MIN and MAX.  The results should look like:    ID_User   ID_RingType    MIN( Number )    MAX( Number )        1      AA            2018-09-01        2018-09-03        1      AA            2018-09-11        2018-09-15        1      AB            2018-09-16        2018-09-19        2      AB            2018-09-20        2018-09-22   This is what i tried :        SET @grp = NULL ;# MySQL returned an empty result set (i.e. zero         rows).       # MySQL returned an empty result set (i.e. zero rows).       # MySQL returned an empty result set (i.e. zero rows).        SET @preNum = NULL ;# MySQL returned an empty result set (i.e. zero        rows).       # MySQL returned an empty result set (i.e. zero rows).       # MySQL returned an empty result set (i.e. zero rows).       SELECT ID_User, ID_RingType, MIN( Number ) , MAX( Number )       FROM (       SELECT ID_RingType, ID_User, Number, @grp :=       CASE WHEN Number = DATE_ADD( @preNum , INTERVAL 1       DAY )       THEN @grp       ELSE DATE_ADD( @grp , INTERVAL 1       DAY )       END grp, @preNum := Number      FROM  `Rings`       ORDER BY ID_RingType, ID_User, Number      )T      GROUP BY ID_RingType, ID_User, grp   Any Help appreciated.

I have a table with the following structure:  CREATE TABLE `Rings` (     ID_RingType CHAR(2),     Number MEDIUMINT UNSIGNED,     ID_User INT(11) );   and with data:  INSERT INTO `Rings` VALUES   ('AA',1,1),   ('AA',2,1),   ('AA',3,1),   ('AA',11,1),   ('AA',12,1),   ('AA',13,1),   ('AA',14,1),   ('AA',15,1),   ('AB',16,1),   ('AB',17,1),   ('AB',18,1),   ('AB',19,1),   ('AB',20,2),   ('AB',21,2),   ('AB',22,2);   I wish to group the data based on ID_User and ID_RingType and for each contiguous range of numbers list the MIN and MAX.  The results should look like:  ID_User | ID_RingType | MIN  | MAX 1       | 'AA'        | 1    | 3 1       | 'AA'        | 11   | 15 1       | 'AB'        | 16   | 19 2       | 'AB'        | 20   | 22   I went through several posts on this topic but was not able to tweak them to fit my data.  Any help would be appreciated.


I have a templated class that has a templated member function.  Currently, I give the definition as:  template <typename... Ts> template <size_t Column> At<Column, Ts...> & tuple_reference<Ts...>::at(void) {   return array.at<Column>()[row]; }   But I get this error:  $ g++ example.cpp -o example -Wall -Werror -Wextra -std=c++1y -stdlib=libc++ example.cpp:42:27: error: expected expression   return array.at<Column>()[row];                           ^ 1 error generated.   Which confounds me, as that method of array works fine elsewhere in my code (see ic_arr.at<1>() below).  Here's my full source:  #include <iostream>  // Provide a Array-of-Structs (AoS) interface to a collection that // is actually implemented as a Struct-of-Arrays (SoA). namespace soa {  template <typename... Ts> class tuple_array;  // index into a parameter pack to get the N'th type listed template <int N, typename... Ts> using At = typename std::tuple_element<N, std::tuple<Ts...>>::type;  // the "Struct" the API provides template <typename... Ts> class tuple_reference {  private:   tuple_array<Ts...> &array;   size_t row; public:   tuple_reference(tuple_array<Ts...> &array, size_t const &row)       : array{array}, row{row} {}   // extract the value for a given index   template <size_t Column>   At<Column, Ts...> & at(void); };  // The toplevel interface template <typename... Ts> class tuple_array {  private:   std::tuple<Ts *...> arrays;   size_t size{}; public:   tuple_array(Ts *... arrays, size_t const &size)       : arrays{arrays...}, size{size} {}   // extract the array for a given index   template <size_t Column> At<Column, Ts *...> &at(void) {      return std::get<Column>(arrays);   }  };  template <typename... Ts> template <size_t Column> At<Column, Ts...> & tuple_reference<Ts...>::at(void) {    return array.at<Column>()[row]; }  }  int main() {    int five_ints[]{0, 1, 2, 3, 4};   char six_chars[]{"abcde"};    soa::tuple_array<int, char> ic_arr{five_ints, six_chars, 5};   soa::tuple_reference<int, char> ic_ref{ic_arr, 0};    // outputs "abcde\n"   std::cout << ic_arr.at<1>() << std::endl;   // should output "0 a\n"   std::cout << ic_ref.at<0>() << " " << ic_ref.at<1>() << std::endl; }   I'm using Apple LLVM version 6.0 (clang-600.0.57).

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


Table `names` ID | name  --------- 1  | Alex 2  | John 3  | Alex 4  | Alex 5  | Alice 6  | Monica  SELECT `name` FROM `names` GROUP BY `name` Alex John Alice MOnica      so, I need to make like this   SELECT `name`, COMBINE_STRING(`ID`, SEPARATOR `,`) AS `IDS` FROM `names` GROUP BY `name`  and the result should be like this :       and the result will be like this :   NAME | IDS ------------ Alex   1,3,4 John   2 Alice  5 MOnica 6      but as you see that mysql function COMBINE_STRING doesn't exist, so   any ideas how to do this?

Using MySQL, I can do something like:  SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;   My Output:  shopping fishing coding   but instead I just want 1 row, 1 col:  Expected Output:  shopping, fishing, coding   The reason is that I'm selecting multiple values from multiple tables, and after all the joins I've got a lot more rows than I'd like.  I've looked for a function on  and it doesn't look like the CONCAT or CONCAT_WS functions accept result sets.  So does anyone here know how to do this?


I will ask this as a simple lay man. Let's consider an astronomical black hole that was creating by in falling matter on a neutron star. As neutron star get heavier it gets smaller and a Schwarzschild  radius corresponding to that mass gets bigger and bigger. At some point, when mass is big enough the neutron star gets smaller than its corresponding Schwarzschild radius then the neutron star disappears behind event horizon.   The Wikipedia article on  says that it can be shown that all mass inside black hole gets concentrated in central singularity. But why? Isn't it possible for a neutron star to live inside black hole, just invisible to us. Yes you might say that neutrons get collapsed, but they can collapse in some other form of matter and there is now a quark ball or some other exotic stuff that makes a solid sphere of some size.  Another source says that all geodesics lead to central singularity. I will make an analogy here. On earth some geodesics point to the center of the earth, If I let go of a stone it will fall towards center of the earth until it hits the ground. So, can matter falling into black hole eventually hit the surface of this neutron/quark/exotic stuff ball inside black hole. What prevent this? Let's assume that there exist some form of matter that resists the pressure of gravity be it neutrons, quarks or something more exotic which we don't know of yet.  EDIT: Although this question was marked as duplicate it is by no means a duplicate of the indicated question. The flagging just demonstrates lack of understanding of both questions.

So, once something is inside a black hole's event horizon, it can only move towards the center. This is fine for a point-object. But 3D solid objects rely on molecular forces to stay in one piece. These forces act in all directions inside the solid. But there could not be any interaction between atoms at different distances from the singularity, right?  So, what happens to a solid (let's assume a crystalline lattice, for simplicity) hypothetically placed inside the event horizon? Does it get cleaved in ultra-thin concentric layers, centered on the singularity?


I am Developing Movie Rental Application in JSP. After selecting movie with the help of checkbox, when I am iterating with that it is giving me null pointer exception. Here is the code for Statement.jsp file which is creating statement for the rented movies...  <%@page language="java" %> <%@page import="java.sql.*, java.util.*, mrs.*" %> <html> <head>     <title>Movie Rental Application</title> </head> <body>     <%@include file="Connection.jsp" %>      <% if (session.getAttribute("Name") != null) {             String[] checkboxes = null;             String[] days = null;              checkboxes = request.getParameterValues("c1");             days = request.getParameterValues("t1");             int i = 0;             for (String title : checkboxes) {                 String Name = session.getAttribute("Name").toString();                 int code = 0;                 ResultSet rs = stmt.executeQuery("select Type from Movies where Title = '" + title + "'");                 String Type = rs.toString();                 if (Type.equalsIgnoreCase("REGULAR")) {                     code = 0;                 }                 if (Type.equalsIgnoreCase("NEW RELEASE")) {                     code = 1;                 }                 if (Type.equalsIgnoreCase("CHILDREN")) {                     code = 2;                 }                 mrs.Movie m = new mrs.Movie(title, code);                 int day = Integer.parseInt(days[i]);                 i++;                 mrs.Rental r = new mrs.Rental(m, day);                 mrs.Customer c = new mrs.Customer(Name);                 c.addRental(r);                 stmt.executeQuery("insert into rents values('" + day + "','" + Name + "','" + title + "')");                 String result = c.statement();                 out.println(result);             }             stmt.close();             con.close();     %>     <% }%> </body> </html>   Here it is the Exception...


In C++, what is the best way to take input string and convert it to a number type. I was messing around with literal strings and was having a difficult time doing this, I am imagining that using a C String is easier? What is the best way for co-workers and fellow students to follow and make it easy and simple? Any thoughts?   What is the industry standard on this? Using STOI?

What's the C++ way of parsing a string (given as char *) into an int? Robust and clear error handling is a plus (instead of ).


Intuitively, conformal means angle preserving. How can I see that the left half plane is mapped to the unit disc with the angle of each element of the left half plane preserved?

Say you have the half-plane $\{z\in\mathbb{C}:\Re(z)>0\}$. Is there a rigorous explanation why the transformation $w=\dfrac{z-1}{z+1}$ maps the half plane onto $|w|<1$?


actual flight times BA0253 on 22 may2016 heathrow to George town cayman islands as flight delayed

The question  only deals with flights in the US sourced from the  . Is there some similar source for EU, Asia etc?


I remember there was some way to include badges in the post text in a similar way  can be, but I cannot find it in the . How can this be done?

I always found it odd that although I could compose  and  with  in , I can't do the same for a , , or . I assume that this is because, outside of Meta Stack Overflow, there is no real need to reference badges? Be that as it may, would there be any interest in adding badges to Markdown? I am envisioning a syntax similar to the one used for tags. For example,  [badge:great-question] Question score of 100 or more. This badge can be awarded multiple times.  or ( ):  [gold-badge:great-question] Question score of 100 or more. This badge can be awarded multiple times.  would be displayed as  Note that I am not proposing that you need to enter the badge description to display the badge, nor that the badge description will be automatically inserted. Typing [badge:great-question] (or [gold-badge:great-question]) would be sufficient to display the "Great Question" badge, which would ideally have a tooltip with the badge description and link to the badge page. (I used the badge description text in the example above only because it was easier to take a screenshot that way.)  and  are great examples of posts that would benefit from the addition of badges to Markdown. UPDATE:  has brought it to my attention that the idea of a badge creator is not a new one. Check out this post for .      , until inevitably . Luckily,   (as of May 23, 2013). Given the popularity and utility of these badges—their use in jokes notwithstanding—wouldn't it be better to have Stack Overflow host this functionality itself rather than have users rely on an external service that will inevitably go down?


$$\lim_{n\rightarrow \infty}n\left[\frac{1}{n^{\alpha +1}}(1^{\alpha}+2^{\alpha}+\cdots+n^{\alpha})-\frac{1}{\alpha+1}\right]=\frac{1}{2}$$  I know that this can be solved by the Stolz theorem, as , but when I do it myself, I first try this: $$\text{The origen}=\frac{\frac{1}{n}\sum_{i=1}^{n}(\frac{i}{n})^\alpha-\frac{1}{\alpha+1}}{\frac{1}{n}}$$, it seems that the summation is somehow like $\int_{0}^{1}x^{\alpha}dx$, but I do not know what to do next, Could it can be done following my method? Thank you!

Evaluate  $$\lim_{n\to\infty} \left(\frac{1^p+2^p+3^p + \cdots + n^p}{n^p} - \frac{n}{p+1}\right)$$


I am new to ubuntu and am curious as to the best way to go about installing it.  I currently have:   Toshiba Satellite A300 PSAJ0C-SH308C Running Windows Vista Home Edition   Is it better to wipe the hard drive completely and freshly install Ubuntu? Or is it better to just install on top of it?  I want to do a fresh install as it just seems better but I am concerned that if I cleanse my hard drive that I will no longer have full functionality of my PC since I will be missing my drivers (eg wireless). All of the drivers on the Toshiba website are for Windows.   Please advise.  Thanks.

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


Is it possible to use DNS to redirect all HTTPS traffic to a specific IIS website irrespective of the TLD?   EDIT: I have another post where I was dealing with this issue separately:  The other post was from the server point of view not DNS.   Regards, Jacques

This is a  about DNS/Hostnames resolution to IPs/Ports   Example 1  I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to port 87. How can I accomplish this using DNS only?  Example 2  I'm running a service on my server on a non-standard port. How can I get clients to connect to this non-standard port automatically? Can I use DNS? Is there some application specific support where DNS could indicate the IP and Port?   Example 3  Do some application protocols specifically support hostname awareness, and allow special actions to be taken based on this information? Are there other questions on Server Fault that cover some of these?  Commandeering: This question was originally asking about running IIS and Apache on the same server, but the same concepts can be applied to any server software receiving connections from clients. The Answers below describe the technical problems and solutions of using DNS and application protocol support to assign a port number for a client to connect.


Kenyan passport holder living in India with an OCI card for the last 20 years, just got my Portuguese passport and living for the UK soon and wanted some information about the immigration part, whilst leaving India, I need to show my Kenyan passport and OCI card and when I reach the UK do I show my Portuguese passport only? Once in the UK I plan to apply for dual nationality, Kenyan and Portuguese, will this create any problems for me?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Is the equipartition theorem really a theorem and derivable from more basic assumptions or is it just a hypothesis.  Some of the ways energy is partition is not to squared quantum numbers (e.g. vibration) although translation and rotation are

Under what conditions does a system with many degrees of freedom satisfy the equipartition theorem?


Whenever I answer a question I would always conclude it with what I feel to be a proper closing such as "I hope this helped you. You have a wonderful day!". However on certain sites people of a much higher reputation with remove them from the end of my answers, but not all sites. I have not seen such a rule barring one from doing this, so I am confused why it was removed.    is it seen as off topic? is it seen as detracting from the answer? Is there actually a rule that prohibits this?

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


In the documentation to DBCC SHRINKDATABASE, Microsoft is warning to run the command because it's i/o expensive. However, in the documentation to DBCC SHRINKFILE, there is no such warning. Now when we use simple recovery and basically have only one database file, is it better to run DBCC SHRINKFILE or DBCC SHRINKDATABASE?

DBCC ShrinkDatabase() DBCC ShrinkFile()    Do I need to run both DBCC commands in order to shrink the database? What is the difference between these two above?


When motorcycles accelerate quickly they do a wheelie. Where is the torque provided to lift the motorcycle?

So I've been trying to create a mathematical model for an electric motorcycle and began to wonder about the maximum possible torque that could be supplied to the rear driven wheel without having the bike begin to lift up on one wheel.  I found ways to calculate this value online; however, the basic concept as to how the bike actually lifts escapes me.    My problem started when I began to think about what axis the bike will rotate about when it is doing the wheelie.  My first intuition was that the frame and front wheel, together, rotate about the rear axle.  But when I drew a free body diagram of the frame/front wheel system just at liftoff (see below) I made note that the only forces acting about the rear axle, point O, is the force of weight.  This means that an increase in applied torque and subsequently, the applied force Fa, should not effect the rotation about the rear axle.  I know that the applied force on the back wheel is indeed correlated with the propensity for a bike to wheelie, so I considered that the axis of rotation I was choosing was wrong.  If we take the free body diagram above and sum the moments about the center of mass, we would find that an increased applied force would in fact cause the solid body to rotate.  The problem with this understanding is that during rotation, the center of mass of the drawn system should actually rises relative to the surface the bike is moving across.  If the bike were to be truly rotating about its center of mass, then the back wheel would begin to dip below the surface of the road like you might see in a glitchy video game.    So I suspect that the bike is in fact rotating about the back axle, but I don't understand why, please help!  edit: I added the external torque from the back wheel to the frame, which would allow the bike to rotate about the back axle  edit 2:  I suppose that the torque acting on the frame via the engine should not effect the rotation as the movement of a motorcycle can be perfectly replicated by applying a force at the back axle.  A third possible axis of rotation might be the lowest point of the back wheel.


I have the following practice homework where I have run out of ideas: Let $G$ be a group and let $N$ be a normal subgroup in $G$ with index $p$ (prime). Let $H$ be a subgroup in $G$ which is NOT contained in $N$. Show that $G=HN$ and $[H:H \cap N]=p$ I am thinking about maybe I need to apply an isomorphism theorem but I can't get anyone to fit.

Let $G$ be a group and $H$ be a normal subgroup of index $p$ ( a prime ) ; suppose $K$ is a subgroup of $G$ not contained in $H$ , then is it true that $G=HK$ ? ( I know that the fact is true if $p=2$ , but I don't know for the general case . Please help . Thanks in advance )


Looking for recommendations for someone who loves physics but is not in college/university. I'm a 39-year old engineer.

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


on the rhel version 7.5 the used swap is 12G  we change the swappiness from 10 to 1  echo 1 > /proc/sys/vm/swappiness  sysctl -w vm.swappiness=1  echo "vm.swappiness = 1" >> /etc/sysctl.conf   and did the   swapoff -a && swapon -a   then from free -g we still see the same used swap size  so seems that the change to swappiness , and swapoff -a && swapon -a  , not help to decease the swap use  the only thing that I think to do is to reboot the linux machine  is it make sense ?

Somehow I happened to swap out 14 GB of memory. After having killed the culprit, I have tons of free memory again, so I thought I could  again. So with 5 GB out of 32 GB used and 14 GB of swap space used, I ran swapoff -a.... and 4 hours later about half of the work was finished.  This means less that 1 MB/s, while I can easily copy 200 MB/s. My swap is encrypted but so are all normal partitions and with  it leads to no noticeable CPU load (and filling the swap space took only a few minutes). I see that there's no special reason to optimize swapoff, however I wonder how it could get that slow?    Just adding some more data: My main memory is 32 GB and I have 32 GB swap space on each of 4 harddisks (surely an overkill, but who cares?). The whole swap space can be  (decrypted and) read in less than 5 minutes:  time -p sudo sh -c 'for i in /dev/mapper/cryptswap?; do md5sum $i & done; wait' 014a2b7ef300e11094134785e1d882af  /dev/mapper/cryptswap1 a6d8ef09203c1d8d459109ff93b6627c  /dev/mapper/cryptswap4 05aff81f8d276ddf07cf26619726a405  /dev/mapper/cryptswap3 e7f606449327b9a016e88d46049c0c9a  /dev/mapper/cryptswap2 real 264.27   Reading a part of a partition can't be slower than reading it all. Yet reading about 1/10th of it takes about 100 times longer.  I observed that during swapoff both the CPU was mostly idle (maybe 10% of one core) and so were the disks ("measured" by the LEDs). I also saw that the swap spaces were turned off one after the other.


I have a table with two fields A and B, and i want fill field B with "some values" from field A:  FieldA: 123456_CC; 123_D; 1234567_AB; 123456768_F  I just need the "text" that is associated with the value of the field  FieldB: CC; D; AB; F  What expression to create this?

I'm using field calculator in ArcGIS Desktop 10.2.1.  I have field1 which has a values of "A_B" (example).  I created two fields out of this, values to the left of the underscore go in fielda and to the right of the underscore go in fieldb.  I used the code below in field calculator to separate them out into two fields.  fielda =  field1.split("_")[-1]   fieldb =  `field1.split("_")[-1]`   I now have field1 with values of A_B_C_D.  I need to separate the A_B_C_D into four separate fields using field calculator.  fielda = A, fieldb = B, fieldc = C and so on. I'm not sure how to go about this.  I basically need to parse the values by the underscore.


How can I make FaceTime appear in the iOS with an iPhone bought in UAE and used in another country?

I bought my iPhone 6 Plus in Dubai. I am using the phone in Sri Lanka and I cannot use the FaceTime. How can I use FaceTime while in Sri Lanka?


How do I explain to players why there are no situational modifiers in Dungeon World? Being used to other RPGs, they would expect modifiers for performing actions in a more challenging circumstance.

I've been GMing for a couple of sessions now and I'm still struggling at making encounters or situations more difficult. I will describe dangerous situations and encounters in fiction but the mechanics make it too easy for my players to succeed.  For instance no matter how big I describe the Troll, if the fighter of the party charges him and swing his sword, roll+2 for Hack and slash, he'll easily hit the troll. Almost 40% chance to hit without consequences.


I have taken many screenshots on Minecraft Java edition, but I can't find them in the screenshots folder on my computer. Can you please help me? (I have Windows 10)

I pressed F2 to take a few Minecraft screenshots. Later I couldn't find them. Where are they stored on my computer?


We are doing an evaluation of what to use for client technology, I was wondering what Java has to offer.  I know that this is a close duplicate to this question:    But the answer in the above question is over 2 years old, so the answer today could be different.

I'm mostly a .Net person at the moment, but I've been playing with Java some lately-- exploring what's out there.  Now I'm looking for the Java equivalent for WPF.  I know I could find an OpenGL library or two out there, but that's not really as rich or simple as the WPF system.


I have 500gb HDD with two partitions C and D with the same size (232gb)  I have Windows 10 installed on C  I wanted to install Ubuntu on D  During the installation process I changed the D partition filesytem from ntfs to ext4.  Right after the changing process ended I stopped the installation.  When I boot my pc with windows the D partition does not occur.  When I run Ubuntu from usb the partition mounts empty.  Are my files on D lost?  Is there a way to recover them?

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


Some espresso beans have a deep "luxurious" luster while beans from other packages seem dull. Although I have only anecdotal evidence it seems that my usual brand, , often has the luster while some others don't (always). Is that from a difference in the beans, or the roasting, or is it just coincidence? For example, my last package of  seemed duller. I notice that the Lavazza is a mix of Arabica with Robusta while the Altomayo is pure Arabica but I think some pure Arabica also looked dull in the past. The packaging is very similar, and all samples come in kilogram airtight foil bags. The luster clearly makes the beans look classier; is it a sign of quality?

I find myself favoring the purchase of coffee beans that have visible oil on them.  My inference was that this bean had some extra flavor or awesomeness.  Am I right, are beans 'better' if they are oily, or more simply, what does that mean about the flavor profile of the bean?


I'm building a one-page website, each different "page" is a different div. Each div is placed below one another, so only one div is viewable at time. I want to be able to tell when a user scrolls to, and is viewing, one of the divs, and based on which div ID alter the CSS of a correpsonding link in my navigation. Any guidance is appreciated. Thanks!

I'm loading elements via AJAX. Some of them are only visible if you scroll down the page. Is there any way I can know if an element is now in the visible part of the page?


I'm a citizen of Argentina residing in France with a long-stay visa for an internship, valid from September 5th 2018 until January 5th 2019. As an argentinian, I'm allowed to visit Europe as a tourist for up to 3 months without any kind of visa.  Can I stay after my visa expires, by "using" those days, or must I leave on that date? What if I exit the Schengen area and then reenter as a tourist?  I'd only stay for a a few days, about 3, but I guess it doesn't make a difference.

I have a 1-year residence permit from one Schengen country that is now expiring. Upon its expiration, I would like to get my 90/180 days validity as a tourist to stay, or return here as soon as possible.  I understand that the tourist short-stay scheme is based on the 90/180 days "counter". But what happens if my previous stay was not tourism but residence (as searching year). Wouldn't that mean that I can quickly exit and re-enter the Schengen area to activate my tourist stay?   Also, is there a way to change this purpose of stay without exiting the Schengen area?


While some people are saying that this question has been answered before, its only the answer that has been given before to a different question with much more specifics (ie. asking specifically about call-by-reference / call-by-value, whereas this question does not presuppose knowledge of eiither)  The following code appears to be very confusing.  We can logically deduce that the reason why z.id updates after the function is because it is an object.  But why? What particular trait or characteristic of javascript is doing this?    function changea(a) {   a = 100; // does not change a }  // no return  function changez(z) {   z.id = 100;  // does change z } // no return  var a = 0;  // a is zero  changea(a)  // a variable  alert('variable a is equal to ' + a); // why does this stay at zero?  var z = {id: 0}; changez(z); alert('variable z.id is equal to ' + z.id); // why does this change to 100   see the demo here:

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


I'm using this below method to change the language of the app by passing the language code as string. When I change the screen orientation the language rests to default language and all views resets too.   public String setLocale(String lang) {     Locale myLocale = new Locale(lang);     Resources res = getResources();     DisplayMetrics dm = res.getDisplayMetrics();     Configuration conf = res.getConfiguration();     conf.locale = myLocale;     res.updateConfiguration(conf, dm);     Intent refresh = new Intent(this, Login.class);     startActivity(refresh);     finish();     return lang; }   I tried to use onSaveInstanceState and onRestoreInstanceState, but I don't know how to make all these methods work together.

I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example:  package com.android.hello;  import android.app.Activity; import android.os.Bundle; import android.widget.TextView;  public class HelloAndroid extends Activity {    private TextView mTextView = null;    /** Called when the activity is first created. */   @Override   public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      mTextView = new TextView(this);      if (savedInstanceState == null) {        mTextView.setText("Welcome to HelloAndroid!");     } else {        mTextView.setText("Welcome back.");     }      setContentView(mTextView);   } }   I thought it would be enough for the simplest case, but it always responds with the first message, no matter how I navigate away from the app.  I'm sure the solution is as simple as overriding onPause or something like that, but I've been poking away in the documentation for 30 minutes or so and haven't found anything obvious.


In lasso regression many coefficients become zero as discussed  $$ \min_{\beta\in\mathbb{R}^p}\frac{1}{N}||y-\beta X||_2^2+||\lambda\beta||_1 $$ Columns of $X$ are $\{x_j \}_{j=1}^p$ corresponding to $p$ variables and $y$ is answer variable. During any iteration, we increase $\lambda$. So some coefficients become zero. When it goes on, is it possible that some zero coefficients that were zero in iteration $i$ become non-zero in iteration $i+1$? If so, why? and if not, dose it have proof? The only thing I know is when we set $\lambda = \lambda_{max}=\max_{j}|\frac{1}{N}\langle x_j,y\rangle|$ or greater all coefficients become zero and the number of zero coefficients is increasing when $\lambda$ increases.

I am regressing a continuous predictor on over 60 variables (both continuous and categorical) using LASSO (glmnet).  In examining the variable trace plot, I notice that as log lambda increases, one of the key variables has a coefficient that actually increases.  Then, after a certain point, it begins to decrease like we would expect.    To make sure this wasn't a fluke, I ran 10 models using bootstraps and obtained very similar results.    Is this possible, or is there a problem with the data?  If legitimate, what does this trend in the variable's coefficient tell us about the variable and the relation to the response?