Background  Working with OOP-style in JavaScript, by creating pseudo-classes using objects. From examples and walkthroughs online, I'd been under the impression that we need to set up an object, then attach function to that object's prototype object.  However, I have been playing around today and tried attaching a function directly to the object itself. From testing, I can't find any behavioral differences. Simplified example of both ways below:  Version 1  var Class = function( params ) { }  Class.prototype.getData = function() {     return _data; };   Version 2  var Class = function( params ) {     this.getData = function() {         return _data;     } }   Question  What is the difference, if any, between these two implementations?

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


what is the antonym of postpone. I have seen the usage of "prepone" at many places. If that is correct, the is the post used in postpone a prefix ?

Possible Duplicate:          A friend of mine asked me this question, and it caught my curiosity.  Is there an explicit opposite of the word postpone?  As in, do something in advance?  Clearly what I just said is functionally equivalent to the answer I am seeking, but I was wondering if there was a single word that is the antonym.  More context: Bob was supposed to start work in July, but due to a work visa issue, he had to begin in advance.


I've tried it until this step: $\lim _{x\to 0}\left(\frac{\left(2x-\sin\left(2x\right)\right)\left(2x+\sin\left(2x\right)\right)}{\left(2x\cdot \: \sin\left(2x\right)\right)^2}\right)$ and got confused. I also tried expanding the limit into $\lim _{2x\to 0}\left(\frac{\left(2x-\sin\left(2x\right)\right)}{\sin\left(2x\right)\cdot 2x}\right)\cdot \lim _{x\to 0}\left(\frac{\left(2x+\sin\left(2x\right)\right)}{\sin\left(2x\right)\cdot 2x}\right)$ but the right-side limit doesn't exist.

I tried l'Hospital but that will require a lot (and I mean A LOT!!!) of differentiating  Is there a shortcut? $$\mathop {\lim }\limits_{x \to 0} \left( {{1 \over {{{\sin }^2}x}} - {1 \over {{x^2}}}} \right)$$  Thanks in advance


I don't understand the difference between String[] arrayName = {/*some data here*/}; and String arrayName[] = {/*some data here*/}; Is there any difference between placing square brackets after the type (String[]) and after the array name (String arrayName[])? If so, what?

I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?


I have been trying to input data from $_Post variables but I cannot spot where the error is? Hope you can help me.  Below is the code:  $conn = mysql_connect("localhost", "root"); if (isset($_POST['studLog'])) {  $uName = $_POST['uName'];  $pWord = $_POST['pWord'];   mysql_select_db("sis_main", $conn);   if (mysql_num_rows(mysql_query("SELECT * from student where stud_uname='$uName' and stud_pword='$pWord'"))) {   include("stud-view.html");  } else {   echo 'Account doesnt exist!';   echo "

";   echo "GO BACK!";  } } else if (isset($_POST['studReg'])) {   mysql_select_db("sis_main", $conn);  $stdID = $_POST['studID'];  $fname = $_POST['firstNme'];  $mname = $_POST['midNme'];  $lname = $_POST['lastNme'];  $stadd = $_POST['stAdd'];  $ctadd = $_POST['ctAdd'];  $bdate = $_POST['bDate'];  $gendr = $_POST['gender'];  $email = $_POST['email'];  $mobno = $_POST['mobNum'];  $uname = $_POST['newUName'];  $pword = $_POST['newPWord'];  $age = birthday($bdate);   if (mysql_query("INSERT INTO student values (`$stdID`,`$fname`,`$lname`, `$mname`,`$stadd`,`$ctadd`,`$age`,`$bdate`,`$gendr`, `$email`,`$mobno`,`$uname`,`$pword`);")) {   echo 'Account Successfully Regsitered!';  } else {   echo 'ERROR: '.mysql_error();   echo "GO BACK!";  }   } }      ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@gmail.com, 09981744039, kuyschan, kuyschan)' at line 1

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


Idea  As the reputation plays a major part in Stack Exchange, at least I would be interested to see where did particular user got the reputation from: accepted answers, good questions, upvoted answers or from something else. There is also currently quite extensive information about the user available and I suppose you can see all reputation changes already in the list. Even though all the data is available, it would be great to get it in more handy way as aggregated.   Why  Why this would be interesting is the fact that users differ really much from one to other on how they behave here. For example I tend to answer questions tens of times more than to ask them. On the other hand, I rarely get upvotes for my answers even though they usually are accepted since I generally answer on questions that aren't about the major topics because there it is more of a race and I like to take my time and craft quality answers.   Enough of me and to why I even thought of this in the first place. I often just follow one quite minor tag on Stack Overflow and answer to major part of questions there. There often exist users having trouble with even the basics of programming. Still, these users have multiple times more reputation than me and I'd be interested to see where has that all reputation come from.   Also as Stack Exchange can be seen (at least on Stack Overflow side) as a good reference for future employers, it would be good to be able to easily point out what you actually are doing here. These differences on where the reputation have came from might be essential to prioritize the applicants.   Implementation  I haven't thought that much about the implementation part but there should be a plenty of places to put that on profile view. Here's few possible placements:   Under reputation tab as a new box next to post, time and graph. Could be called statistics or overall. On the summary tab, under the part reputation.    Any ideas, comments, improvements, problems or notices to mention?

I would like to see a breakdown of reputation by post type on the user summary page.    This would help show, at a glance, how much someone actually knows vs. how good they are at asking questions.  For instance:     Reputation from Questions - 10,015 from 1024 posts   Reputation from Answers - 110 from 11 posts   Reputation from Edits - 400 from 1000 edits     I would take any answers the above person gave me with a grain of salt instead of assuming they were knowledgeable because they have 10k rep.  We already have a multitude of other readouts on the new page, so this shouldn't up the clutter factor too much either.


I have a LyX article, structured with Parts -> Sections -> Subsections, and I want to print the Part name in the document header.  I am trying to get the part name with the following command, but it prints "Part"  \fancyhead[LE,RO]{\slshape \partname}   I have also read & tried  but my document doesn't compile.  How can I simply get the part name within the LaTeX Preamble?

Actually I am using the fancyhdr package, and trying to put the current part name in the right header.   I know that \rightmark and \leftmark are used to represent the current section and chapter heading respectively, but I can not find anything similar to represent the part name.


I'm here for using my Asus USB AC-68, and you're going to tell me this is a duplicate of  but it's not, because both the tutorials from both the answers return a usb that can see wifis, but cannot connect to them.  I keep getting a popup asking me to input the wifi password again, and I'm sure it is good because my built-in card can connect to it with the same password I type. I use Ubuntu Zesty Zapus 17.04 which is on the latest linux 4.10 kernel but it looks like this may impact the usability of my USB.  Any help?

My Panda USB wi-fi adapter works just fine on 16.10, but when I try to connect to my wi-fi router in 17.04, GNOME network manager reports "Connection failed." I did some tinkering, and noticed that my MAC address for my wifi adapter, according to GNOME, is DIFFERENT every time I make it forget my wifi settings and try to reconnect. Any leads on a possible fix or work-around?   I'm running Ubuntu GNOME 17.04, kernel 4.10.0-19-generic, GNOME 3.24.0.


If $34!=\overline{295232799cd96041408476186096435ab000000}$ then find the value of $a,b,c$ and $d.$  My Attempt: I can find that $b=0$ because it has seven five integers.  $\lfloor{\frac{34}{5}}\rfloor+\lfloor{\frac{34}{25}}\rfloor=6+1=7$  Also I think $a$ can be found using divisibility rule of $8$ that means $\overline{35a}$ is divisible by $8$ which gives us $a=2$. But I'm stuck in finding $c$ and $d$. Using the divisibility rule of $9$ I get an equation. And using divisibility rule of $11$ I get another equation but when I solve them I get two values for $c$ and $d$.  Note: calculator is not allowed.

Find the values of $a,b,c,d\in\mathbb{N}$ such that      $$ 34!=295232799cd9604140847618609643ab0000000 $$   My Attempt:  The factorial of $34$ contains a $3$, so the RHS must be divisible by  $3$. Similarly, it must be divisible by $7$, $11$, $13$, $19$ etc.  But I do not understand how can I calculate $a,b,c,d$ in this equation.


I am new to C programming and was try on some simple code. I got a "segmentation fault" for below code, please help.  The code as below:  #include <stdio.h>  int del_substr(char *str,char const *substr);  int main(void) { char *str="welcome"; char *substr="com"; int result;  result=del_substr(str,substr); if(result==1) {     printf("find and deleted! new string is %s\n",str); } else {     printf("did not find the substr\n"); }  return 0; }  int del_substr(char *str,char const *substr) { int i=1; char *temp=NULL; while(*str!='\0') {     if(*str==*substr)     {         while(*(substr+i)!='\0' && *(substr+i)==*(str+i))         {             i++;         }         if(*(substr+i)=='\0')         {             printf("We find it!\n");             temp=str;         }     }     if(temp!=NULL)     {         break;     }     else     {         str++;         i=1;     } } if(temp!=NULL) {     while(*(temp+i)!='\0')     {         *temp=*(temp+i);         temp++;     }     *temp='\0';     return 1; } else {     return 0; }  }   This code is meant to find substr in str and then delete substr from str, moving everything behind substr forward, return 1. else if failed in the searching, return 0 instead.  when the code runs to below line, a segmentation fault is showing up.  *temp=*(temp+i);   Can anyone help? Thanks so much in advance.  Thanks.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


One of the first clue that Madeleine is possessed by Charlotta's ghost is when Scottie sees her through a window at the McKittrick hotel, where Charlotta lived, but when he goes to the front desk he learns that no one checked in that day and the keys are still at reception. How did Madeleine appear through the window then?

In Hitchcock's Vertigo, there is one part of the film that has never made sense to me and I believe that it was a cheap ploy to mislead the audience until the ultimate reveal (I won't spoil it here).    In this scene Jimmy Stewart watches Kim Novak enter a rooming house and afterwards sees her standing by the window on the 2nd floor.  When he enters the house and talks to the inn-keeper, she tells him that Kim Novaks's character positively never came in and even shows him her room key that is still behind the front desk.  They go up to the room and find it empty.   This scene seems to imply that the Kim Novak character may have had a ghost like quality. But given the reveal at the end she clearly does not and there was no way for her to enter the room without a key and without being seen by the inn-keeper.  If this was done by some other director I probably wouldn't have given this much thought but Hitchcock was a perfectionist (especially for this film) so I never understood the significance of this scene other than to mislead the audience (with a cheap ploy IMO).  Does anyone who is familiar with this film have a different explanation/perspective about this scene in an otherwise brilliant movie.


I am building a boss fight with multiple waves of enemies. I am trying to figure out how to detect whether an entity (in this case wither) so when it's at 2/3 and 1/3 health it spawns more entities such as angry zombie pigmen, blaze, wither skeleton, etc. Is there a way to do this on Minecraft Bedrock or is it really only possible on the Java edition on Minecraft? From what I know you can only use "dummy" scoreboard objectives on Bedrock. All others are only available on Java (please correct me if I'm wrong).

This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s}


guys. I want to display all table names in luasql sqlite3. I tried serveral ways but none of them succeeded. Can anyone help me? thanks a lot!

For some reason I can't find a way to get the equivalents of sqlite's interactive shell commands:  .tables .dump   using the Python sqlite3 API.   Is there anything like that?


Let $H_1,H_2,H_3 \lneq G$ be groups such that $\bigcup\limits_{i=1}^3H_i = G$. Show that $\forall 1\leq i \leq 3\ [G : H_i]=2$  For three different numbers $1\leq i,j,k \leq 3$, if for some $H_i \leq H_j$ then $H_i \cup H_j \cup H_k = H_j\cup H_k = G$. The union of two subgroups is a subgroup only if one is a subgroup of the other, so we get $H_k = G$, while it's given that $H_k \lneq G$. So no $H_i$ is a subgroup of another $H_j$. If so, then for the union $(H_i \cup H_j) \cup H_k$ to be a group, it's required that $H_k=<(H_i \cup H_j)-(H_i\cap H_j)> (= <H_i \Delta H_j>)$. But then, if $h_1 \in (H_i \cap H_j),\ h_2 \in (H_i \Delta H_j) \subset H_k$, let's say $h_2 \in H_j$ (it belongs to either $H_j$ or $H_i$), then also $h_2^{-1}, h_2h_1 \in H_i \Delta H_j \subset H_k \Longrightarrow h_1 \in H_k$. So we got $H_i,H_j \leq H_k$, but we showed that this contradicts with G being their union.  Is there a problem with the question, or did I miss something?

Suppose $G$ is finite and $G=H\cup K\cup L$ for proper subgroups $H,K,L$. Show that $|G:H|=|G:K|=|G:L|=2$.  What I did: so if some of $H,K,L$ is contained in another, then we have $G$ being a union of two proper subgroups, which is impossible due to another result. So none of $H,K,L$ is contained is each other. If some element $h$ belongs to only $H$ and $k$ belongs to only $K$, then its product $hk$ cannot be in $H$ or $K$, so must belong to only $L$.


I have installed node correctly and now trying to install npm sudo apt install npm  But I get Media change: please insert the disc labeled  'Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)' in the drive '/cdrom/' and press [Enter]  I don't have a CD I installed Ubuntu using ISO image on a flash disk. How can I solve this?

I've tried several times to install radio tray on my fresh ubuntu 11.10 installation but when I run ~$ sudo apt-get install radiotraythe following dialog pops up at the end of the script:  Media change: please insert the disc labeled  'Ubuntu 11.10 _Oneiric Ocelot_ - Release i386 (20111012)' in the drive '/cdrom/' and press enter   I've performed previous installations of this app on another computer using the same repository and all went smooth. My Ubuntu Oneiric version was installed from a USB flash drive, so don't understand that request from apt-get.


I have roughly 30,000 .doc files that I need to convert to PDF. What's the best way to go about this?  I have every flavor of OS you can think of...

How do I batch convert many Word documents and have them saved as [originalfilename].pdf?


Usually, before beginning my coding duty I open the following:   google-chrome nautilus terminal system monitor gedit   Is there a way to open all of them with a single terminal command?  I use Ubuntu 18.04.

I was curious how I would go about running multiple commands via shell script.  For example, just to try it out, I'd like to be able to connect a .desktop to a .sh that will run all the update codes so I don't have to type it out. I know how to execute a single command via a .sh, not multiple.  Any way?


xfce4: sudo startxfce4 - all good, but only startxfce4 - fail. Why?  How to correct this behavior? I think that need to change permissions, but where?  Thank for your attention to this problem, and thank for your opinions about it.

I would like to be able to install XFCE to run alongside unity so I can choose, upon startup, which DE I use, without breaking any features of either DE.  Following this:      Note: don't install Nautilus in Xubuntu! This will cause system   conflicts.   I don't want to affect ANY of the features in Unity, i.e. I want to be able to use the two interchangeably, so I can't follow some suggestions of just cleaning out all the old stuff as that would mean using Unity would be changed.   Is this possible in 12.04?


Take a look at . There were two "Approve" marks, but then  rejected it, and that was it. The suggestion was rejected with a 1-2 reject-approve ratio. From Community's , it states that "[it is] not really a person," and is actually "a background process" that does the following:  Randomly poke old unanswered questions every hour so they get some attention Own community questions and answers so nobody gets unnecessary reputation from them Own downvotes on spam/evil posts that get permanently deleted Own suggested edits from anonymous users  None of those mention that it works the review queue. In addition, the right side of the  states that "Stack Overflow is moderated by []" - NOT an automated bot. If the automated bot can do review on its own, why would we be reviewing manually?  So, all together, I have a few small questions:  Is the ability to make an decision on behalf of everyone moderator-only or Community-only? Why is a computer allowed to make decisions for us? Why does Community's  not mention that it can do that? Is Community really only software, or is there some interaction behind the scenes?

Why does the Community user sometimes approve or reject edits? How does a machine know if my edit is valid? What does it mean if my edit was rejected by Community?     See also:


I want to use LyX (a document processor) on Bash on Ubuntu on Windows 10. I installed LyX with apt-get.  $ sudo apt-get install lyx   It succeeded. Then I tried to start LyX with  $ lyx   but it failed.  lyx: cannot connect to X server   How can I fix this problem?

After installing the new feature (still "Beta") called  that is a feature subset of Windows 10 Anniversary edition, I get the following message when trying to start X-Windows using startx :    What do I need to tweak / configure in order for X-Windows to launch?  I noticed that xauth was already installed, however I had to install the rest of the framework as follows :  apt-get install xorg openbox


Show that a finite domain $F$ is a field.  Let $I$ a proper ideal of $F$ and let $a\in I$. In particular, $a$ is not invertible, otherwise $I$ wouldn't be proper.   I would like to show that $I=(a)=(0)$, but without success.

This is how I'm approaching it: let $R$ be a finite integral domain and I'm trying to show every element in $R$ has an inverse:   let $R-\{0\}=\{x_1,x_2,\ldots,x_k\}$,  then as $R$ is closed under multiplication $\prod_{n=1}^k\ x_i=x_j$,  therefore by canceling $x_j$ we get $x_1x_2\cdots x_{j-1}x_{j+1}\cdots x_k=1 $,  by commuting any of these elements to the front we find an inverse for first term, e.g. for $x_m$ we have $x_m(x_1\cdots x_{m-1}x_{m+1}\cdots x_{j-1}x_{j+1}\cdots x_k)=1$, where $(x_m)^{-1}=x_1\cdots x_{m-1}x_{m+1}\cdots x_{j-1}x_{j+1}\cdots x_k$.   As far as I can see this is correct, so we have found inverses for all $x_i\in R$ apart from $x_j$ if I am right so far. How would we find $(x_{j})^{-1}$?


So have found some issues with page content placing. It never happen to me before. So I have 3 pages of text and one table (which is 1 page length). These all pages are two sections. First section is 2 text pages and table, and other section is 1 page of text. Every page is one page length (I mean it is fully written page of symbols). And I don't know how all 3 text pages goes first, leaving table in 4 page. So my sections are messed up. Maybe any one could lend me some ideas, how to move my table from page 4 to it's right position in  page 3?  Thanks in advance

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


I have a question on mkpasswd command result, I must use the same word in this to reproduce the same result hashed over and over, but what happens if I left without the -S option this will create a hashed password with a salted random word, so here is my problem:  with -S option.-  password: p4ssw0rd word: 22446688 output: $6$22446688$kQPZPIx3oZHwJ/l1xteaU5CqM0m7IoglQPFtDwUSMYCUAHkRUAIAfETjvgJmXhwLm4NVI5DHTXYt9d25cnZN3/   RESULT WILL BE ALWAYS THE SAME ****  WITHOUT -S option.-  output:  $6$nLtu32Q.5ZtRwK9x$z51ORpMvbOmxRj2IveXlqZnBZI16Fnvn4HQA7JBAFIPbhTI/gugtq0XCS3bBl80JBTDrROrm9emMpyRaZt0Pv0   RESULT WIL VARY OVER AND OVER AGAIN****  when I use the word over and over the result is the same, when I don't use the word result is different, so my question is if I take for example option without -S option and used for encrypt password how do I guarantee that when enter password will be compared and will be same since I only have password but I don't know the salt word since this was optional and assigned randomly? or it does not matter since the word is stored with the hash of the password and is not required to know it?

I am using this function to create a password in the shadow file  $ mkpasswd -m sha-512 password $6$o50n4EfNOBzfs$K5l5AcOI5e0I9n2df0LmR11OLSPKSVM6AGBOnWVfDDfMubb46MrAj0zehdLNEoYzD2fj5q4XUdDwexj/dWLHy/ $ mkpasswd -m sha-512 password $6$ADmDOhDpW$gsYQuiKPpV1ewaUpRq2VGAvrcocffLQ8XGF94e6LNLZfKIjy6Ku.cZoR/5exeCi1ESjPB9TRM6HxCiY5BCNCV0 $ mkpasswd -m sha-512 password $6$Efj1agaI$HGkny3q1OTYT4KREh18gueHJae/3Bvil0iOEhfXj8bD.qy9Lg2UIQJMuBcq0XtG3xzueK.7cp0GfKr7tEo5YI/ $ mkpasswd -m sha-512 password $6$zdVPlCPai4Y$x3CBvlP99xZXZcr4PTiE..YLpZx39h5OHDxqazd9wFLImPuwsXF0M6KmqLzlCCrnQhI2lmEPdCzfmHA/fDiOz.   It makes me wonder how does the output value work as a password


I'm asking as everyone in tutorials apply it onto the mesh but they don't explain it properly. It seems to me that it causes some problems. But I still didn't get why it causes problems if I don't apply location, rotation, scale to a mesh.

I've watched several tutorials and very often they applied the location, rotation or scale to the object when they transformed it in Object Mode. They always said it is important, but why?


How much mana should I put in a deck with Mountains and Forests? How much of each? I counted the mana in my black deck to see how much I need, but I still don't know.

When choosing cards for a deck, one of the most important things to consider is the number of land you put in. The biggest issue is mana curve, of course. What shortcuts are best for determining the proper amount of land with a given mana curve?


Hi I am new to C++ and trying to do an assignment where we read a lot of data from a txt file in the format of   surname,initial,number1,number2   I asked for help before an someone suggested reading the 2 values as string then use stoi() or atoi() to convert to int. This works great, except I need to use this parameter "-std=c++11" for compiling or it will return an error. This is not a problem on my own computer which will handle "-std=c++11", but unfortunately for me the machines which I have to present my program on does not have this option.  If there another way which I can convert string to int that doesn't use stoi or atoi?  Here is my code so far.  while (getline(inputFile, line)) {     stringstream linestream(line);      getline(linestream, Surname, ',');     getline(linestream, Initial, ',');     getline(linestream, strnum1, ',');     getline(linestream, strnum2, ',');     number1 = stoi(strnum1);     number2 = stoi(strnum2);      dosomethingwith(Surname, Initial, number1, number2); }

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 ).


If any of us find ourselves facing difficulty or problems in submitting an answer for any question asked in StackOverflow and you are getting this message "answer from your account is banned" then please see below, as it should be as helpful for you as it was for me.  This will be ended we earn a minimum of 10 reputation. As their are certain restrictions on new users for answering any questions randomly, this will be lifted asap once you get 10 reputation.  Question: If you have restrictions on answering questions, how are you supposed to be able to ever earn this 10 minimum reputation?

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


The class Test is:  public class Test { private final Object finalizerGuardian = new Object() {     @Override     protected void finalize() throws Throwable {         System.out.println("finalize");         super.finalize();     } };  public static void main(String args[]) {     Test s = new Test("s");     s = null;    } }   the finalize method api doc is:     Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.   but when the main method execute competely I can not see the output "finalize" So,how to see the output

If I call finalize() on an object from my program code, will the JVM still run the method again when the garbage collector processes this object?  This would be an approximate example:  MyObject m = new MyObject();  m.finalize();  m = null;  System.gc()   Would the explicit call to finalize() make the JVM's garbage collector not to run the finalize() method on object m?


So I've started working with an external monitor connected to my MacBook Pro trough a elgato thunderbolt 2 dock. I've made the external monitor my primary monitor, and since it's ultrawide I rarely use the macbook's monitor, where I usually just have some chats open, or just the wallpaper. The problem is that I don't want to use the macbook in clamshell mode, because I need the extra screen space anyway at least a couple of time during a working session, and because the macbook needs to be connected to the charger. So my question is, or better are   Is there a way to have a screensaver only on my macbook monitor, which is the secondary monitor. Or better Is there a way to turn off (not lower the brightness) the monitor automatically without putting the mac to sleep?   Third party softwares are ok.  EDIT  These question didn't help me for the following reasons:    Dimming the backlight of the macbook monitor, while it helps with focusing on the primary monitor, doesn't mean the pixels get refreshed since the display itself it's still on. And the point of having a screensaver is just that, to refresh the pixels.    This is a moving wallpaper, not a screensaver, meaning that all the windows will sit on top of it. If I have several windows open on the MacBook monitor, it's possible that the wallpaper isn't even visible. A screensaver on the other hand will display over the windows and go away when the focus (keypress, mouse click etc) returns to the monitor showing all the windows underneath.     Kinda related to the first one, dimming the monitor doesn't do anything for the pixels.  Thanks!

I have an iMac with a large format display set up as a secondary monitor that we use as a television for watching movies.  When I am just using the iMac, I would like for the secondary display to display something interesting rather than just the wallpaper.  Is it possible to set up a screensaver that appears on the second monitor (I really like the iPhoto slideshow) while allowing me to use the primary iMac monitor?  I would even be happy if it wasn't technically a screen saver, but just any sort of slideshow that could be displayed on one monitor while I work on the other.  Currently if I play a slideshow in iPhoto, the other monitor goes blank. :(


I ran across a flagged answer () which is basically a link to a blog post. The link explains precisely how to do what's asked in the question, so I marked the flag "invalid". Moderator disagreed, and deleted the answer.  I understand that link-only answers are frowned upon on Stack Overflow sites, and for very good reasons. However, I did not think that they are automatically considered a valid target for "not an answer" flag -- regardless of how helpful the link is. The moderator who deleted the answer obviously disagrees with me.    Why did he disagree?  Should I even bother investigating the helpfulness of the link while reviewing these kinds of flags in the future?

Related:  (not a dupe, that's a feature request and was closed as a dupe of another one)        (old) post does indeed say that Link-only answers can be flagged as NAA, but there are a lot of posts like  which define Not An Answer is a way that it doesn't apply to link-only answers.  Can we get some up-to-date consensus on this? That link only answers are not allowed is .


I know that ${var} and $var does the same thing. I also know that you can use brace for advanced options like ${var:=word} or ${var#pattern}. It's also explained .   But I see in some bash scripts the use of braces in the simplest form : ${var} and sometimes I see only this notation $var.   Is there any reason to prefer this syntax over the simple $var as it does the same thing ? Is it for portability ? Is it a coding style ?   As a conscientious developer, which syntax I should use ?

I can write  VAR=$VAR1 VAR=${VAR1} VAR="$VAR1" VAR="${VAR1}"   the end result to me all seems about the same. Why should I write one or the other? are any of these not portable/POSIX?


In a very famous tv show we talk about a firm and in other tv show we talk about company  I want to know the main difference between them.

A company is any form of business whether it is small or large. Generally the term "company" indicates a particular kind of business dealing in a specific product. An organisation is the larger form and generally comprises of a number of companies.  Simply, a company is an organization, but an organization is not just a company. An industry is the combination of companies in same line of business. Firm, corporation and business  are synonyms of "company". An Agency is a particular kind of company, which serves as an intermediary between clients (other companies or individuals).  Is this correct?


There are words for things like a person's hunger, nausea, anger, etc..  I'm hungry. I'm nauseous. I'm angry.  Is there a similar word for needing to use the bathroom?  I'm bathroominous.  We're using "bathroomosity" for the time being, but an actual word would be preferable.

Sometimes my brain (maybe because I'm not a native English speaker) tends to come up with logical extensions to common formats; in this case, more than once I caught myself thinking (not out loud, thankfully) that I was feeling "pissy". Now, the actual meaning of that word is nothing close to what I meant, but I can't help but feel like there's a gap there.   seem to have wondered the same but I don't think I can draw anything conclusive from that...


Did anyone in Middle Earth (besides the Istari and other Ainur) know of or acknowledge the existence of Eru Illuvatar? Are there any temples demonstrating worship for Eru or any text from the books indicating an acknowledgement of a supreme being?  I apologise for the fact that these are two seperate questions, but it is impossible to have one without the other: One, who knew of Eru's existence? Two, who worshipped him?

One thing that is notably absent in Middle-earth is any mention of temples, churches, priests or religious rites.  There are passing mentions of Men who would "worship" Sauron, but generally the world of Middle-earth seems much less religious than medieval Europe, or even classical antiquity.  One never hears about "the cult of Aule" or "the cult of Yavanna," although historically there were many "cults of Athena" or "cults of Poseidon."  Aragorn doesn't (to my memory) make an offering to Tulkas before battle, nor does he pray to Eru Ilúvatar for victory, and all the holidays and solemnities seem to commemorate historical figures, not religious ones.  This is especially strange in a world where there are still living witnesses, like Galadriel, to the actions of the Valar and other "divine" beings, and where there are still Maiar wandering around talking to people and putting on flashy firework shows.  Now, a lot of people talk about how Tolkien didn't want the Valar to be considered "gods," but at the same time he did use phrases like "the gods of old" numerous times.  Clearly, these beings would have qualified for worship in most cultures.  And even without the Valar being considered a true pantheon, there is still Eru, a closer analogue to the Christian God of Tolkien's beliefs, and we know the denizens of Middle-earth knew of him (Him?) because of the line "Eru, who in Arda is called Ilúvatar."  And yet, Ilúvatar seems not to be terribly important to anyone on a daily basis.  So my question is this: how familiar with the "theology" of Middle-earth were the citizens of Middle-earth?  Would the average merchant in Rohan know about the Valar and the Maiar and Iluvatar and the Music of the Ainur?  The average noble in Minas Tirith?  The younger Elves, like Legolas?  The Dwarf Lords?  Were the theological truths about the formation of the world, the Valar and the Maiar just so well known that they weren't worth commenting on, or had they been forgotten by most?  And if they had been forgotten, why wasn't the knowledge (whether through deliberate teachings or casual conversation) re-invigorated by witnesses like Gandalf or Galadriel?


since some days I get the following error message when I call an webservice from SF:  PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target   I have read different other comments etc. here but I still do not have a clue why this happens. When I check the remote site with:     and enter my subdomain: subdomain.example.com everything besides the following is green:  The server is not sending the required intermediate certificate.   But I do not think that this is the point or?  What I know:    Simple GET request with Basic Auth Postman call works   When I go to global settings and turn off 'SSL Verification'  Curl call works SF do not work round about from the 28th of January. Was working all the time before. There is/was a Self-signed certificate in SF that expires on the 28th   This certificate is/was def. not used in Apex code  I'm not sure if this self signed certificate was even used for this service or was just there (because SF creates one) The webservice is running on a Tomcat The certificate chain from the endpoint is valid (see pic) Admin of the tomcat server told me that he couln't find the 'old/expired' certificate anywhere.   So what would be the next steps here?   Create a new self-signed certificate and add it to the webservice in tomcat? How this can be checked besides SF callouts?   I'm happy about any ideas/recommendations.

I am trying to make a apex callout from salesforce to external system which is hosted inside in corporate firewall. Firewall sends the request to load-balancer which sends the request to appropriate web server.  I am getting below exception when trying this call from salesforce while I can getting correct response while making a callout from SOAP UI.  As per my client they don't provide any certificate. I am not sure what is happening and how to resolve the issue. As per log it seems like I need to install the certificates.  Any help would be appreciated.  Log -   [51]|System.HttpRequest[Endpoint=https://someURL/servlet/request, Method=POST] 07:51:12.268 (268755208)|CALLOUT_REQUEST|[51]|System.HttpRequest retrying request in response to handshake failure: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 07:51:12.423 (423017546)|EXCEPTION_THROWN|[51]|System.CalloutException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 07:51:12.423 (423110461)|SYSTEM_METHOD_EXIT|[51]|System.Http.send(ANY)


I'm new to Python and I want to make it from KLM, United, and ANA. How do I do that? Thanks  airlines = ['klm', 'united', 'ana'] for airline in airlines:     if(airline == 'klm' and airline == 'ana'):         print(airline.upper())     else:         print(airline.title())   I want it to show: KLM, United, ANA

When using IF statements in Python, you have to do the following to make the "cascade" work correctly.  if job == "mechanic" or job == "tech":         print "awesome" elif job == "tool" or job == "rock":         print "dolt"   Is there a way to make Python accept multiple values when checking for "equals to"? For example,  if job == "mechanic" or "tech":     print "awesome" elif job == "tool" or "rock":     print "dolt"


I created a post which was down-voted multiple times. If I delete or flag my post and it is deleted by a moderator, will I get my reputation back?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


Can the charge of $d$, $s$ and $b$ quarks be thought of as unitary charge? The electron is considered as an elementary particle but nevertheless has three times more charge than any of these three quarks. Is the ratio of electron and one of these quarks the whole number three or are there measurements that show that some decimals are not zero...e.g. 3,0000001245? If all the decimals are zero is this just a coincidence?

I have read these questions:                My question is different. We live in a world, where quarks can have a real fraction of the elementary charge (-1/3 or 2/3). I do understand that the experimental data fit the models and that Baryons are made up of three quarks, and that those quarks can have -1/3 or 2/3 the elementary charge. This way, the quarks can combine so that the Baryon will have an integer of the elementary charge. This way, the nucleus and the electron can be in a stable atomic state, where their electric charges cancel (attract) exactly. Any other way, the atom would not be stable.  So electron says: hey quarks, let's team up, let's make an atom.   Quarks: Hey, great idea, how much electric charge do you have? Let's call it e. OK so we will team up of three of us, so we will just take each of us -1/3 or 2/3 of your charge.   Electron says: Great!, I feel it, this way we can have a stable atom.  Quarks: Great!  I mean come on! I do understand the respect that the experimental data tells us that electrons and quarks are both elementary particles.   It seems that the quarks teamed up exactly so three of them in Baryons so they can cancel out (attract) exactly the electron's electric charge. Now I do understand that there could be Baryons made up of four quarks, and they could have then -1/4 and 3/4 charge of the electron's elementary charge. This would work too, and the neutron and proton would have the same way an integer of the electron's charge. So the atom would be stable.   We could do this with any integer number of quarks. But, come on, my question is, what if the quarks' charge could only be -1/sqrt(3) and 2/sqrt(3)? How many quarks would we then need to make up the nucleus - to make it match the electron's charge? Is it mathematically possible to have any kind of electric charge for the quark? We could simply put as many valence quarks in a Baryon to make a stable atom?  Question:   Is it a coincidence that quarks have -1/3 and 2/3 the electron's charge and there are three quarks in a Baryon? Could we have quarks with any kind of electric charge, like Sqrt(3)*elementary charge? Could we make a stable atom this way too? How many quarks would we put in this case into a Baryon to make atoms stable? I accept and respect that currently, electrons are elementary particles. Is it impossible as of today's view that both electrons and quarks are made up of the same something smaller (strings)?


Information I have the following crontab for the root user on Debian 10. root@debian:~# crontab -l # crontab comments curtailed for serverfault # # m h  dom mon dow   command  30 3 * * * shutdown -r now  If I run uptime and who -b I get the results of the last time I did a manual reboot (yesterday around 6pm). root@debian:~# uptime  11:03:19 up 16:29,  1 user,  load average: 0.00, 0.01, 0.00 root@debian:~# who -b          system boot  2020-12-26 18:34  I created the crontab around 7pm yesterday, so it was definitely in place prior to the target time. Question Is there a reason why this may not have worked? Can I debug this in any way?

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I'm having to move a number of sites from a LAMP stack to a WAMP one, provided by Zend, and I've hit a problem.  Our architecture is a number of loadbalanced web servers which have their own local webapp drives which are kept in sync with one server performing as the master copy.  There is then a separate DFS share provided to all web servers from our pillar san.  Usually a Drupal install under our LAMP cluster would have the main Drupal web app in a local HTDOCS mount for each server and the SITES directory within Drupal would then be symlinked out to the DFS or NFS share so that there is a common FILES and TMP directory.  The problem I'm having is that there seems to be no equivalent of symlinks on Win Server 2008, shortcuts have a .ink at the end making Apache see them as a distinct file.  So I've tried using an alias call in the vhost file like this;  <Location /drupal-626/sites>     Order deny, allow     Allow from all </Location>   Alias /drupal-626/sites "Z:\Path to alternate sites directory"  The root for this test is;  http://main-domain-url/drupal-626/   Unfortunately this isn't working so I'm wondering if any of you have a solution which would work?  Many thanks for taking the time to read this.

This is a  about  the use of a *AMPP's stack.    I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately.  I don't understand why they have suggested this, though, so can anyone tell me?  Is there a particular disadvantage of WAMP, or a particular advantage to installing all of them separately?  Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately?


I'm logged in to my VPS through an SSH tunnel and have Apache installed on the server. Apache appears healthy and running.  sudo systemctl status apache2  ● apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d        └─apache2-systemd.conf Active: active (running) since Thu 2018-02-08 20:20:51 UTC; 1 day 16h ago  Docs: man:systemd-sysv-generator(8) Process: 34352 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)  CGroup: /system.slice/apache2.service        ├─20407 /usr/sbin/apache2 -k start        ├─34370 /usr/sbin/apache2 -k start        └─34371 /usr/sbin/apache2 -k start   I'd like to do a simple test in the shell in order to visibly see the It Works! default message.  I run      /var/www/html$ http://6.5.4.2  only receive:  -bash: http://6.5.4.2: No such file or directory   Any ideas?  Thanks in advance.

How can I browse the Internet from the command line in Ubuntu?


I'd like to know whether the past tense "went to" or the present perfect "have been to" should be used in the following. Do different dialects behave differently here?  A: I went to Boston five times. / I have been to Boston five times.   B: Wow! I'm so envious.

I found this question and its answer on internet-  Q. Can I use "I have been to Hong Kong" instead of "I went to Hong Kong"? A. Not when you are specifically talking about your first trip abroad (in the past).  But I do not understand what it means. Could you please let me know the difference?


We have a public DNS provider, a private DNS master, and a private DNS slave. The public DNS provides the "example.com" zone, and all of it's subdomains. Our private DNS also provides the "example.com" zone, but some A records point to internal IPs on our LAN instead of public IPs. The annoying thing about this configuration is that we need to duplicate all of our CNAME and MX records on both DNS masters.  On the private DNS master, it would be really cool if I could configure a few known subdomains on our private network, and then fall back to the public master for any undefined records. AFAIK, this could be done with a wildcard NS record, but those aren't allowed.  Examples:   example.com   Web server is publicly accessible Some pages on the web server are only available to requests from the private LAN  cdn.example.com   Is a CNAME pointing to amazon cloudfront    I don't want to define the cdn.example.com zone on our private DNS server. (And we have many other records that are duplicated.) It would be great if the private DNS server could be a master/slave hybrid for a particular zone, so that it can override certain records, but fetch the rest from the public DNS server.  If bind9 can't do this, is there something else that can?  Or maybe I should do this with a shell script that pulls down the master DNS records, before appending or overriding with our custom records?

I have an internal network with a DNS server running BIND, connected to the internet through a single gateway. My domain "example.com" is managed by an external DNS provider. Some of the entries in that domain, say "host1.example.com" and "host2.example.com", as well as the top-level entry "example.com", point to the public IP address of the gateway.  I would like hosts located on the internal network to resolve "host1.example.com", "host2.example.com" and "example.com" to internal IP addresses instead of that of the gateway. Other hosts like "otherhost.example.com" should still be resolved by the external DNS provider.  I have succeeded in doing that for the host1 and host2 entries, by defining two single-entry zones in BIND for "host1.example.com" and "host2.example.com". However, if I add a zone for "example.com", all queries for that domain are resolved by my local DNS server, and e.g. querying "otherhost.example.com" results in an error.  Is it possible to configure BIND to override only some entries of a domain, and to resolve the rest recursively?


Trying to get title of a short story from the 40's or 50's where four people from a repressive earth society land on an alien planet, fall into a giant amoeba like alien, two of them fight the other two for freedom rather than return to earth. By Tenn? or Kuttner?

I think this story dates from the 1950s, plus or minus a decade - I read it about 30-35 years ago in a (then) fairly old story collection. It involves explorers on a planet falling into a gelatinous object that dissolves most of their bodies except for their brains and nervous systems. About four of them fall in to the same creature, and they discover that by thinking about it they can grow limbs and other body parts. At first they try to fight each other, by growing arms so they can hit each other's brains - and one of them realises that growing a skull would be a good idea - but later they agree to grow legs and move the creature around co-operatively. I would love to identify this story.


I'm trying to collect input on a revision to my town's mainstreet.  Is it possible to create a map where a visitor can click a point, and answer a few questions about that point?  (OK I was told that this question is too broad, so I am going to try to refine it)    Essentially, I want to be able to embed this map on the city's website, then invite community members to visit it and place markers at points on Main Street that they either like/dislike.  Ideally they would be able to drag a red or a green marker onto the map, which prompts one or two questions about the site, then move on.    I expect this could be done many different ways, but I really don't even know where to start looking for a solution.

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


I have several hundred songs to edit and I'm looking for a way to do it quickly. I found a way to edit the speed of the sounds from my terminal but I would like to change the pitch and the tune too, like the website can do :  Thank you in advance!

I want to change the frequency of an audio file. Meaning: the whole file should sound (say) one octave higher or lower. How to do it? Using ffmpeg or other command line open source tool would be preferable.


I have a problem with the export of open layers maps via the printcomposer. In the printcomposer window the font size of the map labels is easy readable, but if I export the map as pdf or jpg the label size decreases so that they are not readable any more. Decreasing the export resolution leads to a bigger font size in the export file, but also to a very poor quality of the pdf or jpg. What I need is a high resolution export with a readable font size.   Does anybody know how to solve this problem?

I'm having trouble with the OpenLayers Plugin exporting a map to a png or pdf file:  The output resolution of the exported osm-layer is very, very poor. Zooming to 100% in the png file shows big pixels. The rest of the map - so the output from shapes and fonts - is in the usual high resolution e.g. 300 or 600 dpi.  Is there any way to improve the osm-background-resolution?


$$\lim_{n\rightarrow \infty }\sum_{k=n}^{5n}\binom{k-1}{n-1}\left( \frac{1}{5} \right )^n\left( \frac{4}{5} \right )^{k-n}=\text{?}$$   I tried to use formulas $$\sum_{p=0}^k\binom{m+p}m = \binom{m+k+1}{m+1}$$ and $$n!= \sqrt{2\pi n}\left( \frac{n}{e} \right)^n$$ but without any success.

$\lim\limits_{n\to\infty}{\sum\limits_{k=n}^{5n}{k-1 \choose n-1}(\frac{1}{5})^{n}(\frac{4}{5})^{k-n}}$  It's clear that we can simplify the limit a little bit, after which we get:  $\lim\limits_{n\to\infty}{(\frac{1}{4})^{n}\sum\limits_{k=n}^{5n}{k-1 \choose n-1}(\frac{4}{5})^{k}}$  I could further simplify the expression, but I feel like there's a more elegant solution.   Give me a hint, please


Is there any technical reason for standard library (C or C++) implementations to, IMO abuse, underscores the way they do (=prefix everything with two undescore + add a trailing underscore to denote that a variable is a member variable)?  I get that /.*__.*/ and  /_[A-Z].*/ (<= regexes) are reserved-by-implementation. But isn't that supposed to refer to the implementation of the compiler rather than a (standard) library?  Couldn't a standard library behave like any other library in terms of choosing its internal names?

It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use m_foo. I've also seen myFoo occasionally.  C# (or possibly just .NET) seems to recommend using just an underscore, as in _foo. Is this allowed by the C++ standard?


I'm New to Blender. I found a model a few days ago, but when I realized that there wasn't an armature in this one, I made an armature for myself, but when I try to combine the model with Armatur, I encounter a problem called "Bone Heat Weighting: failed to find solution for one or more bones". I would be very grateful if you could help and explain what i should do.

Here is the .  Picture:   It's nothing special but I cant figure out why I get problems rigging this mesh. It would be important and a great Help! Thanks for reading and I know there are a lot of guides answering this question but I tried all and it doesn't seem to work.


How is it that always the same number of balls leave at the other end in Newton's cradle. I understand that the momentum needs to be conserved, but as momentum is defined as p=m*v couldn't you have a different number of balls move at a different speed instead of the same number of balls at the same speed?

Why, when one releases 2 balls in , two balls on the opposite side bounce out at approximately the same speed as the 1st pair, rather than one ball at higher speed, or 3 balls at lower speed?


My middle name on my passport is missing one letter, so different from my ticket.  Will this be an issue? Doroty vs Dorothy

I'm traveling from JED Saudi Arabia to Singapore by Saudi airlines. My last name doesn't match the passport. But all other details are same, e.g. passport no., DOB, etc.


I have a question about "simply php shopping Cart" from this blog .   When I'm using polish characters in database (in name of product), on the website i see just "?" instead this characters. How and Where Can I set coding on "UTF-8"?  In DB is set Utf8, document is save in UTF-8, in HTML is "meta charset="utf-8", on .htaccess i wrote "AddDefaultCharset utf-8 AddCharset utf-8 .html .css .js .php  DefaultLanguage pl-PL", I have no ideas what to do anymore  This is my dbcontrroller:  <?php class DBController {   private $host = "localhost"; private $user = "root"; private $password = ""; private $database = "tuliroza"; private $conn;    function __construct() {     $this->conn = $this->connectDB();     $mysqli->set_charset('utf8mb4');   }  function connectDB() {     $conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);     return $conn; }  function runQuery($query) {     $result = mysqli_query($this->conn,$query);     while($row=mysqli_fetch_assoc($result)) {         $resultset[] = $row;     }            if(!empty($resultset))         return $resultset; }  function numRows($query) {     $result  = mysqli_query($this->conn,$query);     $rowcount = mysqli_num_rows($result);     return $rowcount;    }  } ?>

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Okay, so, this question may have been asked before, but I really need help.  I ran sudo aptitudeto find a specific package that I wanted to delete. I pressed "Install/Remove Pkgs" and there was a section of packages that were to be removed because they were "no longer used". So, I did a noobish move and pressed "g" to remove these seemingly unused packages.  The menu closed and the terminal processes began, I watched. I started seeing programs that were obviously being used by me. So, I hurried up and exited terminal to stop the process.   A few moments later, two programs "Puddle tag" and the Software Center on my dock became grayed (they were open at the time) and disappeared. A handful of used/needed programs seemed to be uninstalled. And I am now at a lost of what to do. But I have a little hope.  I went to the history log and it has everything that was uninstalled [which was a crap load of things] thankfully. Is there a way to batch download/install all of these back onto my computer with this information? I'm assuming it's impossible, but is it possible? There is no way I can see myself doing all of this one at a time, it's way too much. Oh, and at the end of the log, there was an error   Error: Sub-process /usr/bin/dpkg returned an error code (1)

I used sudo apt-get remove python command and accidently removed a bunch of packages that were required. I logged in via command line and installed ubuntu-desktop again but there are other packages that are missing, and I'm looking for a way to easily reinstall those removed packages. Since there's the log at software-center I wanted to ask what the easiest way might be to roll back changes or extract the removed packages list from the software center...  note: I typed sudo apt-get install .... .... ... ... for about two dozen of those removed programs in that list, but when I pressed enter it didn't install any of them because some package names couldn't be found.  The programs were removed at the same date.


I am creating an A4 document and I need to insert a longtable in A3 into this document.  I have created a document for this:  \documentclass{book} \usepackage[margin=2cm,landscape,a3paper]{geometry} \usepackage[demo]{graphicx} \usepackage{multirow} \usepackage{longtable}   \begin{document}  \appendix \chapter{List Sandwaves}  \begin{center}     \begin{longtable}{| r | l | c | c | c | c | c | c | c | c | c| c|}         \caption{Sandwaves} \\              ..... \end{longtable}% \end{center}  \end{document}   And then the man document is:  \documentclass[12pt,a4paper,final]{book} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel}  \usepackage{graphicx} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage{pdfpages} \usepackage{lipsum}% just to generate filler text  \begin{document}  \clearpage \includepdf[pages=1-4,noautoscale,landscape,addtolist={1, table , Ondas de Arena, Todas}]{Tabla.pdf}  \end{document}   I have several problems with this:   The A3 document work fine but then when I compile the main document the page size is still A4 and no A3 as it should be. The Appendix does not show in the table of contents. The table does show in the list of tables, but not with the right number (it uses the number of the chapter before and not the appendix). The pages numbers do not correspond with the ones they should in the main     document it keeps the numbers of the A3 doc.   I am a beginner on LaTeX so I appreciate all the help.

I'm writing my thesis and I'd like to insert A3 pages within my A4 document. Is it possible to place figures with captions (as normal) on those A3?  I'm able to include full PDF pages which are A3 by \includepdf, however that way I can't have captions.  I get this error:  ! Package caption Error: No float type ! Package caption Error\caprion outside float


I Have a toshiba c55, trying to install ubuntu 13.04 alongside windows 8.  When I get to the point where I install (partition, run along side...) it only gives me the option to wipe out the drive and do a fresh install.  it says that it doesn't recognize any existing os install.   In the bios I only have the option to disable the secure boot option.  I don't have the option to disable fastboot.  any ideas?

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


Can someone explain to me if it is possible to create a new array from an array and a string? Example: I have this array: let array = ['value1', 'value2']  And this string: let testString = 'value3';  and I want to create an array from these two, which should look like this: ['value1', 'value2', 'value3']  How do I get this result? Is there a direct method for this or do I have to solve this with a loop?

How do I append an object (such as a string or number) to an array in JavaScript?


Just wondering if anyone successfully ran Frazer in Ubuntu 12.04 with WINE?  Frazer is an inventory management software for auto dealerships, it's extremely outdated, runs off of a server which provides a *.exe link to access it. (Everyone hates it, but it gets the job done.)  If anyone has done this, let me know if it's stable and usable on daily basis without any hiccups.   My ultimate goal is to install Ubuntu on all the systems at our dealership, so far LibreOffice & Gimp have successfully replaced MS Office & Photoshop for everyone here. Last thing I want to test is this Frazer.   Thanks in advance!

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


Let $H =\{ z = x +iy \in \mathbb C : y>0 \}$ and $D = \{ z \in \mathbb C : |z| <1\}$ be the open unit disc . Suppose $f$ is a mobius transformation which maps conformaly onto $D$. Suppose that $f(2i) = 0$. Pick each correct statement from below.          $1.$ $\ f$ has a simple  pole at  $z = -2i$.          $2.$ $\ f$ satisfies $f(i)\overline{f(-i)} = 1$          $3.$ $\ f$  has essential singularity at $z = -2i$          $4.$ $\ |f(2+2i)| = \frac{1}{\sqrt5}$       I know that any analytic function from $H$ onto $D$ is of the  form $f(z) = e^{i\theta}\frac{z-z_o}{z-\bar z_o}$, where $z_o$ is the zeroes of $f$, so $f(z) = e^{i\theta}\frac{z-2i}{z-\overline 2i}$,,  thus $f(z) = e^{i\theta}\frac{z-2i}{z+2i}$. Thus $f$ has a simple pole at  $z = -2i$. So 1) is true and 3) is false.  Now $f(i) =  \frac{-e^{i\theta}}{3}$ and $f(-i) =  -3e^{i\theta}$   Therefore $f$ satisfies $f(i)\overline{f(-i)} = 1$, so 2) is also true.  for 4) $|f(2 +2i)| = |\frac{2}{2 +4i}| = \frac{1}{\sqrt 5} $   I would be  thankful if someone check my solution.

Let $H=\{z=z+iy\in\mathbb{C}:y>0\}$ be the upper half plane and $D=\{z\in\mathbb{C}:|z|<1\}$ be the open unit disc. Suppose that $f$ is a Mobius transformation, which maps $H$ conformally onto $D.$ Suppose that $f(2i)=0.$ Pick the correct statement from below.  $1. f$ has a simple pole at $z=-2i.$  $2. f$ satisfy $f(i)\overline{f(-i)}=1.$  $3. f$ has an essential singularity at $z=-2i.$  $4. |f(2+2i)|=\frac{1}{\sqrt{5}}.$  I tried it as i consider the required transformation as $f(z)=\frac{z-2i}{z+2i}.$ So according to me correct options are $1$st, $2$nd and $4$th. But my method is very particular. Please suggest me most general way to handle this problem. Thanks a lot.


Whenever I add some text to search for users, the text field and the tabs on the right becomes unexpectedly wider.  I'm using Firefox 72 and Chrome 79 on Ubuntu 18.04.

There is an alignment issue occurred while searching the users in the .   The grid cells' height is increased while fetching the result. Once the result fetched, the grid's height become normal, so the issue is due to the searching indicator, when it is visible.  Screenshot for reference:        GIF for the same:


I want to make a simple addition of every span with the class .part-price, but when I do it comes out in infinite numbers.  This is my javascript (jquery) :  var total = 0;   $(".part-price").each(function() {     total += Number($(this).text());   });   $("#cart-total").text(total);   And this is my html :  0.86 1.00 Total: 0   At the moment I only have 2 value, one is 0.86, and the other is 1.00, it should come out as:  0.86 + 1.00 = 1.86  But with my code the result is:  0.86 + 1.00 = 1.8599999999999999

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


There was a  asked earlier today, so I thought of closing the question, but in the close popup already two other users voted to close as unclear.  Still I went ahead and closed it as duplicate question. Now it is showing:     marked as duplicate by davidism, Shadow, VR46   But I am the only one who closed it as duplicate. Is this the way it works or is something wrong here?

Even though a question may be closed by receiving 5 close votes, the votes do not necessarily need to agree.  I think this is a good behavior, but  (which it was) and found the question was closed as "not a real question".  This is unfortunate, while I'm happy to display my username and acknowledge that I voted to close, I'd like some additional transparency.  That is, if it was a 4-1 vote for "not a real question" vs "exact duplicate" I'd be interested in seeing that level of information.  The point is to be transparent about why the question was closed, and though 5 users may agree the question needs to be closed they may not agree why.  It's important to recognize all the reasons for closure, not just the majority reason.  I'd suggest displaying this information as something like:     closed on Jun 21 at 4:26 as:         not a real question by foo, bar, baz   exact duplicate by alice, bob      Once a question has been closed I'd argue it's more important to understand the rationale than it is to worry about an extra 2 lines of text. If the votes are 2,1,1,1 perhaps keep just 2 bullets, the first showing the majority vote, the second saying "for other reasons" as a summary of the change.  The point is to aggregate the summary by reason.


I am submitting a form using jquery like if a user clicks on the submit image it will submit the form. So in this case if the user will disable java script on the browser ,user can not submit the form.  So do I need server side validation for this form ? Because what i know is server side validation helpful when some one disable javascript on the browser , But as in my case the user can not submit the form after disabling the javascript, so why do i need server side validation.  If I am wrong, In which cases do i need server side validation?

Which is better to do client side or server side validation?  In our situation we are using    jQuery and MVC.   JSON data to pass between our View and Controller.     A lot of the validation I do is validating data as users enter it. For example I use the the keypress event to prevent letters in a text box, set a max number of characters and that a number is with in a range.   I guess the better question would be, Are there any benefits to doing server side validation over client side?    Awesome answers everyone. The website that we have is password protected and for a small user base(<50). If they are not running JavaScript we will send ninjas. But if we were designing a site for everyone one I'd agree to do validation on both sides.


I want to upgrade to the latest WSL and used the , i.e.   lxrun /uninstall /full   and then  lxrun /install   However, lsb_release -a tells me I still run the 14.04 release and not 16.04? I tried Powershell, Command Prompt with and without Admin privileges and rebooted a couple of times. Windows is all up-to-date.  Any hints?

Is there any possibility to update LXSS on Windows from 14.04 to 16.04?  sudo do-release-upgrade   does not work.


I recently saw someone use '200.1.2.0/18.' This doesn't make any sense to me. This is a Class C address with a subnet mask of /18. I thought the subnet mask for a Class C had to be at least /24. How exactly does this work?

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


suppose that I have the following undirected graph   with the following adjacency matrix showing if there is an edge between the nodes: \begin{bmatrix}     0 & 1 & 0 & 0 & 0 \\     1 & 0 & 0 & 1 & 0\\     0 & 0 & 0 & 0 & 1\\     0 & 1 & 0 & 0 & 0\\     0 & 0 & 1 & 0 & 0 \end{bmatrix}  Now from the above matrix, I want to find the following matrix which shows if there is a path between each node:  \begin{bmatrix}     0 & 1 & 0 & 1 & 0 \\     1 & 0 & 0 & 1 & 0\\     0 & 0 & 0 & 0 & 1\\     1 & 1 & 0 & 0 & 0\\     0 & 0 & 1 & 0 & 0 \end{bmatrix}  We can find the second matrix by checking each node one by one (using transitivity rule)  My question is if there is an algorithm for finding the second matrix faster. The matrix I am working with is a huge matrix and I am looking for a good way to implement an algorithm to find the second matrix. In other words I am looking for connected components of the graph. I searched and found that one way is to use . For example, for the above example Laplacian matrix would be \begin{bmatrix}     1 & -1 & 0 & 0 & 0 \\     -1 & 2 & 0 & -1 & 0\\     0 & 0 & 1 & 0 & -1\\     0 & -1 & 0 & 1 & 0\\     0 & 0 & -1 & 0 & 1 \end{bmatrix}  Now using this matrix how can I find the connected components? Is there a fastest way to find the connected components?

If I have an adjacency matrix for a graph, can I do a series of matrix operations on the adjacency matrix to find the connected components of the graph?


It's a short story I read a long time ago, so I don't have the slightest idea who is the author. In it, scientists built a machine that can solve problems by feeding it, as far as I remember, specially coded data (or maybe not, but some cards were used). The machine was programmed to keep the humans from harm, and scientists wanted to solve the problem of traveling to distant places in space, which requires really high speed or some such thing, that makes it impossible for the machine to process this question (because it would harm humans). Scientists find some trick and the device is able to give an answer, but when an actual human is using the suggested technology, he appears in some kind of, I don't know, hell, though he was alive again after the end of the travel.

My memory about this story is rather short. I only remember the following points :-  The story was in a collection of stories.  In this, a robot/AI of some sort traps 2 people on a spaceship and sends them off.  On the ship, they realise that they are travelling in space unaided and try to scour the ship for any life-saving-essentials they can find.  The AI admits to some other people what it has done and assures them that the 2 men have all the essentials that they need.  The 2 men suddenly find a sort of cabinet that they claimed wasn't there before. In that, they find beans and milk.  The AI/robot was named "The Brain".


While it's great to have the ability to clear all session cookies for all devices, I'd like the ability to log out on one computer only, and not come home to have to relogin on all of my devices. It can really be a pain.   Is there a technical reason we don't have this, or why don't we?

I am always logged into StackOverflow and a few other Stack Exchange sites on my computer and iPhone. However, when I go to school, I may need to login on the school's computers to do something.  After completing what I needed to do, I will logout. The message on the logout page states that it is a global logout. At first, I thought this meant that it would just log out all your Stack Exchange profiles from the computer. Unbeknownst to me, it actually logs you out everywhere, even on my home computer and iPhone!  Can we change this or clarify the message?


I have written a simple java code using sockets to get input from a local txt file and save it by creating another txt file in my storage elsewhere. I am using my client program to send the data and the server program to receive the data and save it. I run my server program before my client program and after running that client program, I get my output in the console that the connection has been established (I have written that in my code while trying to debug it) but, after the connection established message, I am getting The following error in my Server program: Exception in thread "main" java.net.SocketException: Connection reset at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323) at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350) at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803) at java.base/java.net.Socket$SocketInputStream.read(Socket.java:982) at Assignment_2.DA_FileServer.main(DA_FileServer.java:16)  Following is my Client program code:      public class DA_FileClient {         public static void main(String args[]) throws Exception{             Socket cs = new Socket("localhost",5050);              byte[] b = new byte[12345];             FileInputStream fis = new FileInputStream("D:\\Coding Practice\\Source.txt");             fis.read(b,0,b.length);             OutputStream os = cs.getOutputStream();         }     }   and this is my Server program:      public class DA_FileServer {         public static void main(String args[]) throws Exception{             ServerSocket ss = new ServerSocket(5050);             Socket cs = ss.accept();             System.out.println("Connection Established!");              byte[] b = new byte[12345];             InputStream is = cs.getInputStream();             FileOutputStream fos = new FileOutputStream("C:\\Users\\FoxSinOfGreed\\Desktop\\Destination.txt");             is.read(b,0,b.length);             fos.write(b,0,b.length);         }     }     ```  P.S. I am using IntelliJ Idea Community Edition

I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation this suggests that the client part of the connection closed the connection. In this scenario, I am the server.  I have access to the client log files and it is not closing the connection, and in fact its log files suggest I am closing the connection. So does anybody have an idea why this is happening? What else to check for? Does this arise when there are local resources that are perhaps reaching thresholds?    I do note that I have the following line:  socket.setSoTimeout(10000);   just prior to the readInt(). There is a reason for this (long story), but just curious, are there circumstances under which this might lead to the indicated error? I have the server running in my IDE, and I happened to leave my IDE stuck on a breakpoint, and I then noticed the exact same errors begin appearing in my own logs in my IDE.  Anyway, just mentioning it, hopefully not a red herring. :-(


We are using rsync to copy files from one location to another location on a different host. We want to exclude a directory from the source location so that files from this directory are not copied . The files inside this directory are actually session data and this data were removed once the session completes . So we are excluding this directory.   For this we modified our rsync to exclude the directory as follows:  rsync -av --exclude '/share/web/moodle/moodledata/sessions/' --rsync-path "sudo rsync" /share/ 172.31.X.X:/share/ &>/home/fsync/rsyncjob/output."$datetime";   But I can see that the directory is not getting excluded as from the log file can see it is trying to copy the log file:  rsync: send_files failed to open "/share/web/moodle/moodledata/sessions/sess_bnktcuvnv965dj4qtv1438o651": Permission denied (13) rsync: send_files failed to open "/share/web/moodle/moodledata/sessions/sess_d2vvo9ip79jc13qafgq5of50s2": Permission denied (13)   Please suggest fix to exclude the directory

I am running Fedora 17 64-bit and the rsync --exclude=/home/ben/<dir> is not working as expected.  I am trying to rsync my home directory to a thumb drive, but I want to exclude certainly directories that hold cache files and build files.  This is the command I'm using:  rsync --exclude=/home/ben/build/ --exclude=/home/ben/.ccache -arv /home/ben home-ben/   However, content from the ~/build and ~/.ccache is being copied by rsync.  What am I doing wrong?


I'm reading "Contemporary Abstract Algebra (Eighth Edition)," by Gallian.  This is Exercise 7.38 ibid. Answers that use only the tools available in the textbook so far will be preferred.     Prove that if $G$ is a finite group, then the index of $Z(G)$ cannot be prime.   Thoughts:  What I had in mind first of all was to try the contrapositive:     Let $G$ be a group. Then if $[G:Z(G)]=p$ for some prime $p$, then $G$ is infinite.   No progress worth sharing was made after a short while here.  Next, I considered when $G=Z(G)$; that is, when $G$ is abelian; with $G$ finite. Then $[G:Z(G)]=1$ is not prime. This does not seem helpful.  The section of the textbook ibid. this exercise is from is on "Cosets and Lagrange's Theorem". This gives me some indication that an argument at the "coset level/definition" of the index of a group would be most appropriate.  None of the previous exercises leap out at me as helpful.  Please help :)

The question is to prove index of $Z(G)$ in $G$ is not a prime number.    We know that $|G:Z(G)|=|G:C_G (x)||C_G (x):Z(G)|$ where $C_G (x)$ means centralizer of $x \in G$  I want to mention that we do not want to use $G⁄Z(G)$ theorem.   We may assume that $|G:Z(G)|=p$ where $p$ is a prime.


I am currently studying Geometry, and am having trouble parametrizing a Torus. The Torus is defined as being the surface of revolution by rotating the circle: $$y^2+(z-a)^2=r^2, \>\> x=0$$About the $y$-axis. We assume that $a>r>0$.  Now, I believe the parametrization for the circle is given by: $$\phi(r,\theta)=(0, r\cos(\theta), r\sin(\theta)-a)$$ How would the Torus be parametrized as I rotate it about the $y$-axis?

For a calculus question  I need to parameterise the surface of the torus generated by rotating the circle given by $(x-b)^2+z^2=a^2$ around the $z$-axis (with $0<a<b$). I've had a go at this, and have come up with $$\vec{r}(\theta,\phi)=((a\cos\theta+b)\cos\phi, (a\cos\theta+b)\sin\phi, a\sin\theta), ~~ \theta,\phi\in [0,2\pi].$$  I haven't done anything like this for a while now, so I've kind of forgotten how it all goes. So I've tried plotting this on WolframAlpha to see if it's correct, but I can't get it to actually plot a surface defined in this way. I have a copy of Matlab, is there any way I could plot this surface on there to see if it's correct? Basically how can I check if I'm right or not? Failing that, could somebody please just point out if I'm wrong?


I can obtain the coordinate of a mesh vertex with python via  wco = mesh.vertices[mesh_vert_idx].co   Further, it is possible to convert this coordinate system to the camera system with  cco = bpy_extras.object_utils.world_to_camera_view(bpy.context.scene, bpy.data.objects['Camera'], wco)   But I am interested in the 2D position of the vertex in the image captured by the camera 'Camera'. In other words, is there a python method the projects the 3D point of the model to the 2D point in the image?

I have a simple mesh of a cube.  I would like to know what are the coordinates of each vertex in the rendered image (i.e. for each 3d vertex I'd like to know it's pixel coordinates).  Is there a way to do this?  Clarification:  I'm experimenting with a pose estimation algorithm (i.e. finding out the 3d pose of the object) from a (set of) 2d image(s).  Instead of taking an image of a real object with a real camera I synthetically render the image of a cube using blender.  In this way I know the pose of the object and the intrinsics of the camera, so I can easily validate the results of the pose estimation algorithm. Pose estimation algorithms usually require to provide them with world points on the object and the corresponding image points.  So what I'm looking for is a way to produce a dump of correspondences of the 3d point <--> image point as a byproduct of the rendering procedure. Thanks, Alex


I'm getting an annoying NullReferenceException error. Can anyone help? This is the function, and below you can see how it is called: Error message:  NullReferenceException: Object reference not set to an instance of an object BotController.Start () (at Assets/Scripts/BotController.cs:64)  void Start() {        InvokeRepeating("RandomMove", 0f, waitTime); }  function:     void RandomMove()     {         float behaviour = Random.Range(0,3);         switch(behaviour)         {             //0: move left, 1: stop, 2: move right //             case 0: rb.velocity = new Vector2(-moveSpeed, rb.velocity.y);             movingRight = false;             break;             case 1: rb.velocity = new Vector2(0f, 0f);             break;             case 2: rb.velocity = new Vector2(moveSpeed, rb.velocity.y);             movingRight = true;             break;         }         return;     }  the console shows the error on this line:  case 0: rb.velocity = new Vector2(-moveSpeed, rb.velocity.y);  Edit: I've just changed the function to this: void RandomMove()     {         float behaviour = Random.Range(0,3);         switch(behaviour)         {             //0: move left, 1: stop, 2: move right //             case 0: movingRight = false;             break;             case 1: rb.velocity = new Vector2(0f, 0f);             break;             case 2: movingRight = true;             break;         }         return;     }  and I've put an initial speed inside the Start() function like this:         rb.velocity = new Vector2(moveSpeed, rb.velocity.y);  Now it shows the error exactly on this line. I think something's up with either Rigidbody or the vectors. I'm using the same rigidbody inside the same script with no issues.

Since many users are facing the NullReferenceException: Object reference not set to an instance of an object error in Unity, I thought that it would be a good idea to gather from multiple source some explanation and ways to fix this error.  Symptoms I am getting the error below appearing in my console, what does it mean and how do I fix it?  NullReferenceException: Object reference not set to an instance of an object


I applied for my family to visit the UK and they were refused because she stated in the form she is going for 10 days and she didnt provide her account so no prove of her daily circumstances and also no prove of how i support her and also they saw large flows of money in both account i gave and no source of the income despite providing my company's details. What should i do?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


My daughter, who resides in the US, is about to fly to the UK for a brief trip. She holds both US and UK passports and citizenships, and has a NEXUS card.  Now, just before departure, we have realized that her US passport is inaccessible (it is with a distant relative).   Can she instead travel on her UK passport, then on her return successfully enter the US by presenting the UK passport, her US birth certificate and her NEXUS card? (I'm guessing they would be pretty unhappy, but not prevent her entering since it's clear she's a citizen.)  Assuming they will let her in, will she have any trouble leaving the country in the first place - given that the airline has her US passport number attached to her ticket?

I am a dual citizen. I have both a US passport and a non-US passport. I live in the US. My US passport is currently being processed for renewal. I am unsure whether I will receive my passport in time for a trip that I have scheduled. Could I use my non-US passport to leave the US and return? I have never entered the US with my non-US passport. There is no immigration leaving the US but I still need to scan my passport for ticketing. Will the airline refuse me a ticket? I know that in this situation returning with a non-US passport can be problematic as well, but will I be able to leave at all? Note that I am traveling to a country which neither of my passports are from.


Suppose we have two sequences ${a_n}$ and ${b_n}$, which satisfies $ a_n \le b_n$ for $n=1,2,3,\ldots$. Do we have the following inequalities to be true?  $$\limsup_{n \to \infty} a_n \le \limsup_{n \to \infty} b_n $$ $$ \liminf_{n \to \infty} a_n \le \liminf_{n \to \infty} b_n$$  In the case when  $a_n$ and $b_n$ has a limit, the equations above are clearly true, since $a_n \le b_n $ implies $\lim_{n \to \infty} a_n \le \lim_{n \to \infty} b_n $. I'm just wondering in a general case when the limits of the two sequences don't necessarily exist, are these two inequalities still true?

Can anyone prove this question? I tried but I didn't get any I idea, so I hope someone can solve it.     Let $X_n\leq Y_n$ for each $n\in \Bbb N$. Show that $\liminf X_n \leq \liminf Y_n$ and $\limsup X_n \leq \limsup Y_n$.   Please prove this question - thanks.  The definition I have:     Let $X_n$ be a sequence in real number and let $$E=\{x\in \Bbb R^\sharp:(X_{n_k}) \rightarrow x \text{ for some subsequence }(X_{n_k})\text{ of }(X_n)\}$$ for all $n \in \Bbb N$ and $k$ from $1$ to $\infty$. Then by definition $\lim\sup X_n = \sup E$ and $\lim\inf X_n = \inf E$.


Find all rational solutions of the equation: $$\frac{x}{x^2+4} + \frac{y}{y^2+4} = \frac{z}{z^2+4}$$ else show there are no rational solutions. Or, generalizing, by replacing 4 with $${w^2},  w>0$$ in the above $$\frac{x}{x^2+w^2} + \frac{y}{y^2+w^2} = \frac{z}{z^2+w^2}$$ Yields a homogeneous Diophantine equation of 4 variables and degree 5. So alternatively, show: $${x}({y^2+w^2})({z^2+w^2}) + ({x^2+w^2}){y}({z^2+w^2}) - ({x^2+w^2})({x^2+w^2}){z} = 0$$ Has no solution in integers.

This question concerns the equation $$\frac{a}{a^2+1} + \frac{b}{b^2+1} = \frac{c}{c^2+1}$$ and the possibility of rational number solutions with $abc \ne 0$.  In comments arising from:  It is mentioned that this equation has an infinite number of such solutions.  How can we determine that there are an infinite number of such solutions?  And is there a way to generate these solutions (or at least find a few of them)?


I'm running Xubuntu 14.04 LTS and for some reason the default desktop icons (Trash, File System, and Home) have disappeared? Anyone have any ideas where they went and how to get them back?

Even though I have the default icons set to display in Settings, they do not display. See the image below. Ideas????


The part I remember is where the man is driving and rolls down his car window and everything outside his car is grey. It's like a fog, but inside the car things look normal through the windows. God is the artist and he's erasing his work, this guy is supposed to be saved by being in his car with the windows up.

I read a collection of Sci-Fi short stories back in the 1970's or early 80's that had one about a couple in love who kept losing each other. The book was my dad's so the story itself could be much older than that. I am very fuzzy on the details as I was young when I read it and it was so long ago. I believe the woman/girlfriend was "taken" (by some bad guy aliens??) while she was sleeping. I think it involved time travel and the man had to search through time to find her. After he found her, when he was asleep one time, he somehow was then "taken" and I think transported through time and had to fight his way back to her again. He may have been some sort of police officer. I just remember in the end, at night when they went to bed, the couple always wore handcuffs so they were never separated when they went to sleep ever again. Does this ring a bell with anyone?  (There is a possibility it is in a short story collection that also contained " The Twonky " by Lewis Padgett (1942), as I remember reading that story around the same time)


I have a myfile which contains lines like #!/usr/bin/env python3 print("Hello world") names = ('${(j:', ':)ZSH_VAR[@]}', )  I would like to pre-process this file with the environment variables in my loaded shell (zsh in my case, but a generic bash solution would also work nicely). How can I do the equivalent of $ declare -ga ZSH_VAR=( 1 2 3 ) $ preprocess < myfile  Such that the output is #!/usr/bin/env python3 print("Hello world") bar=('1', '2', '3', )

I want to pipe the output of a "template" file into MySQL, the file having variables like ${dbName} interspersed. What is the command line utility to replace these instances and dump the output to standard output?


My question is simple enough1, depending on your generosity: the steps posed in the above linked thread are straightforward, except for one small point... I can't find the Service receives no input step in my MacOS Mojave install. I've opened Automator, but I just don't see where that option is. Actually, I can see it in the Quick Option screen, but not in the Workflow screen.   Thus, I think this is why I'm also unable to follow the below step:     Assign a shortcut, in System Preferences > Keyboard > Shortcuts > Services:  Screen Shot to Clipboard and File       ⇧⌘5    That is, I don't see anywhere in the Shortcuts window to edit an existing 'Services: Screen Shot to Clipboard and File' shortcut or add a new one with the same name.   Has something changed about Automator since the otherwise awesome answer to the above linked question was first posted?     1 I would've asked this in  but it's locked and not only am I new to Mac, I'm also new to StackExchange.

Within OS X 10.11.6, the  Cmd ⌘   Shift ⇧   4  key combination saves a screenshot to the desktop by default.  Is there a way to automatically copy the file to the clipboard (in addition to saving the file), so that the screenshot can be pasted into a document?  Maybe there is some clever why to tee and pipe the image to the clipboard?  The intent is to:    save screenshot to a file and  copy screenshot to the clipboard    with a single command.   Examples are always appreciated.


I am trying this particular question and was unable to solve it.  Let $\Omega$ be a region and  $ f,g \in H(\Omega)$. If |f| +|g| attains its maximum on $\Omega$ at some point a on $\Omega$ then prove that f and g are both constants.  Well, the statement implies that |f(a)|+|g(a)| $\geq$ |f(z)+|g(z)| for all z in $\Omega$. It seems that maximum principle can be used but that is just an intution. Except this I have no thoughts on this problem. Can you please tell how should I approach this question?

While studying for an exam in complex analysis, I came across this problem. Unfortunately I was not able to solve it. Any help would be greatly appreciated.  Let $U ⊂ \mathbb{C}$ be a domain and $f_1, . . . , f_n : U \rightarrow \mathbb{C}$ holomorphic functions, such that $\sum_{k=1}^n \left| f_k(z) \right|$ is constant on $U$. Show that $f_1, . . . , f_n$ are constant.


I lack intuition when it comes to some conformal mappings and I'm presently looking for a conformal map taking the inside of a disk, let's say the unit disk and sending it to the inside of an ellipse.  I know that a Joukowski transformation: $$z \rightarrow z + \frac{\eta}{z}$$ would take a circles and its exterior to an ellipse and its exterior but it is ill defined in its inside (singular in zero here). So it cannot be an inverse Joulkowski transform.  I heard that may be some elliptic functions could do the job. Is it the direction I should look into?

I am looking to a formula for the conformal map from the unit disc in the interior of an ellipse centered in $0$ and with semiaxes $a,b>0$. I know that depends on elliptic function, but I didn't find any references.  Thanks in advance for any formula or reference.


I was trying to implement an example from the following answer  and encountered some strange behaviour. Here is an example:  \begin{figure}[h]     \centering     \begin{tikzpicture}[radius=0.5cm]         \selectcolormodel{gray}         \fill [red] (0,0) circle;         \fill [green] (1,0) circle;         \fill [blue] (2,0) circle;          \draw [->,-latex,thick] (-0.5,-1) -- (1,-1) node[midway,fill=red,scale=0.8]{$hello$};     \end{tikzpicture}     \caption[.]{.} \label{Fig::Parratt3} \end{figure}   While the colors in the \fill commands are all translated to grayscale as required the label of the \draw command remains colored. How can I get this in grayscale too?  Background: I'd like to check if the grayscale version of my picture is still legible, i.e. if the colors can be distinguished.

Today I found something weird. When I use \selectcolormodel{} in a TikZ drawing the model is only applied to \fill and not to \draw[fill=]. Does anyone know why?  \documentclass{article}  %\usepackage[gray]{xcolor} % all draws or fills become gray \usepackage{xcolor} \usepackage{tikz}  \begin{document}  \begin{tikzpicture}      \draw [fill=cyan] (0,0) rectangle (1,1);     \fill [cyan] (2,0) rectangle (3,1);  \end{tikzpicture}  \selectcolormodel{gray}  \begin{tikzpicture}      \draw [fill=cyan] (0,0) rectangle (1,1); % expected this one to change     \fill [cyan] (2,0) rectangle (3,1);  \end{tikzpicture}  \end{document}   And the result is the one below.


A lot of things have tooltips that appear once you let the mouse rest over the trigger area for some time. On my system the delay between when I stopped moving the mouse and tooltip popup is extremely large: about 3 seconds. How can I reduce this? I tried to google and search system properties but found nothing. The corresponding setting on Windows OS is found in registry: HKEY_CURRENT_USER\Control Panel\Mouse: MouseHoverTime

When I hover some icon in Xcode I have to wait quite long for tooltip. How to reduce delay?


What is the reason that like charges repel and unlike changes attract each other ? is there something acting in atomic level? Why do charges that are like that donot attract each other ?

I know plus pushes another plus away, but why, really, do they do that? On the other hand, molecules of the same type are attracted to each other. I find that weird.  I do know some stuff about four universal forces. But why in general the general "rule" is that opposite charges pull each other?   Yes, I do realize this could be connected to very basic stuff that science is still trying to figure out, and can be traced to the Higgs,  but still, there must be something to tell.