Transit visa in Hong kong
Transit Visa in Hong Kong for 15 hour layover between India and USA?
How to understand the memory usage and load average in linux server I am using a linux server which has 128GB of memory and 24 cores. I use top to see how much it is used. Its output is pasted at the end of the post. Here are two questions:  (1) I see that each of the running processes occupies a very small percentage of memory (%MEM no more than 0.2%, and most just 0.0%), but how the total memory is almost used as in the fourth line of output ("Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers")? The sum of used percentage of memory over all processes seems unlikely to achieve almost 100%, doesn't it?  (2) how to understand the load average on the first line ("load average: 14.04, 14.02, 14.00")?   Thanks and regards!  Edit:  Thanks!  I also really like to hear some rough numbers based on used percentage of memory to determine if a server is heavily loaded, since I once became the one who cramed the server without understanding the current load.  Is swap regarded as almost the same as memory? For example, when memory and swap are almost of same size, if the memory is almost running out but the swap is still largely free, may I just view it as if the used percentage of memory + swap is still not high and run other new processes?  How would you consider together CPU or memory (or memory + swap) usage? Do you become worried if either of them reaches too high or both?  Output of top：  $ top    top - 12:45:33 up 19 days, 23:11, 18 users,  load average: 14.04, 14.02, 14.00 Tasks: 484 total,  12 running, 472 sleeping,   0 stopped,   0 zombie Cpu(s): 36.7%us, 19.7%sy,  0.0%ni, 43.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers Swap: 63111312k total,   500556k used, 62610756k free, 124437752k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND  6529 sanchez   18  -2 1075m 219m  13m S  100  0.2  13760:23 MATLAB 13210 timothy   18  -2 48336  37m 1216 R  100  0.0   3:56.75 absurdity 13888 timothy   18  -2 48336  37m 1204 R  100  0.0   2:04.89 absurdity 14542 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.34 absurdity 14544 timothy   18  -2  2888 2076  400 R  100  0.0   1:06.14 gatherData  6183 sanchez   18  -2 1133m 195m  13m S  100  0.2  13676:04 MATLAB  6795 sanchez   18  -2 1079m 210m  13m S  100  0.2  13734:26 MATLAB 10178 timothy   18  -2 48336  37m 1204 R  100  0.0  11:33.93 absurdity  12438 timothy   18  -2 48336  37m 1216 R  100  0.0   5:38.17 absurdity 13661 timothy   18  -2 48336  37m 1216 R  100  0.0   2:44.13 absurdity 14098 timothy   18  -2 48336  37m 1204 R  100  0.0   1:58.31 absurdity 14335 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.93 absurdity 14765 timothy   18  -2 48336  37m 1196 R   99  0.0   0:32.57 absurdity 13445 timothy   18  -2 48336  37m 1216 R   99  0.0   3:01.37 absurdity 28990 root      20   0     0    0    0 S    2  0.0  65:50.21 pdflush 12141 tim       18  -2 19380 1660 1024 R    1  0.0   0:04.04 top  1240 root      15  -5     0    0    0 S    0  0.0  16:07.11 kjournald  9019 root      20   0  296m 4460 2616 S    0  0.0  82:19.51 kdm_greet     1 root      20   0  4028  728  592 S    0  0.0   0:03.11 init     2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd     3 root      RT  -5     0    0    0 S    0  0.0   0:01.01 migration/0     4 root      15  -5     0    0    0 S    0  0.0   0:08.13 ksoftirqd/0     5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0     6 root      RT  -5     0    0    0 S    0  0.0  17:27.31 migration/1     7 root      15  -5     0    0    0 S    0  0.0   0:01.21 ksoftirqd/1     8 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1     9 root      RT  -5     0    0    0 S    0  0.0  10:02.56 migration/2    10 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/2    11 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/2    12 root      RT  -5     0    0    0 S    0  0.0   4:29.53 migration/3    13 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/3 What happens to water level when ice XII melts? There exists this famous idea that if all floating icebergs melt, water level will stay the same (because the water replaced by ice is the volume of the melted ice). Now,   Is this always so, if you allow more exotic forms of ice (take e.g. ice XII with density 1.29) ? Is this always so on/in earth ?   EDIT:  I was looking a possibility that you would have water as a liquid that contains pieces of water as a solid. No land is assumed to exist here. "Ice" is always floating or sunken(if possible).  To reformulate, can Ice be sunken in water in any circumstance (pressure, temperature)?  EDIT 2:  Wikipedia: "Ice VII has a density of about 1.65 g cm-3 (at 2.5 GPa and 25°C)".   And water as an incompressible liquid has a density of 1 g cm-3. This means that ice VII is at the bottom of the "lake" and will expand when it melts. Is this true? And are there environments in earth where this (or similar) can happen? We know $$i^2=-1 $$then why does this happen? $$ i^2 = \sqrt{-1}\times\sqrt{-1} $$ $$ =\sqrt{-1\times-1} $$ $$ =\sqrt{1} $$ $$ = 1 $$  EDIT: I see this has been dealt with before but at least with  I'm not making the fundamental mistake of assuming an incorrect definition of $i^2$. No internet after upgrade to 17.10 Clusering based on categorical variables? I am working on a project and currently experimenting cluster analysis. The dataset is mainly categorical variables and discrete numbers. Please pardon my poor programming skills as I am not very familiar with MathJax, but I will try to summarize the data set in words in the following three examples.   imagine column 1 is participants names of course, from column2 - 5, each column's value range from 1 (least important) - 5 (most important). so in this case, column 2-8 only have discrete data.  column 6 for example, since this is a multiple choice question. row 1 chose "nice" as an answer, however, row 2 chose "poor". In this case, we have one column that contains multiple categorical answers. for column 7-9, this is another type of multiple choice questions. However this time, each column represents only one answer. column 7 only allows string values "true", column 8 only allows string "somewhat". So in this case, we have multiple columns that represent multiple answers of the same question.    Any ideas how to solve this? Thankful to any input!   A2       A3       A4       A5       A6       A7         A8         A9 1        4        5        4        nice     true       somewhate  false 2        4        3        1        poor     true                  false 1        5        2        1        nice                somewhate     3        2        1        5        nice     true                  false How to fix a stripped pedal crank The threads on my bike's pedal crank just became fully stripped and the pedal fell off, though the pedal itself is fine. Is there any way I can fix this without fully replacing the pedal crank? Are there fewer positive integers than all integers? In our 6th grade math class we got introduced to the concept of integers. With all the talk about positive and negative, it got me wondering. Is the amount of elements in $\mathbb{Z^+}$ less than the amount of elements in $\mathbb{Z}$?  Here is how I thought of it. If we have $\mathbb{Z^+}$ and add one element to the "back" of it ($\mathbb{Z}^{\geq-1}$) there are certainly more elements in that new set, so there must be more elements in $\mathbb{Z}$ than in $\mathbb{Z}^+$ but on the other side if we try to express the amount of elements in them "numerically" (In a loose sense of the word) they both have $\infty$ elements.    So what is the right answer? Is there even one?  (Please note I am a bit of a layman when it comes to mathematics)  Edit: About the possible duplicate, I am not looking for a bijection between the two sets, I am looking for if they even have the same number of elements and why a bijection shows that they do/don't After T-2, why not send back another T-800? Where has the trailing newline char gone from my command substitution? Alright, I'm toying around with converting a PIL image object back and forth to a numpy array so I can do some faster pixel by pixel transformations than PIL's PixelAccess object would allow.  I've figured out how to place the pixel information in a useful 3D numpy array by way of:  pic = Image.open("foo.jpg") pix = numpy.array(pic.getdata()).reshape(pic.size[0], pic.size[1], 3)   But I can't seem to figure out how to load it back into the PIL object after I've done all my awesome transforms.  I'm aware of the putdata() method, but can't quite seem to get it to behave. I'm self-studying Guillemin and Pollack, but I'm stuck on Problem 3 of section 2. It says that if $V$ is a vector subspace of $\mathbb{R}^N$, then $T_x(V)=V$ if $x\in V$.  If $x\in V$, then since $V$ is a manifold, there is a local parametrization $\phi: U\to V$ where $U$ is open in $\mathbb{R}^k$. Without loss of generality, we can require $\phi(0)=x$. Then $T_x(V)$ is defined to be the image of $d\phi_0$ on $\mathbb{R}^k$.   An arbitrary element of $T_x(V)$ looks like $$ d\phi_0(v)=\lim_{t\to 0}\frac{\phi(0+tv)-\phi(0)}{t}=\lim_{t\to 0}\frac{\phi(tv)-x}{t} $$  but this doesn't seem very useful to show $T_x(V)=V$. What is the right approach? Prove $\lim_{n\to\infty} \frac{a_n}{n}$ exists for positive sequence where $a_{n+m} \leq a_n + a_m$ Let $\{a_n\}_{n=1}^\infty$ be a positive sequence of real numbers such that $a_{n+m} \leq a_n + a_m.$  Prove that $\lim_{n\to\infty} \frac{a_n}{n}$ exists by showing that $\lim_{n\to\infty} \frac{a_n}{n} = \inf_{n \geq 1} \frac{a_n}{n}.$   A similar question has been posted previously, see  , and I have found that this is the general result of "Fekete's Subadditive Lemma" for sequences, but I am unhappy with the few proofs I've seen.  Perhaps the clearest one I have found is  , but this seems a bit tricky for what is expected on this qualifier question.  We are given a hint "treat $\liminf$ and $\limsup$ separately".  Does anyone know of a more direct way to show that this limit exists? jQuery - auto size text input (not textarea!) Stack Exchange doesn't know when I last checked my global inbox? I am subscribed to get my unread inbox items every 3 hours. It's working well, but today I noticed something quite weird:    For sake of future search, adding the text:  The following item was added to your Stack Exchange global inbox since you last checked it on 2015-05-18  But that's just not true, I checked my inbox yesterday. Not 7 months ago. Can it be fixed, or did I miss something? Even going to my  did not &quot;fix&quot; this, got today another email with the same date as yesterday. The equals() method in Java works unexpectedly on Long data type Asking users to accept answer when they comment that it answers their question I've had a couple of answers today where the OP indicated via a comment that I solved their problem, but the question wasn't upvoted or accepted.  In both cases the person probably wasn't able to upvote since they were new, but they could have accepted my answer. I felt a little guilty asking them to accept the answer, but since it solved their problem I felt that it would help others who stumbled on the question trying to solve their own problem to know that my solution really was the answer. Is asking the OP to accept your answer when they've said that it solved their problem a reasonable thing to do or does that feel like nagging for reputation? Convert python datetime to epoch with strftime gluten free hot cross buns Unresolved external symbol on static class members Show if a user is online, idle, or offline on their account page? I want to display the status of the user on the account page. I added the following code in the theme I am using. It works, but users are never displayed offline. Why? What is wrong in the code? user.html.twig &lt;div class=&quot;bs-field-status&quot;&gt;   {% if status == 'Online' %}     &lt;i class=&quot;user-online fa fa-circle fa-lg&quot;&gt;&lt;/i&gt; Online   {% elseif status == 'Absent' %}     &lt;i class=&quot;user-absent fa fa-circle fa-lg&quot;&gt;&lt;/i&gt; Absent   {% else %}     &lt;i class=&quot;user-offline fa fa-circle fa-lg&quot;&gt;&lt;/i&gt; Offline   {% endif %} &lt;/div&gt;  bootstrap_subtheme_front_office.theme &lt;?php /**  * @file  * Bootstrap sub-theme.  *  * Place your custom PHP code in this file.  */  use Drupal\Core\Database\Database;  /**  * Implements hook_entity_presave().  */ function bootstrap_subtheme_front_office_preprocess_user(&amp;$variables) {   // get user object   $user = $variables['elements']['#user'];   //- The user has logged in at least once   if ($user-&gt;getLastLoginTime()) {     if (account_is_logged_in_less_then_thirty_minutes($user-&gt;id())) {       $status = 'Online';     }     else {       $status = 'Absent';     }   }   else {     $status = 'Offline';   }   $variables['status'] = $status; }  /**  * @param $uid  *  * @return bool  */ function account_is_logged_in_less_then_thirty_minutes($uid) {   $connection = Database::getConnection();   $query = $connection-&gt;select('sessions', 'sessions')     -&gt;fields('sessions', ['sid', 'uid', 'timestamp'])     -&gt;condition('sessions.uid', $uid, '=')     //- chef if the user was online in 30 minutes (60 * 30)     -&gt;condition('sessions.timestamp', \Drupal::time()         -&gt;getRequestTime() - (60 * 30), '&gt;')     -&gt;execute();   //- Get result.   $results = $query-&gt;fetchAll(\PDO::FETCH_OBJ);   return (count($results) &gt; 0) ? TRUE : FALSE; }