There is no /etc/default/rcS anymore on my ubuntu 18.04 server (no GUI)  I had set TMPTIME=20 and after the upgrade from 16.04 this seems to be reverted to a much shorter time. How can I customize the cleanup of /tmp ?    There where also other variables in rcS like UTC=yes or FSCKFIX=yes. Where have those gone?

How is the /tmp directory cleaned up? Is it automatic? If so, how frequently is it cleaned up?


I have . It got closed. I edited it to get it to be reopened. Now I am not sure if my edits are sufficient.   How can I track the reopen votes for my question?  Is there a way to differentiate between "My edits are not good enough to get the question reopened" and "Nobody reviewed my question in the reopen review queue yet"?

Is it possible to check the status of my question which is under hold, and has been edited just now for reopening queue?  this is my


I've heard a lot of people saying just "Where you at" instead of "Where are you at"? And when I corrected my friend, he said that it is so colloquial to be corrected. And I also want to ask if it is wrong to end a sentence in preposition.

I'm not a native English speaker, so I would like to have an explanation of that expression: "Where something/somebody at?"  Examples :      Where Brooklyn at ? (interlude in a Lonely Island album)      Where you at ? (seen on a game server, instead of Where are you, I suppose)   Are not they supposed to say "Where is/are ..."?


I'm trying to do a factorial analysis of binary data (hit / miss) related to the results of a test that consisted of two types of items. My intention is to confirm the number of dimensions to later choose an IRT model to be applied. What is the best strategy to apply? Do I do a factor analysis with both types of items at the same time or by type of items? The plan is to run these analyzes on R. I have already done several with the data, but I am never sure of the number of dimensions to hold. I don't find much information on how to assess the dimensionality of assessment tests. Thanks

I have 72 binary variables and, at a theoretical level, I am trying to identify groups of variables that seem to vary together. In practice, I am struggling with how to analyze this data properly. I am using R and the psych package. Here is what I have tried and what the outcomes were:  Estimated a tetrachoric correlation matrix (ran without problem) Estimated MSA (relatively strong values, ran without problem) Ran parallel analysis to identify how many factors to extract (ran without problem) EFA using fa() to estimate factors (non-positive definite matrix and strangely high RMSEA) Tried different factor counts, smoothing/unsmoothing, estimation methods, rotations methods, and removing variables (problems persisted) Tried to focus instead on eBIC (always returned as NULL in output) EFA using (inappropriately) Pearson correlations (RMSEA behaved)  From looking at other questions and answers on here, I am now aware that tetrachoric matrices can be problematic like this. However, I don't know what to do with that information. Accept the problems as a limitation and move forward? Conduct a different type of analysis? I considered IRT as is recommended, but am unaware of an exploratory way to conduct IRT analyses. I understand that most of my options are imperfect. My goal is to find an analysis that is at least arguably appropriate for binary variables and that will inform the ways in which I group these variables in my theorizing. Given this, my questions are:  Can I trust EFA on a tetrachoric matrix despite problematic output? Can I somehow recover the lost eBIC value and use that? Is exploratory IRT possible/desirable? Are there other analyses, in R, that can be used to examine the dimensionality of binary data?  I appreciate all feedback! I love learning about data analysis and hearing about how I can improve.


Circa 60's or 70's.The creatures are antlike colored red and black, I think. The creatures worship him and erect statues of him. He becomes cruel and behaves badly with them. The ants go to war with each other and things get out of hand with the man's help. In the end, I believe he is killed and they pull his statue down and rejoice in their freedom from his cruelty. The story may be called The Red Kings or something like that.

I am trying to recall the name of a story I read when I was fairly young (maybe 20 years ago, but not sure how old the story is).    What I remember: A man acquires a set of creatures that he keeps in his house, I think in an aquarium.  They evolve over time, quickly, and think of him as their benevolent god. They build statues in his likeness.   Then, I believe some sort of accident happens, and the statues they build become a little less benevolent, which bothers him.  This pattern continues on with his cruelty increasing and their depiction of him becoming more cruel.


So, I use a sprite from a spritesheet to draw the background and repeat it. (I am drawing it twice) However, the moment that the background is re-positioned to make it look infinite, it causes a lag.  What's the right way to do this without having the background image in a separate file?  BetterSprite sprite = new BetterSprite(new TextureRegion(sprites_texture), spritedef.x, spritedef.y, spritedef.width, spritedef.height);  // BetterSprite is just my extended class that returns .scaledWidth and scaledHeight for scaled sprites   this is how I draw the background      //initial scrollingX = 0      floor.setScale(textureScale);     floor.setY(0);     floor.setX(scrollingX);     floor.draw(batch);      // fill screen     floor.setX(scrollingX + floor.getScaledWidth());     floor.draw(batch);      //fill screen     floor.setX(scrollingX + ( floor.getScaledWidth() *2) );     floor.draw(batch);      if(scrollingX < -floor.getScaledWidth() ){         scrollingX += floor.getScaledWidth();     }   The 'scrollingX' gets updated in the doUpdate() method.  It's pretty good when scrolling, but when scrollingx<-floor.getScaledWidth() happens, I get lag.  What's the correct way to do this?

In the games such as Defender (1980 arcade) and Defcon, the player can move/scroll in one direction infinitely because the level/terrain simply wraps over and over again(like if it was wrapped around the side of a cylinder).   I am more interested in the wrapping mechanics of Defcon which wrap(on the x-axis) and zoom the entire level. Here is a link to view the .  To make images(such as a background) wrap is it a per-pixel approach? Is there a function? What methods are there to achieve the circular wrapping of a level?


I'd like to prevent myself from opening a given site (e.g. facebook.com) too soon after the last time it was opened. Is there a browser add-on (ideally - for Firefox) that does that? Or I should write it myself...

I found I have problem to be a little addictive with surfing on internet.  I am trying to find a free ware, (or software), that can help me for exemple to be just 2 hours per day on internet.  Like it is counting the minutes and than stop working. not just 2 hours in one time, but in whole day....   maybe that it has different modes (2hours together, in whole day, 2hours + little reserve time)  but I need something that really take me away access from internet :) Just counting time, is not enough for me :)   Hope we will find something because, I just can't avoid not to loose 4 hours on internet.  I have windows 7


I am using Mendeley for paper and citation manager. Mendeley have 2 thing I need:    index, searchable in all paper (title, author, content, ...) auto-lookup all information (title, author, conf, ...). If Mendeley get incorrectly, I can manually input the DOI number, then it correct itself. sync (including highlighter and note). Basicly, it work like you note, highlight the pdf and save on Dropbox.    However, my free space is going to fill up. Mendeley paid option is too much for me. I would rather pay for dropbox, but dropbox alone does not index, look up all useful info from my paper.   I am looking for alternative. It does not have to be one software do all thing, but combination of some software is good for me.  For example: I would like a software that index, info-lookup all paper (pdf file) in my local folder. Then I sync the folder with Dropbox (for cheaper storage price).

is (mainly) a proprietary social network to share basic citation data and research papers.   Are there any free and open source substitutes for this service?   A technical possibility: users could collect BibTeX data and a hash and share this information.  It would be very useful to have such a free service because every journal provides the citation data in a different format. That includes false field entries, broken files and hidden download buttons on the website.


I dont get how rounding numbers up to certain decimal places I looked everywhere tried every thing  currently I have my program to round up to a whole number with  double rACT = Math.ceil(ACT); double rSAT = Math.ceil(SAT); double rGPA = Math.ceil(GPA);  but i need it to round up to 2 decimal places   FYI - I am an High school student I really dont need something super complicated to do this cuz I need my methods to be less then 15 I can waste any lines

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I've to redirect users, after updating a node, to /node/NID path and not to /node/NID/latest (I'm using content moderation).  I've tried to add this on hook_node_update() but have been ignored (without warning or errors):  if (!$entity->isNew()) {     $path = URL::fromUserInput('/node/' . $entity->id())->toString();     return new RedirectResponse($path); }

I have a custom form submit callback to redirect users to a specific page:  function MYMODULE_authfrontpageredirect_callback(array &$form, FormStateInterface &$form_state) {   $url = \Drupal::service('path.validator')->getUrlIfValid('node/16');   $form_state->setRedirect($url->getRouteName(), $url->getRouteParameters()); }   This works correctly unless the url has a destination query string, such as /node/add/mynode?destination=/user  In this case, the user will be redirected based on the query string (to /user) instead of my submit handler destination (node/16).  How do I forcibly override the destination query string content for this submit handler?  This question is similar to this  but since Drupal 8 has the Symfony routing system the answers there did not help me.


In working on a game I noticed that if I were to take the first ten multiples of seven and consider the last digit of those numbers, the result was exactly one occurrence of each unique digit, zero through nine:   1 × 7 = 7   =>  7  2 × 7 = 14  =>  4  3 × 7 = 21  =>  1  4 × 7 = 28  =>  8  5 × 7 = 35  =>  5  6 × 7 = 42  =>  2  7 × 7 = 49  =>  9  8 × 7 = 56  =>  6  9 × 7 = 63  =>  3  10 × 7 = 70 =>  0   This struck me as surprising (I'm not a mathematician), so I tried the same thing with all of the other numbers and found the same was true for all of the odd single-digit numbers except for 5.  Why does this property exist? Is there a name for this? What is special about 5 that causes it to not have this property?

Say we have two integers $n$ and $k$, such that $0 < k < n$ and $gcd(n, k) = 1$.  Why is it that if we take every integer $x\in\{0,\dots, n-1\}$ and compute $k\cdot x \ (mod \ n)$, we get as remainders all numbers from $0$ to $n-1$, with no repeats?  In other words, why is $\ f:\{0,\dots,n-1\}\rightarrow\{0,\dots,n-1\}$, $\ f(x)=k\cdot x\ (mod\ n)$ a bijection for $k,n\in\mathbb{N},\ gcd(k,n)=1$?


I have an existing Lightning page that display records and some action buttons against each record. I want to have a Button on Opportunity List view, So that, a user can pass the selected records to that lightning page  and I want to have a button that can pass these selected opportunities to the similar page. Currently the above page is fetching the records based on a SOQL query.

I have a requirement where I want to have a custom list view button with an ability to perform a mass custom action in the Lightning environment.   I do not see an option to add lightning quick-action on the list view.  Is there any way to have a custom list view button on a custom object?


I am new to javascript. i would like build a regular expression for "IN12345678" (i.e., starts with IN and ends with eight digit, totally 10). i was bit confused by creating this expression. kindly help me solve this...

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Both bash and zsh support a shorthand of not placing a command in history if you prepend it with a space.  This works great across sessions (if you've setopt histignorespace).  However, the command is still in the current session's history.  How can I avoid placing a command in the current session's history (or remove if after executing it)?

Is there any way to keep a command from being added to your history? I have a command that I want to keep out of my history file, and I really don't care to have it there when I search the history stored in memory, though that's less of a concern. Is there any way to prevent this, or do I just have to go back and edit my history file.  update: I didn't realize this might be shell-specific. My shell is zsh. You're welcome to answer for other shells so people know how to do this in their shell.


$A = \{(1,2+i, i), (1,3+i, 3-i), (i, 3i, 4+i)\}$  Find the dimension of $Sp_cA$ when A is above the complex numbers, and $Sp_rA$ when A is above the real numbers.  I thought that you could use row reduction since it's above the real numbers you can't do any row reduction and you get that $dim Sp_rA= 3$. and since $Sp_cA$ is above the complex you can do row reduction and get that $dim Sp_cA = 2$, does that make sense?

Given $A=$ $\left\{ {(1,2 + i,i),(1,3 + i,3 - i),(i,3i,4 + i)} \right\}$  Let $SP_CA$ be the linear space spanned by A over $C$  Let $SP_RA$ be the linear space spanned by A over $R$  what is the dimension of each subspace ?  I did row operations on A and saw that A is linearly dependet.  and that $dim(SP_CA)=2$  But over $R$. I cannot do row operations with the scalar $i$ since its not belong to $R$ so what is $dim(SP_RA)$ ?


\documentclass[a4paper,12pt]{article} \usepackage{amsmath,amssymb} \usepackage[hang,perpage,symbol*]{footmisc} \usepackage{array} \usepackage{enumitem} \usepackage{scrextend} \usepackage{url} \title{} \author{} \date{} \begin{document} \maketitle \begin{tabular}{>{\hskip -40pt$}c<{$\hskip -10pt}@{\ --\ \hskip 15pt }l} test & test \\[10pt] f(x) = O(g(x)) & $|f(x)| \leq A|g(x)|$ for some constant $A$, and all values $x>x_0$ for some $x_0$. \\[10pt] \end{tabular} \end{document}   I want the f(x)... to have tiny font size but \tiny does not work

MWE:  \documentclass{article} \begin{document} $\wedge{\small\wedge}{\tiny\wedge}$ \end{document}   All the \wedges have the same size...


I have to deliver a statistical analysis plan that will have to be approved by an ethic commettee before I could start a clinical trial.   I usually deal with different kinds of tests, whose power analysis is straightforward and, given the expected effect size, a given statistical significance (Type I error), and a desired power (1 - Type II error), I can easily obtain the needed sample size.  However, this time I am planning to use logistic and ordinal regressions. How can I determine the sample size needed to perform an analysis with a given power, a given statistical significance, and an expected effect size (in terms of odds ratio, I guess)?  Before asking such a question I googled, but I found only some tables related to "standard" cases with one or two regressors, wheras in my case I have several predictors: discrete variables, dummy variables, ordinal variables, and continuous variables.

This question is in response to an answer given by @Greg Snow in regards to a  I asked concerning power analysis with logistic regression and SAS Proc GLMPOWER.  If I am designing an experiment and will analze the results in a factorial logistic regression, how can I use  ( and  ) to conduct a power analysis?  Here is a simple example where there are two variables, the first takes on three possible values {0.03, 0.06, 0.09} and the second is a dummy indicator {0,1}. For each we estimate the response rate for each combination (# of responders / number of people marketed to). Further, we wish to have 3 times as many of the first combination of factors as the others (which can be considered equal) because this first combination is our tried and true version. This is a setup like given in the SAS course mentioned in the linked question.    The model that will be used to analyze the results will be a logistic regression, with main effects and interaction (response is 0 or 1).   mod <- glm(response ~ Var1 + Var2 + I(Var1*Var2))   How can I simulate a data set to use with this model to conduct a power analysis?  When I run this through SAS Proc GLMPOWER (using STDDEV =0.05486016  which corresponds to sqrt(p(1-p)) where p is the weighted average of the shown response rates):    data exemplar;   input Var1 $ Var2 $ response weight;   datalines;     3 0 0.0025  3     3 1 0.00395 1     6 0 0.003   1     6 1 0.0042  1     9 0 0.0035  1     9 1 0.002   1; run;  proc glmpower data=exemplar;   weight weight;   class Var1 Var2;   model response = Var1 | Var2;   power     power=0.8     ntotal=.     stddev=0.05486016; run;   Note: GLMPOWER only will use class (nominal) variables so 3, 6, 9 above are treated as characters and could have been low, mid and high or any other three strings. When the real analysis is conducted, Var1 will be used a numeric (and we will include a polynomial term Var1*Var1) to account for any curvature.  The output from SAS is     So we see that we need 762,112 as our sample size (Var2 main effect is the hardest to estimate) with power equal to 0.80 and alpha equal to 0.05. We would allocate these so that 3 times as many were the baseline combination (i.e. 0.375 * 762112) and the remainder just fall equally into the other 5 combinations.


I need the simplest possible answer to this. I have looked up in various sites for the answer. If the inputs to a programme is such that the output is 10, will command return 0 force the programme to return the value 0 instead of 10? I have written simple C programmes on Borland IDE without return 0 and they work fine.

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


Is there a way to save a QGIS project as one large file that includes the layers it points to?   I am working with Tecplot quite a bit, which has the option of referencing individual data files or saving all the data as one compiled file. I was wondering if QGIS has a similar capability.  As long as layer locations don't change, I can simply point to the absolute layer location. However, if I want to create a backup disk or hand over the project to a third party, the folder structure may not be preserved.  I found some discussions about QCompile and GeoPackage, which should do what I want, but from what I understand they are still in development stage.

In my project, I use a lot of geodata from different directories. Now I want to give the QGIS project to a colleague (eg on a CD).  Is it possible to copy the shapes from different directories automatically to one directory?


I can't edit my own comments on my own questions and answers. I can still delete and add a comment, so if I really wanted to, I could copy my previous comment, add a comment, paste it in, make changes, and delete the old comment. This happens on all communities that I am on, regardless of the community. One example:     But there is no edit button. This is my own comment on an answer to my question. On another community:    Alas, no edit button, even though there is a delete button. I could copy the comment, delete the comment, add a comment, paste it in, and make changes. As of writing, I have < 50 reputation on all communities. If it is not currently possible to edit comments, please add the feature-request tag to this question, instead of down-voting, deleting or closing this question.

I am a horrendous speller, and my mild dyslexia does not help.   Sometimes I typo in my comments, I look at it a few days later and see something that screams to be fixed. But to fix it I would have to get rid of all my up votes and lose continuity.   Should we be allowed to fix minor typos in comments?


Apologies if this is not the appropriate place to post!  I am designing a minimal Linux system to test on an industrial PC. The ultimate goal is security.  The hardware of the PC is known and will not change, so I have quite a bit to strip down from my starting point, CentOS 6. In the end, I will be building up instead of stripping down.    (Cue the barrage of questions)    What would be the best way to begin the strip-down process? Would ldd be best for finding and removing unused libraries? And what about drivers?    For the build-up, what is a good starting point? The kernel must be compatible with a TPM chip, and SE Linux will be used. Would Damn Small Linux be recommended? Should I write my own init?    Thanks!

I've been building my own Linux distro, and I've stripped the binaries, etc. The system won't use GCC or development tools, as it will be a Chrome kiosk, so it would greatly help if I could strip down the system...  I was wondering, is there a way that I can delete all of the unused system files (like binaries, etc.) by watching what files/libraries are used during runtime? Maybe another method is preferred, but is there a way to accomplish something like this?


Let's say you have an encryption algorithm that uses PKCS5 padding. You input 'secret message', which is 14 characters long, but for some reason or another the algorithm needs it to be 16 characters long. So you add on two bytes that are equal to 2 at the end. Then when you decrypt it, you just look at the last byte and take that many off for the end result. But how would you be able to tell if there was no padding in the first place? I'm just a noob so be nice please. Thanks in advance!

When a program is decrypting a message encrypted by CBC mode, what does it find out, whether the last bytes of the last block is part of the padding or part of the plaintext?  Example: Use CBC mode with 4 Byte blocksize and encrypt the following two messages:  m1 = ABCDEF m2 = ABCDEF22   M1 gets padding and will be "ABCDEF22". How do I find out, whether the original plaintext was ABCDEF, or ABCDEF22?


I'm trying to prove this by induction, but something doesn't add up. I see a solution given , but it is actually proving that the expression is greater than $2\sqrt{n}$. I'd appreciate some insight.

this is my first post here so pardon me if I make any mistakes. I am required to prove the following, through mathematical induction or otherwise:  $$\frac{1}{\sqrt1} + \frac{1}{\sqrt2} + \frac{1}{\sqrt3} + ... + \frac{1}{\sqrt{n}} < 2{\sqrt{n}}$$  I tried using mathematical induction through:  $Let$ $P(n) = \frac{1}{\sqrt1} + \frac{1}{\sqrt2} + \frac{1}{\sqrt3} + ... + \frac{1}{\sqrt{n}} < 2{\sqrt{n}}$  $Since$ $P(1) = \frac{1}{\sqrt1} < 2{\sqrt{1}}, and$ $P(k) = \frac{1}{\sqrt1} + \frac{1}{\sqrt2} + \frac{1}{\sqrt3} + ... + \frac{1}{\sqrt{k}} < 2{\sqrt{k}},$  $P(k+1) = \frac{1}{\sqrt1} + \frac{1}{\sqrt2} + \frac{1}{\sqrt3} + ... + \frac{1}{\sqrt{k}}+ \frac{1}{\sqrt{k+1}} < 2{\sqrt{k+1}}$  Unfortunately, as I am quite new to induction, I couldn't really proceed from there. Additionally, I'm not sure how to express ${\sqrt{k+1}}$ in terms of ${\sqrt{k}}$ which would have helped me solve this question much more easily. I am also aware that this can be solved with Riemann's Sum (or at least I have seen it being solved in that way) but I do not remember nor quite understand it.


even though i was aware of TeX for decades, my only use of LaTeX is here on math-oriented StackExchanges or at Wikipedia, and only to edit equations.  so i downloaded TeXworks and the MiKTeX and found, on Overleaf, a sample TeX file that i was able to add an equation to.  here on the math SE, we have a script font \mathscr{} that makes the correct script version of "F" for the Fourier Transform:  the font i want is \mathscr{F}   But what I seem to only be able to get with either Wikipedia or this basic download of TeXworks (and MiKTeX) running on my PC is \mathcal{F}   However invoking \mathscr{F} in TeXworks causes an error.  The only packages I am aware I am using (from this Overleaf template) is  \documentclass[letterpaper]{article}  %% Language and font encodings \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc}  %% Sets page size and margins \usepackage[letterpaper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}  %% Useful packages \usepackage{amsmath} \usepackage{graphicx} \usepackage[colorinlistoftodos]{todonotes} \usepackage[colorlinks=true, allcolors=blue]{hyperref}   I have no idea what else I have to get to get the correct script font \mathscr{}

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


So I made a simple camera rig (camera clamped to nurbus circle and parented to an empty, dead center in middle) but I get this unwanted jitter, not sure what causes it, if someone knows solution, I would be grateful, thanks!  Problem shown in a Youtube video attached

I render a short movie. I set the camera to the circle curve to make it fly in circle. The problem is after render, the camera is a little shaky. Can anyone help me? Thanks first.


Can anyone please help me the following indefinite integral:  $$\int \log(\sin(x))dx$$  Thanks

How to compute the following integral?  $$\int\log(\sin x)\,dx$$    Motivation: Since $\log(\sin x)'=\cot x$, the antiderivative $\int\log(\sin x)\,dx$ has the nice property $F''(x)=\cot x$. Can we find $F$ explicitly? Failing that, can we find the definite integral over one of intervals where $\log (\sin x)$ is defined?


"There are Mary and Nat" "There's Mary and Nat"  Which sentence is correct and why? Thanks in advance!

What are the roots of the creeping usage of "there's" for both singular and plural predicates? (This seems to be more common in spoken English.) I have 2 theories.  Perhaps it is because spoken communication our society is becoming less formal by the day. Or perhaps it is a reflection of speakers of other languages having increasing contact with native English speakers.  I am aware of German  "es gibt" and Spanish  "hay" constructions. Please comment.  3/06/14 I ran a couple of Google Ngrams and was surprised to find a greater rise in the use of "there's" in English fiction than in general English language books, since the turn of the century.  This would seem to support my contention that informality is behind the shift.


Trying to redirect all requests from http://domain.com/subfolder/ to http://new-domain.com/subfolder/  With the configuration I have right now everything is working fine but if the URL is pointing to a php file, the redirect is not made, instead is trying to access the file from domain.com  Nginx configuration for domain.com is:      server {             server_name  domain.com;             return 301 $scheme://www.domain.com$request_uri;     }      server {             server_name domain.com www.domain.com;             root /var/www/vhosts/domain.com;              # Redirect that's now working for php file:             location /subfolder {                     return 301 http://new-domain.com$request_uri;             }              index index.php;              # Here are the default Wordpress nginx configuration files included             include /etc/nginx/global/restrictions.conf;              # Additional rules go here.              # Only include one of the files below.             include /etc/nginx/global/wp-multisite.conf;             include /etc/nginx/global/wordfence.conf;     }   Wordpress configurations included are the one from here:   And the nginx.conf is looking like this:      user www-data;     worker_processes auto;     pid /run/nginx.pid;      events {             worker_connections 768;             # multi_accept on;     }      http {              limit_req_zone  $binary_remote_addr  zone=one:10m   rate=2r/s;              ##             # Basic Settings             ##              sendfile on;             tcp_nopush on;             tcp_nodelay on;             keepalive_timeout 65;             types_hash_max_size 2048;             client_max_body_size 9M;             # server_tokens off;              # server_names_hash_bucket_size 64;             # server_name_in_redirect off;              include /etc/nginx/mime.types;             default_type application/octet-stream;              ##             # SSL Settings             ##              ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE             ssl_prefer_server_ciphers on;              ##             # Logging Settings             ##              access_log /var/log/nginx/access.log;             error_log /var/log/nginx/error.log;              ##             # Gzip Settings             ##              gzip on;             gzip_disable "msie6";              # gzip_vary on;             # gzip_proxied any;             # gzip_comp_level 6;             # gzip_buffers 16 8k;             # gzip_http_version 1.1;             # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;              index              index.php index.html index.htm;             upstream php {                     server unix:/var/run/php5-fpm.sock;             }              ##             # Virtual Host Configs             ##              include /etc/nginx/conf.d/*.conf;             include /etc/nginx/sites-enabled/*;     }   So the question is, why is nginx trying to serve the php file from domain.com instead of redirecting? Is because of the upstram configuration from nginx.conf?   Any help is appreciated. Thanks!

I have a PHP application (Wordpress) in the root folder of my site, and all requests to the site run through it happily.   However, I have a subfolder, _links, which I would like to use to execute another, different php script.  Eg, if a user goes to site.com/_links/221312, then the index.php script from /_links takes over.  I formerly used a .htaccess file to achieve this, but since moving to nginx I can't make it work.   Here is the old .htaccess file.  RewriteEngine On RewriteRule    ^([0-9]+)/?$    index.php?linkid=$1    [NC,L]   Obviously, I'm passing the last bit of the URL to the script as a parameter.  Here is my nginx config. Requests to eg site.com/_links/23423 are picked up by if (!-e $request_filename) and rewritten to /index.php?q=/_links/23423 instead of being picked up by the location block.   server {         listen  127.0.0.1:8080;         server_name site.com www.site.com m.site.com;          root /var/www/site;         location ^~ /_links/ {                 add_header location 1;                 root /var/www/site/_links;                 rewrite "^([0-9]+)/?$" /index.php?linkid=$1 break;                 location ~ \.php$ {                         try_files $uri =404;                         fastcgi_pass unix:/var/run/php5-fpm.sock;                         fastcgi_index index.php;                         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                         include fastcgi_params;                  }          }         index index.php index.html;         if (!-e $request_filename)             {                 rewrite ^(.+)$ /index.php?q=$1 last;             }         location / {                 try_files $uri $uri/ =404;         }          # pass the PHP scripts to FastCGI server listening on the php-fpm socket         location ~ \.php$ {                 try_files $uri =404;                 fastcgi_pass unix:/var/run/php5-fpm.sock;                 fastcgi_index index.php;                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                 include fastcgi_params;          }         access_log /var/log/nginx/site.com.access.log;         error_log /var/log/nginx/site.com.error.log notice; }   I'm really confused. What's going on here?


For example, there is a link  in terminal, usually I could right click on the link, select open link to open the link in google-chrome.   But now I cannot do this on ubuntu 15.10. Google-chrome only opens a blank page for me every time. It works in Firefox or Opera if I set the default browser as them, and it works on Windows, too. It just doesn't work on ubuntu 15.10 with google-chrome. I don't know if this is a bug of google-chrome or ubuntu. Has anyone encountered the same problem? How to fix it?

Since I installed Ubuntu (fresh install on a new machine), and set Google Chrome as default browser, whenever I open links from external apps these are open as blank tabs in new browser window (no actual redirection to site, just a blank tab).  I switched to Firefox and this behavior doesn't persist. If I switch back to Chrome as default browser (via default apps) it happens again.  I noticed that both in Unity Launcher and from the default app settings, Chrome isn't called just 'Google Chome' but 'New Tab - Google Chrome'. Not sure if this is related or how to fix it. I made some searches that suggest to look for mimeapps.list or check that the google-chrome-stable.desktop contains a %U value, but none of these helped.  This is an extract of the .desktop entry by the way:  [Desktop Entry] Version=1.0 Name=Google Chrome Exec=/usr/bin/google-chrome-stable %U Terminal=false Icon=google-chrome Type=Application Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp; X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito   this is mimeapps.list  [Default Applications] text/html=google-chrome.desktop x-scheme-handler/http=google-chrome.desktop x-scheme-handler/https=google-chrome.desktop x-scheme-handler/about=google-chrome.desktop x-scheme-handler/unknown=google-chrome.desktop


My total rep for the day is only 95, yet I didn't get any reputation points for an upvote on one of my answers.  Why?  Is there a limit on total upvotes per answer that will generate reputation?    The answer whose upvote didn't generate any additional reputation is .  It is at a total upvote count of 106.    In doing research on this topic, I came across the 200 vote daily limit for upvotes (I'm way below that for today - though have hit it in the past) and a discussion about caps on total reputation for upvotes on a single answer which said there was no limit there.  So, I'm stumped.  Why did I not get any reputation points for today's upvote on the  answer?

Some questions and answers are marked Community Wiki and are owned by a community wiki user:  (In fact, this very question is one of them)  Why have Community Wiki posts? How do Community Wiki posts work? How does a post become a Community Wiki post? How can the Community Wiki status be removed from a post? How can I find Community Wiki posts?


So I recently asked , which lead me to run this command:  $ du -sk /dev/*  Which outputs about 353 different entries that look like this:   0   /dev/sdt 0   /dev/stderr 0   /dev/stdin 0   /dev/stdout 0   /dev/systrace 0   /dev/tty 0   /dev/tty.Bluetooth-Incoming-Port 0   /dev/tty.Bluetooth-Modem 0   /dev/ttyp0 0   /dev/ttyp1  Can someone please elaborate on what these directories are? And why are they all zero bytes?

$ ls -l /dev/stdin /dev/fd/0 lrwx------ 1 tim tim 64 2011-08-07 09:53 /dev/fd/0 -> /dev/pts/2 lrwxrwxrwx 1 root root 15 2011-08-06 08:14 /dev/stdin -> /proc/self/fd/0 $ ls -l /dev/pts/2 /proc/self/fd/0 crw--w---- 1 tim tty  136, 2 2011-08-07 09:54 /dev/pts/2 lrwx------ 1 tim tim     64 2011-08-07 09:54 /proc/self/fd/0 -> /dev/pts/2    I was wondering if all the files under /dev and its subdirectories are all file descriptors of devices? Why are there so many links from each other? For example, /dev/fd/0, /dev/stdin, /proc/self/fd/0 are all links to /dev/pts/2. If l in lrwx------ mean link, what does c in crw--w---- mean?


I am enrolled in a Ph.D. program at a leading institute in India. However I am facing certain problems which are administrative in nature and hence want to restart my Ph.D. at another institute. I am seeking clarification on the possibility to pursue Ph.D. from two institutes simultaneously. For your reference, I have already completed the course work at the current institute.

I am studying a combined bachelor of engineering (electrical) and bachelor of mathematics; I just started this year and will graduate in 2018. The reason why I am doing double degrees and not a single degree is because I love both electrical engineering and mathematics and I could not ignore any of them. So with this in mind, I am thinking of doing two PhDs when I graduate (one in electrical engineering and one in mathematics). Is this a good path or I should concentrate on only one of them?


I recently migrated from Incandescent to LED light bulbs. I changed my old dimmer switches to LED compatible dimmer switches (all 3-ways). When on, the lights work fine, but when turned off, I noticed a very faint and permanent glow being emitted by the light bulbs. I tried changing the light bulbs and/or the dimmer switches but with no luck. I'm thinking that the green light present on the switch and activated when the switch is turned off is causing this leakage. Does anyone have a clue on how to fix this issue?  thanks!

I have two LED lamps in my corridor, and when I switch them off, they keep emitting light (not very strong, but it's annoying at night).  What can it be? How can I fix it?


I have been trying to set Zathura has my pdf viewer with AUCTeX in Doom Emacs. I added (setq TeX-view-program-list '(("zathura" "zathura --page=%(outpage) %o"))) to my ~/.doom.d/config.el but whenever I try to view my tex file, it throws up the error Unknown "Zathura" viewer, Check the 'TeX-view-program-selection' variable. Is there a way fix this?

I haven't been able to find much on how to set up Zathura to work with AUCTeX/Emacs in terms of forward/inverse-searching.  Has anyone been successful in this?


The Display Settings maximum resolution started at 1024x768(4:3)  I tried to use xrandr like so:  >>xrandr Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192 DVI-I-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    1024x768       60.0*     800x600        60.3     56.2      848x480        60.0      640x480        59.9   DVI-I-2 disconnected (normal left inverted right x axis y axis)  >>cvt 1900:900 # 1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz Modeline "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync  >>xrandr --newmode "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync  >>xrandr --addmode DVI-I-1 1600x900_60.0  >>xrandr Screen 0: minimum 320 x 200, current 1600 x 900, maximum 8192 x 8192 DVI-I-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    1024x768       60.0      800x600        60.3     56.2      848x480        60.0      640x480        59.9      1600x900_60.00   59.9*  DVI-I-2 disconnected (normal left inverted right x axis y axis)   At this point my display changes to 1600x900.   But after I log-out or reboot it goes back to 1024x768 and I have to re-do this process.  Essentially this is the same as  which only mentions      There is also a section about Setting xrandr changes persistently which can help if the resolution you set does not stay after you reboot.   But I couldn't find it.  Here's the error message I get after reboot:

How can I run the following xrandrcommand on startup?  xrandr   cvt 1368 768  xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync xrandr --addmode VGA1 1368x768_60.00 xrandr --output VGA1 --mode 1368x768_60.00


I let my little brother use my computer and now the (official) Pictures folder isn't there anymore.  How do I restore it? I already made a folder named pictures but it isn't the same since it has no special folder icon.

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


I have a selection in Photoshop that looks like this:    When I Paint Bucket (or Edit-Fill), it comes out all wrong and fills half wrong and half too far:    What am I missing? How can I get it to fill the selection exactly? You can see my fill settings at the top.

I am using rectangular marquee tool to cut a portion of the layer in photoshop cs5, but after cutting, the edges are not sharp, I get blur edges.      how can I get sharp edges?


I am trying to follow  great tutorial of frontend programming. I've come along building all the required files (until chapter 8), hopefully understanding most of the theory.  My problem is that when I try to open index.html in my IE11 I cannot see the page at all.  Only when I comment the following line inside the  of index.html:  <script src="src/model/Book.js"/>   then I can see the html visually.  Active Scripting on my IE is enabled. Maybe it can be that my AVG Internet security is involved? I disabled its "Web Shield" feature - but no help.  Can you advise please?  Thanks!

What is the reason browsers do not correctly recognize:  <script src="foobar.js" /> <!-- self-closing script element -->   Only this is recognized:  <script src="foobar.js"></script>   Does this break the concept of XHTML support?  Note: This statement is correct at least for all IE (6-8 beta 2).


So I am doing a challenge to break an encryption and have been stuck on one of the equations. $$c = K^e\mod n$$ I know $c,e$ and $n$ all of which are very very large numbers. I know I have to get $K$ as it is the only way to reverse the next set of equations but I cannot figure out how to get $K$ from this.

It is my understanding that the public key modulus $N$ for the RSA cryptosystem is presumed to be a semiprime. I have also read where it is not necessary that $N$ be a semiprime, but it could be some other type of composite number. My question is: If one wants to decrypt a message knowing $N$ and one of its prime factors, can the message still be decrypted if $N$ is not a semiprime?


A PhD advisor usually sent all his letters of recommendation for his students through his secretary. He wrote a letter for his PhD student who is currently applying for academic positions, and unexpectedly died a month after. The secretary has a letter. Should this letter be submitted as a part of application? Should it be stated in the cover letter that the letter is from a deceased advisor and how the submission should be handled (for example, for MathJobs should an account with the secretary email be created)?   The advisor worked in the US and the applicant is considering both American and European universities.

She was a really nice professor and she wrote me a good recommendation letter that resulted in a lot of good results with applications. Recently, this professor died from brain cancer, which was a fast and shocking death for me.  Tomorrow is the deadline for a grant. What should I do? Is it professional to use letters from the deceased?


If a series converges does the third power of the series converge? I want to say that if the terms of the series are all >0 then it does but if the series terms can be positive or negative I am not sure.

Per the title, if $\sum_{1}^{\infty}(a_n)^3$ diverges, does this imply that $\sum_{1}^{\infty}(a_n)$ diverges?   I'd appreciate hints (!) for dealing with this excercise.  EDIT Per the contrapositive, it is not given that $a_n$ converges absolutely, or that it is nonnegative for all $n$.  Thank you!


I just bought a Samsung Galaxy S4 and I'd like to get rid of a lot of applications I found installed but I'm not going to use.  What options do I have?  Surfing the web it seems that I cannot do it without rooting and the only option I have is to . Is that the only option?  Alternatively I saw that a lot of web site links to  but it seems to be discontinued. Is there any alternative script I should look for?  I see that there is the possibility to install other ROMs (). Would that help me getting rid of all the bloatware?  These were the options I found searching the web, would you recommend me to go down for any of these three paths or is there any better option? I'd like to know which are the pros and cons of each of them so that I can come up with the best decision for my needs.

I'm using a Samsung I9000 and I have some annoying apps that came pre installed by the phone vendor, like a music store, a custom web browser and other memory leaking apps.  Those crappy apps can't be uninstalled neither by Manage applications tool, nor by editing the apps tiles in the front menu.  I guess I have to be a root user or something to get rid of those apps, but I don't know how.


Is there a statement s_type which allows to determine the type of an object in C++?   E.g.  s_type(int a);      // int s_type(&a);         // int*

For example:  int a = 12; cout << typeof(a) << endl;   Expected output:  int


After installing a Bluetooth driver, the following error is shown, I have tried everything without any success. Following is the log that it shows when I try to fix it. esar@cesar-P43E:~$ sudo apt install --fix-broken Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded. 1 not fully installed or removed. Need to get 0 B/55.4 kB of archives. After this operation, 0 B of additional disk space will be used. dpkg: error processing package libpam0g:amd64 (--configure):  package is in a very bad inconsistent state; you should  reinstall it before attempting configuration Errors were encountered while processing:  libpam0g:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)  How can I solve this? I have tried the following: $ sudo apt-get install --reinstall liblmdb0 Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 66 not upgraded. 1 not fully installed or removed. Need to get 0 B/100 kB of archives. After this operation, 0 B of additional disk space will be used. dpkg: error processing package libpam0g:amd64 (--configure):  package is in a very bad inconsistent state; you should  reinstall it before attempting configuration Errors were encountered while processing:  libpam0g:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt --purge remove liblmdb0:amd64 Reading package lists... Done Building dependency tree        Reading state information... Done E: The package libpam0g needs to be reinstalled, but I can't find an archive for it.  $ sudo apt-get autoremove Reading package lists... Done Building dependency tree        Reading state information... Done E: The package libpam0g needs to be reinstalled, but I can't find an archive for it.  sudo apt-get update, sudo dpkg --configure -a returned no error. $ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done E: The package libpam0g needs to be reinstalled, but I can't find an archive for it.  $ sudo apt remove libpam0g [sudo] password for cesar:  Reading package lists... Done Building dependency tree        Reading state information... Done E: The package libpam0g needs to be reinstalled, but I can't find an archive for it.  I really do not know what to do in order to solve the problem.

I can't update my system because it freezes while installing a third-party update (zramswap-enabler)! Sometimes I get the following message in Update manager:  Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message: E:The package zramswap-enabler needs to be reinstalled, but I can't find an archive for it.  I tried to remove the zramswap-enabler, but it's impossible because I get the following message: dpkg: error processing zramswap-enabler (--remove):  Package is in a very bad inconsistent state - you should  reinstall it before attempting a removal. Errors were encountered while processing:  zramswap-enabler E: Sub-process /usr/bin/dpkg returned an error code (1)  Actually I would really reinstall that package, but it is unable to do it! If I remove this third-party PPA then the system is warning me about a very very serious problem. So why can I not install/reinstall/remove/update this package and why freezes the updater if I try to update?


Is it possible to have one or more extra TZs in the status bar, as I'd asked  (that was for Unity, though, so it's not a dupe).

I looked everywhere but I couldn't find a way to display multiple clocks in GNOME 3. In classic GNOME and Unity, it is possible. Also, for some strange reason, additional timezones cannot be added to the clock using the time-date applet in classic GNOME. Any solutions?


If I have a store that offers flat rate shipping of $10 and free shipping for orders over $100 and a customer orders over $100 it doesn't make much sense for them to have to see both free shipping and flat rate shipping on the checkout page. Why would a user even choose flat rate shipping?  How can I use a filter to detect if free shipping is available, filter the flat rate shipping label so it says something like flat rate shipping (free), and then disable the free shipping method.  The end result is that if a user orders less than $100 they see flat rate shipping $10 and if they order over $100 they see flat rate shipping (free!).

I would like to know if it is possible to enable free shipping with Woo Commerce only if certain items (or items of certain categories / shipping classes) are included in the cart.  The Free Shipping option only activates on the basis of cart value or via a coupon code so I investigated Flat Rate shipping and discovered that it prioritises the most expensive shipping class over the cheaper ones. This means the free shipping class I created never overrides the default charge.  I understand the logic behind this but it's the opposite of what I need as the idea is to incentivise purchases of higher profit margin products by eliminating delivery charges when they're included in an order.  I don't know if what I am trying to achieve is simply not possible within Woo Commerce. A coupon that only applies to certain products / categories seems to be the closest I can get but I'd rather not force users to enter a code at checkout.  Does anybody know if there any simpler ways to give users who purchase certain products free shipping?


Hi, in my circuit I made ground plane and inside of it I need clear area without copper for anthena. So I have created polygon in tRestrict layer and used Ratsnest for reconection. It worked, but not correctly. Copper was gone, but it took more copper than it should. It took 0.2mm more copper around each side of the polygone. I need ground plane align precisely around the polygon.   I think the isolation around polygon was created because ground plane polygon has column for isolation set to 0.2mm. How can I change isolation just for restrict polygon and keep it for other objects? If I think wrong and the problem is somewhere else, how can I fixe it?

As title EAGLE don't allow me to draw a clear space inside a polygon. I've a GND polygon plane and I don't want that a zone inside it is filled with this plane.  How I can do that?


When disabling 3G/network usage (go to Settings->Cellular->Use cellular data for:) for a specific application (eg. Facebook, Hangouts, Messenger, ...) I can still receive messages and/or notifications on my iPhone.  Is this some kind of bug in iOS [version: 7.1(11D167) - modemfirmware: 2.18.02]?

I try and keep an eye on my cell data so I don't use too much. From what I've noticed from my own usage the apps that eat up the most data are the ones that stream music and videos like Pandora and Youtube, so I turned off cell data for these apps. Just yesterday I got a notification from Pandora saying "New music has been added to so-and-so station". I wasn't on wifi and after double checking the cell settings data was still disabled for it.   Whats going on?


I am using Ubuntu 14.04LTS. When I login, there is an extra user called 'Oracle' present. How can I hide this?

How do I hide a particular user from the login screen on a default install of 11.10 and higher? (ie. using Unity Greeter)?


import java.util.*;  public class HOA6 {     public static void main(String args[])     {         if(args[0] =="Male" && (Integer.parseInt(args[1])>=1 && Integer.parseInt(args[1])<=58))         {             System.out.println("The percentage of interest is: " + 8.4+"%");         }         else if(args[0] =="Male" && (Integer.parseInt(args[1])>=59 && Integer.parseInt(args[1])<=100))         {             System.out.println("The percentage of interest is: " + 10.5+"%");         }         else if(args[0] =="Female" && (Integer.parseInt(args[1])>=1 && Integer.parseInt(args[1])<=58))         {             System.out.println("The percentage of interest is: " + 8.2+"%");         }         else if(args[0] =="Female" && (Integer.parseInt(args[1])>=59 && Integer.parseInt(args[1])<=100))         {             System.out.println("The percentage of interest is: " + 9.2+"%");         }     } }   This is the code of the program. Why this is not giving any output ? I am using the Java language here. I am passing command line arguments as Male and 28 but instead of the logic written for this input , it is not giving any output. What is the problem ?

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


I have VPS of following configuration.  RAM : 4GB Swapped RAM : 4GB Disk : 500GB   I'm unable to start any service it's showing No Space is available.   df -i  Filesystem                                              Inodes   IUsed  IFree IUse% Mounted on rootfs                                                 6545408 6544345   1063  100% / udev                                                    510093     297 509796    1% /dev tmpfs                                                   514106     225 513881    1% /run /dev/disk/by-uuid/4bdbc1bc-2c9d-48d9-a6ab-654bc6ca727a 6545408 6544345   1063  100% / tmpfs                                                   514106       2 514104    1% /run/lock tmpfs                                                   514106       2 514104    1% /run/shm /dev/xvda1                                               62248      20  62228    1% /boot   Is there anyway to increase inode value by means of swapping or anything? I've enough disk space but 100% inode value giving me this problem.

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look.   df showed 50% available space. After searching for about an hour I saw a forum post where the guy used df -i. The option looks for inodes usage. The system was out of inodes, a simple problem that I didn't realize. The partition had only 3.2M inodes.  Now, my questions are: Can I make the system have more inodes? Should/can it be set when formatting the disk? With the 3.2M inodes, how many files could I have?


I have a list of dicts like below:  [  {'init_time': datetime.time(14, 0), 'end_time': datetime.time(19, 0), 'value': 5.2},   {'init_time': datetime.time(17, 0), 'end_time': datetime.time(18, 0), 'value': 6.5},  {'init_time': datetime.time(15, 0), 'end_time': datetime.time(17, 0), 'value': 2.5} ]   How can I sort this list by the value of each dict's init_time? Usually with sorted one is able to sort a dict based on either key or value, but in my case, I'm not interested in sorting the dict but the list, using the dict's values.  For example, the output of the above would be:  [  {'init_time': datetime.time(14, 0), 'end_time': datetime.time(19, 0), 'value': 5.2},   {'init_time': datetime.time(15, 0), 'end_time': datetime.time(17, 0), 'value': 2.5}  {'init_time': datetime.time(17, 0), 'end_time': datetime.time(18, 0), 'value': 6.5}, ]

I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]


This is the terminal message I keep getting when trying to update via: sudo apt-get update  $ sudo apt-get update [sudo] password for petros: Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/   How can I solve it?

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


I am having real issues passing a list of my Transaction__c object from my lightning controller into my apex controller my transactions apex:attribute is like so:  <aura:attribute name="transactions" type="Transaction__c[]"/>   And my lightning controller method is:  addTransactions : function(component, event) { //var transactionList = component.get("v.transactions"); var action = component.get("c.insertTransactions");     action.setParams({         tList : component.get("v.transactions")     })     action.setCallback(this, function(response) {         var state = response.getState();         if(state === "SUCCESS"){             alert("From Server: " + response.getReturnValue());         }         else{             console.log('ERROR:' + state + response.getError());         }     });     $A.enqueueAction(action) }   And my apex controller method is:  @AuraEnabled public static List<Transaction__c> insertTransactions(List<Transaction__c> tList) {     try{     insert tList;     }     catch(exception e){         System.debug('error inserting transactions @ ' + e);     } return tList; }   In the console log the error I am recieving is:      ERROR = message: Unable to read sObject     Is there a specific way to pass lists because I must be missing something.  An example of the array that would be passed looks like this in the console:

sorry for almost duplicate - but I have not enough reputation yet to comment on:   I am having the same issue with Standard Objects:  <aura:component > <aura:attribute name="acc" type="Account" default="{'sObjectType':'Account', 'Name':'Account123'}"/> </aura:component>   Trying to save, I get      "Failed to save undefined: Unable to read SObject: Source"   To my understanding of the documentation, I do not need any namespace for Standard Objects. I tried all combinations nonetheless to no avail.   Tried several standard Objects as well. All produce the same error with exception of sObjectType Event. The following can be saved but does not work:  <aura:component > <aura:attribute  name="demo"  type="Event"  default="{'sObjectType':'Event',  'Subject':'Account123',  'WhoId':'00300000121aAAB'}"/> {!v.demo.WhoId} </aura:component>


I have a problem with C:\Windows\System32\drivers\etc\hosts file. Every half hour or so this file is updated by some process. I have this file opened in notepad++ and I see that some lines are added (entries that used to be used months ago) or it is cleared.  I run  but it does not capture anything at the time the changes happen.  Some other people in my project experience the same behavior.  How to identify the process?  This is not a duplicate of questions such as "The process cannot access the file because it is being used by another process." I am able to access the file.

There are a few other question with this same title but they do not solve my problem, so I am opening another one.   I have set the permission for the "hosts" file to full access for the current user. I have even taken the ownership. Current user is in Administrators group. I have turned off UAC. I have removed read only permission from the file.  C:\Windows\System32\drivers\etc>attrib hosts A            C:\Windows\System32\drivers\etc\hosts  I have disabled my Panada Antivirus. I have also stopped 3 panda services from Services palette. I open an elevated Command Line (run as Administrator). Run Notepad and change the file. When I try to save the file I receive the following error:  "The process cannot access the file because it is being used by another process. I check the file using "Unlocker" and the software says there is no active lock on the file.   Can anyone help?


I would like some help or guidance to port/install Ubuntu Touch on my phone. So far I have my HW files and the original kernel from Sony for my phone.  I am aware that Ubuntu Touch is based on CM 10-1. Is it possible for me to modify my kernel and CM 9 for my Xperia P with the CM 10-1 files? if so how would I go about that?  Any suggestions?

I would like to port Ubuntu Touch to a device that is currently not supported. What are the requirements for doing this and where do I begin?


I have Ubuntu 12.04 LTS.  Starting a few weeks ago, every time I boot a message would pop up in the notification area and say that Ubuntu One's file services will be shutting down June 1st, 2014.  This makes no sense because:   I've never used Ubuntu One's file services. In fact, I uninstalled Ubuntu One over a year ago. It's good that the service will be shutting down on June 1st, but it's June 16th now. These messages didn't start until after June 1st anyways.   How do I make this message stop?

Good day, people It's been 8 days since the announced discontinuation of Ubuntu One, which I've never used at all, but I'm still receiving the notice for "June 1st discontinuation" every time I boot up my 12.04. Will that message ever go away?  Thanks.


I am self teaching myself python 2.7. I  have some experience in using BATCH, which has a GOTO statement.  How do I do that in python? For example, suppose I want to jump from line 5 to line 18.  I realize there have been previous questions regarding this topic, but I have not found them sufficiently informative or, are too high level in python for my current understanding.

Is there a goto or any equivalent in Python to be able to jump to a specific line of code?


I am writing a lot of survey reports in which I need to answer specific questions. I stumbled upon \usepackage[shortlabels]{enumitem} and \begin{enumerate}[a)], respectively, which does exactly what I want.    However, at the moment, I need to input pagebreaks by hand if the question and the corresponding answer gets to the next page and was wondering if this could be corrected "automatically". Let me explain this with the help of some code and a picture.  Code:  \documentclass[12pt]{scrartcl} \usepackage[shortlabels]{enumitem} \usepackage{lipsum}  \begin{document} \begin{enumerate}[a)] % a), b), c), ...  \item \textbf{Lorem ipsum 1?}  \lipsum ...  \item \textbf{Lorem ipsum xxx?}  \lipsum  \end{enumerate} \end{document}   As you can see in the attached image, the item does not use a new page even if it does not fit as a whole on the actual page. How can this be changed?    Picture:

I'm writing a document with lots of numbered items, and I would like each of those items to be contained on a single page (rather than split across two pages). Is there a way to do this? samepage doesn't seem to work.  For example, if the following two items were too big to fit on the same page, I would like item 2 to move to the next page:  \begin{enumerate}  \item Blah blah blah ... ...  \item More babbling ... ...  \end{enumerate}


I was just tying to understand what is happening when I write a=c; when I checked type of "a" it is showing up as class "C". Now my question here is if "a" is pointing to "c" then why it is not behaving like pointer "c".  class Program     {         static void Main(string[] args)         {             C c = new C();             A a = new A();             Console.WriteLine(a.GetType());             a = c;             Console.WriteLine(a.GetType());             a.Show();             c.Show();             Console.ReadLine();         }     } class A {     public virtual void Show()     {         Console.WriteLine("A.Show()");     } }  class B : A {     public override void Show()     {         Console.WriteLine("B.Show()");     } }  class C : B {     public new void Show()     {         Console.WriteLine("C.Show()");     } }  Output:

What are differences between declaring a method in a base type "virtual" and then overriding it in a child type using the "override" keyword as opposed to simply using the "new" keyword when declaring the matching method in the child type?


I have a launcher like this with a couple of locked items:     I use this feature a lot to use Super+[0-9] to quickly access recurring apps. Now if I open a new application the icon is inserted between the first and the second locked icon instead after all locked items. Say I open Thunderbird over Unity search:     Now it's inserted at position 2 which obviously breaks my Super+Num keys for any following locked item. The only thing to work around this would be to lock this icon as well, but that's not what I want to do. Standard behaviour anywhere else I know (Windows, MacOS) is that unknown apps are appended after all locked items.   Any help would be appreciated.

After I update my ubutu to 16.04, I got a problem with Unity launcher. Whenever I open an application which is not listed in launcher, it will take the third position instead of last position. Has anyone the same problem?


Just like the title says, I am getting a null pointer exception whenever I try to call the iterator from my driver. The error points to this specific location in my class:    public Iterator<E> iterator() {     return new IteratorHelper(); }      class IteratorHelper implements Iterator<E> {     private int iteratorIndex;     private long modCheck;     Node<E> current;      public IteratorHelper() {          iteratorIndex = 0;         modCheck = sequenceNumber;         current = head;     }      public boolean hasNext() {         if (modCheck != sequenceNumber)             throw new ConcurrentModificationException();         return iteratorIndex < currentSize;     }      public E next() {         if (!hasNext() && current != null)             throw new NoSuchElementException();         iteratorIndex++;         current = current.next;         return current.data; //NPE <<<<<<<<<<     }      public void remove() {         throw new UnsupportedOperationException();     } }   }  Why am I getting a NPE?

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


I have created a model and accidentally it overlap 3 times. How can i delete the overlap or duplicate mesh that created accidentally and get my single piece model. I tried Shift+L --> object Data but cant find. Manually deleting takes much time.    Any addon or way to delete the duplicate model overlap 3 times. Suggestion or help. Thanks

I have a model with hundreds of mesh objects. Unfortunately I clicked shift+D to duplicate many and did not notice. Later after working a while, I was rendering, and noticed there are double meshes overlapping each other.   How can I find all duplicate meshes and delete them. I could do it manually,  just clicking,  but it would take a long time and if I miss something i will not notice.   Is there any option,  or can anybody suggest to me,  how can I find all duplicate mesh and delete them.  Model with all double (duplicate) mesh  Final Result


I'm new to JFrame buttons and I have two JButtons. The one with Submit works but when I try to use the other with a specific name it doesn't output a string into the console. In the end the second JButton (btn) will have different names but when clicked on the button doesn't do anything.  package schoolprgm;  import java.awt.Dimension; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Arrays;  import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.WindowConstants;   public class Jeopardy extends JFrame  {   static JButton btn = new JButton();static JButton Submit = new JButton(); static JFrame frame = new JFrame("Jeopardy");static JPanel panel = new JPanel(new GridLayout(7,5,10,10)); static JTextField textField = new JTextField(10); public  Jeopardy(){       frame.setDefaultCloseOperation(3);     frame.setVisible(true);      Submit.addActionListener(new ButtonListener());      btn.addActionListener(new ButtonListener());  }  public static void main(String[] args) {     // TODO Auto-generated method stub        frame.setPreferredSize(new Dimension(1000,400));            frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);          int Score = 0;        JLabel l2 = new JLabel("Score: "+ String.valueOf(Score));        JLabel l3 = new JLabel();        ArrayList question = new ArrayList();         JLabel l = new JLabel("Question: "+ question);          Jeopardy.Submit.setText("Submit");          l.setLabelFor(textField);          /*label1.setText("Label1");          panel.add(label1);         panel.add(label2);         panel.add(label3);         panel.add(label4);         panel.add(label5);         panel.add(label6);         *///panel.add(label7);           String words = ("Category 1,Category 2,Category 3,Category 4,Category 5,Category 6,Category 7,C1: 100,100,100,100,100,100,100,200,200,200,200,200,200,200,300,300,300,300,300,300,300,400,400,400,400,400,400,400,500,500,500,500,500,500,500,999,999,99,999,999,999,999,999,999,999,999,999");         ArrayList btnnames = new ArrayList();         String[] words2 = words.split(",");         btnnames.addAll(Arrays.asList(words2));       frame.add(panel);         for(int x=0;x<42;x++){              if( x >= 0 && x<=6){                 JLabel label = new JLabel(String.valueOf(btnnames.get(x)));                 panel.add(label);                 label.setText(String.valueOf(btnnames.get(x)));             }             else{            btn = new JButton(String.valueOf(btnnames.get(x)));           Jeopardy.btn.setText(String.valueOf(btnnames.get(x)));             panel.add(btn);         }}           panel.add(l);         panel.add(textField);         panel.add(Submit);         panel.add(l2);         panel.add(l3);            frame.setContentPane(panel);         frame.pack();         frame.setVisible(true);         frame.setResizable(false);      frame.getContentPane().add(new Jeopardy());  }   }  class ButtonListener implements ActionListener { @Override     public void actionPerformed(ActionEvent e) {        if (e.getActionCommand()=="Submit"){         System.out.println("submit");         System.out.println(Jeopardy.textField.getText());      } if (e.getActionCommand()==("C1: 100")) {       System.out.println("100 has been clicked");     }       } }

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


When you are given access to a feat without needing to meet the prerequisites for the feat, do you actually get to use that feat regardless of the prerequisites?  For instance the magus archetype  gives me  which has a requirement of dex 13, so it gives me the feat, but if my dex is under 13 do I gain that dodge bonus to AC or do I just have a feat which is doing nothing?

The Dervish of Dawn gains the Feat Dervish Dance as a bonus feat at level 1. This feat has the following prerequisites: Weapon Finesse, Perform (dance) 2 ranks, proficient with scimitar. Which I can obviously cannot fulfill on level 1. Can I now us this feat without the prerequisites or do I have to wait till I fulfill them and can use the feat afterwards?


It would be good to be able to view SO using light text on dark background.  The use case is evening or night on a mobile device when you don't want alert your significant other that you're lurking on SO, which has quite distinctively bright, mostly white pixel, pages.  It may also reduce battery use.

Each Stack Exchange site should provide users the option of using a dark mode design/theme.  Why is this feature missing?  The major IDEs are already a letdown regarding dark color schemes.


Showing $\mathbf Q(\sqrt2,\sqrt3)=\mathbf Q(\sqrt2+\sqrt3)$   BUT I want to show this using The Theorem of the Primitive Element,       So I have to verify that $c$ cannot be $1$ and I need the $\mathbf Q$-monomorphisms, what are these ?

Is $\mathbf{Q}(\sqrt{2}, \sqrt{3}) = \mathbf{Q}(\sqrt{2}+\sqrt{3})$ ?    $$\mathbf{Q}(\sqrt{2},\sqrt{3})=\{a+b\sqrt{2}+c\sqrt{3}+d\sqrt{6} \mid a,b,c,d\in\mathbf{Q}\}$$   $$\mathbf{Q}(\sqrt{2}+\sqrt{3}) = \lbrace a+b(\sqrt{2}+\sqrt{3}) \mid a,b \in \mathbf{Q} \rbrace  $$  So if an element is in $\mathbf Q(\sqrt{2},\sqrt{3})$, then it is in $\mathbf{Q}(\sqrt{2}+\sqrt{3})$, because $\sqrt{6} = \sqrt{2}\sqrt{3}$.  How to conclude from there?


Each time I update my lecture slides I have to remember to compile the overlay version (for me to aid my presentation) as well as a handout version (for the students to print and take notes on). Right now, I manually add or remove the "handout" options, i.e. I use  \documentclass[handout]{beamer}   for handouts and   \documentclass[]{beamer}   for overlays.  Can I just get the LaTeX compiler to do both in one run?

I publish a lot for science journals and some of them are very strict on the number of pages your manuscript will be, as usual the final version of the articles is double column but for review and stuff like that it is always ez to compile as single column.  My question is this, Is there a way to compile just one .tex file and get a Single column pdf and a double column one?  I read that this could be achieve by use of \write18 but I don't understand at all how  I guess must be something like this:  \documentclass[layout=onecolumn]{SomeJournalStyle} all the preamble  \write18{pdflatex "2Columnversion" Master.tex some script/modifier to change column layout at preamble }  \begin{document} . . . . . \end{document}


Is it possible to ask and answer to our question at same time ? In reading this :  It's Ok. But at the same time? I ask this because :  The askers answer his question at the same time (same date, hour, minute).

I showed up here to write a perfectly normal rant about misaligned pixels, and there's a big fat checkbox cluttering up the "Ask" page:    WHAT THE EEEEK IS THIS NEW ABOMINATION?


I am using Google as my search engine. It always wants to redirect to a location-specific search page. So you always have to set this. Chrome always opens new tabs in location specific Google. I want this always to be Google.com. How can can set the default page for each new tab?  To avoid confusion, I am not asking for start up page, but a page for each new tab.

I live in the UK, and whenever I visit google.com I am redirected to google.co.uk, but I want to see my website's rankings on the US version (I presume the results are different). Is there a way to do this?


When I open blender the body of the object has no color. How do I fix this.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


In the USER_TAB_PARITIONS, there is the attribute HIGH_VALUE, formatted TIMESTAMP' 2017-01-01 00:00:00'.  My problem: I want to convert HIGH_VALUE into a date with a simple query (without procedure, and HIGH_VALUE is as long stored).  So far I could transform it with that procedure:  set serveroutput on size 30000; DECLARE    CURSOR c1 IS    SELECT HIGH_VALUE, PARTITION_NAME    FROM USER_TAB_PARTITIONS    WHERE TABLE_NAME = 'MY_TABLE';     partition_date   VARCHAR2(100);    partition_name   VARCHAR2(1000);    date_val         DATE;    name_val         VARCHAR2(100); BEGIN    FOR c1rec IN c1 LOOP       partition_date := 'SELECT ' || c1rec.HIGH_VALUE || ' FROM DUAL';       partition_name := 'SELECT ' || c1rec.PARTITION_NAME || ' FROM DUAL';       EXECUTE IMMEDIATE partition_date INTO date_val;       DBMS_OUTPUT.PUT_LINE(date_val);       DBMS_OUTPUT.PUT_LINE(c1rec.PARTITION_NAME);    END LOOP; END; /   My question: Is there any possibility to do it without a procedure? For example like:  SELECT HIGH_VALUE, PARTITION_NAME FROM USER_TAB_PARTITIONS WHERE 1=1   AND TABLE_NAME = 'MY_TABLE'   AND HIGH_VALUE < sysdate-1;

I need to comparte the high_value which is of LONG  datatype to sysdate which is of DATE datatype. I need to fetch the partition names of all the partitions which is 90 days old. The code is some what like this.  declare        dt date;    time_to_stay number:=1; --CONFIGURE AS PER THE REQUIREMENT     begin     for x in (select partition_name , high_value, partition_position           from user_tab_partitions           where table_name = 'DEMO') loop    execute immediate 'select '||x.high_value||' from dual' into dt;            if to_date(dt) < sysdate-time_to_stay AND x.partition_position <>'1'     then execute immediate 'ALTER TABLE DEMO DROP PARTITION '|| x.partition_name|| ' UPDATE GLOBAL INDEXES';   This query executes but does not deletes the partitions. However I see that main issue is converison of   LONG   datatype of high_value to DATE  to make the comparision between high_value and sys_date.  How can I fix this?


Stack Overflow is very useful, and much of that comes from the code samples.   Yet again, I am having to scroll to the right to see all of the code in an answer I am looking at, while at the same there is a huge amount of whitespace at the left and right of my screen on a desktop.   Could the layout not take this into consideration and allow the code window more space?

Wondering whether SO/SU/SF/Meta could have an option for a 'wide page layout', for those of us with 1080p/1080i resolutions. The unused whitespace on both sides of the middle 'column' could be put to better use.


I have to prove the serial representation of: \begin{equation*} \int^1_0 x^x\,{\rm d}x=\sum^{\infty}_{n=0}\frac{(-1)^{n-1}}{n^n}. \end{equation*}  It obtains: \begin{equation*} x^x=\sum^{\infty}_{n=0}\frac{(f(x))^n}{n!}. \end{equation*}  The function $f(x)$ is continuous in $[0,1]$.

I need help with this exercise.  I need to prove $$\int_{0}^{1}x^{-x}\ dx=\sum_{n=1}^{\infty}n^{-n}$$  I think I should use some convergence theorem, but I'm stuck.  Thanks a lot!


Let $\Omega \subset \mathbb R^n$ be a smooth, bounded and open. Assume that $u=0$ if $u\in H^1(\Omega )$ and satisfies $$-\Delta u-u=0\quad \text{on }\Omega \quad \text{and}\quad \partial _\nu u=u=0\quad \text{on }\partial \Omega .$$ This property is know as unique continuation principle. Let $f\in L^2(\Omega )$ and assume that $v$ is a solution to $-\Delta v-v=f$ in $\Omega $. Prove $$\|v\|_{H^1(\Omega )}\leq C(\|f\|_{L^2(\Omega )}+\|v\|_{H^{1/2}(\partial \Omega )}+\|\partial _\nu v\|_{H^{-1/2}(\partial \Omega )}).$$  There is just things that I don't understand in the proof.    Proof : Assume by contradiction there exist sequences  $v_n\in H^1(\Omega)$ and $f_n\in L^2(\Omega)$ such that  $$\|v_n\|_{H^1(\Omega)}=1\quad\text{ and}\quad \|f_n\| _ {L^2(\Omega )}+\|v_n\| _ {H^{1/2}(\Omega )}+\|\partial _\nu v_n\| _ {H^{-1/2}(\partial \Omega )}\to 0.$$ By the Reileigh-Kondrashov compactness theorem there exists a weakly convergent subsequence of $\{v_n\}$ in $H^1(\Omega)$ such that $\{v_n\}$ converges strongly in $L^2(\Omega),$ i.e.,  $\nabla v_n\rightharpoonup \nabla v$ in $L^2(\Omega)$ and $v_n\to v$ in $L^2(\Omega)$ (after relabeling the subsequence). Multiplying the equality $-\Delta v_n-v_n=f_n $ by any function $\varphi\in H^1(\Omega)$ and integrating by parts we get   $$\int_\Omega \nabla\varphi\nabla v_ndx=\int_\Omega \varphi v_n+ \int_\Omega \varphi f_n+\int_{\partial\Omega}\partial_\nu v_n\varphi \ \ \ (1).$$  Sending now $n$ to infinity, the second and the third summand will go to zero by our contradiction assumption, thus we get by the weak convergence $v_n\rightharpoonup v,$  $$\int_\Omega\nabla\varphi\nabla v=\int_\Omega\varphi v \ \ \ \  (2).$$  On the on the other hand if we take $\varphi=v_n$ in (1) and let $n$ go to infinity we get $\|\nabla v_n\|^2\leq 2\|v_n\|^2$  for $n$ big enough. Now, (2) implies that  $$-\Delta v-v=0$$ in the weak sense. Also, by the definition of $H^{1/2}$ and $H^{-1/2}$ norms and the strong convergence $v_n\to v$ we get  $$\|v\| _ {H^{1/2}(\partial \Omega)}=\|\partial_\nu v \| _ {H^{-1/2}(\partial\Omega)}=0,$$  Question 1 : I don't understand how we get $\|v\| _ {H^{1/2}(\partial \Omega)}=\|\partial_\nu v \| _ {H^{-1/2}(\partial\Omega)}=0.$ The thing I know is that $\|v\|_{H^{1/2}(\partial \Omega) }=\int_{\partial \Omega } \hat u(x)(1+|x|)^2dx$ and $\|\partial_\nu v\|_{H^{-1/2}(\partial \Omega )}=\sup_{\|\varphi \|=1}|\left<\partial _\nu v,\varphi\right>|$. So how do I get that those norms are $0$ ?  thus from the given unique continuation principle we get $v=0$ in $\Omega.$ From the strong convergence $v_n\to v$ we get $\|v_n\| _ {L^2(\Omega)}\to 0$, thus the inequality $\|\nabla v_n\|^2\leq 2\|v_n\|^2$ implies $\|v_n\| _ {H^1(\Omega)}\to 0$ which is a contradiction.   Question 2 : Why the inequality $\|\nabla v_n\|^2\leq 2\|v_n\|^2$ implies $\|v_n\| _ {H^1(\Omega)}\to 0$ ?

Let $\Omega $ be a smooth bounded subset of $\mathbb R^d$. Assume that $u=0$ if $u\in H^1(\Omega )$ and $u$ satisfies $$-\Delta u-u=0\ \ in\ \ \Omega \quad \text{and}\quad \partial _\nu u=u=0\ \ on \ \ \partial \Omega .$$  Let $f\in L^2(\Omega )$ and assume that $v$ is solution of $-\Delta v-v=f$ in $\Omega $. Prove that   $$\|v\|_{H^1(\Omega )}\leq C(\|f\|_{L^2(\Omega )}+\|v\|_{H^{1/2}(\partial \Omega )}+\|\partial _\nu v\|_{H^{-1/2}(\partial \Omega )})),$$ where $C$ is independent of $v$ and $f$.  My attempts  My attempts are unfortunately very few... I'm stuck on this problem since yesterday. I tried to make the substitution $w=v-u$, then $w$ is a solution of $\nabla v-v=f$, but it doesn't look to help a lot.


I know that the mathematically, p values should be uniformly distributed under the null hypothesis. However, what is this null hypothesis (in this context)?   Can someone give me an example please ?

Recently, I have found in a  a statement that p-values should be uniformly distributed. I believe the authors, but cannot understand why it is so.   Klammer, A. A., Park, C. Y., and Stafford Noble, W. (2009) . Journal of Proteome Research. 8(4): 2106–2113.


I would like to dissolve only polygons that are adjacent to one another.  Ultimately I would like to start with a raster representing landscape patches and delineate the separate patches.  Here is my example, drawing from the raster::rasterToPolygons function in R:  r <- raster(nrow=18, ncol=36) set.seed(999) r[] <- runif(ncell(r)) r <- r > 0.7 pol <- rasterToPolygons(r, fun=function(x){x==1}) pol.union <- rasterToPolygons(r, fun=function(x){x==1}, dissolve=T)  plot(r) plot(pol, add=T)  plot(r) plot(pol.union, add=T)   Without using the dissolve=T argument in rasterToPolygons, it returns a single polygon for each pixel where r==1 (189 polygons).  If I use dissolve=T it dissolves all of these into a single polygon.  What I want is something in between where each non-adjacent patch is it's own polygon (it would look like pol.union when plotted but would contain more than one polygon).  I believe what I want is to take pol and dissolve only the adjacent polygons.  I realize that this may require some input as to what is considered "adjacent" (i.e., whether only polygons sharing a boundary are considered adjacent or if polygons sharing a single point are considered adjacent).

I have several shp files which are the components (or tiles) of a map, I have joint all these tiles together to have a large shp file. Then I realized some of the polygon is now split into 2 halves, as the upper part belongs to a tile, while the lower part belongs to another tile.  This output disturbs me a lot as I need to fill some polygon, but not part of the "split polygon", so I need to find a way to merge these split polygon back to one (preferably mechanical way, as I have 10000+ polygons, not knowing which are split, which are not).  I need to know if the two or more polygons originate from the larger polygon. And I think I can somehow use union and spRbind to create an algorithm for this task. But I doubt if I am really the first one who encounters this problem, so I wonder if there is any existing tool in R that can solve this.  Thanks.


As an admin, I have the task to sync nearly 1 TB of multimedia data (jpg, tif, bmp images or pdf documents) with three partner over the internet and I'm asking how. Its nearly 500.000 single files in 50.000 folders I guess. I also have a 2 TB NAS in a datacenter for the data. I have tried different tools (usually freeware) to achieve this but none of them really worked.  I prefer the ftp protocol but nfs is also possible.  I tried FTPbox, but its crashing by the huge amount of data.   Most of the tools I tested (FreeFileSync, FTPbox, PureSync) are crashing or are really slow because of the many files to compare.  Nice would ne a dropbox like client (therefore I tested FTPbox) which can detect modified file by itself and updates them, but I guess even the dropbox client has his problems with the file amount.  Does someone know a tool to sync these huge amount of data?

I want to transmit a 1TB file over the internet. I have control over both machines (sender unix, receiver linux). I can open FTP, OpenVPN, NFS, ...  So far resuming for some reason is not stable on FTP, so I cut the file in 1GB pieces and transmit file per file, then md5 on the other side. It's very annoying.  I have between 3 and 6 mbytes/sec to the other site. Which is a pretty decent speed.  I want it to be safe and I want resuming if it fails. I tried NFS - no resuming.  Is there a cleaner, safer way?


What was the spell with purple flame used by Dolohov on Hermione during the Battle at the Department of Mysteries in Order of the Phoenix? If Dolohov hadn't been silenced, would it have killed her?

The spell was cast without words, simply a flick of the Death Eater's wand, and a 'streak of purple flame' that lanced across her chest. It was later mentioned that the spell was weakened because of the lack of a verbal component, but still 'did enough damage as it was'. She was in the infirmary healing from the damage for some time. What spell was this?


I understand that I have to use apostrophes with bachelor's degree and *master's degree. Here is a good reference   However, after talking with native English speaker, I'm not sure what happens when I have both degrees in the same sentence:  I know this is correct: "He earned his bachelor's degree and master's degree from ...". However, can I have a shorter form as "He earned his bachelor's and master's degrees from ..."? Note the apostrophes 's and plural for degree.  Is it the same thing if the other degree is doctoral, for example "He earned his bachelor's and doctoral degrees from ..."

The question asks it all really. When referring to a master's degree, do you use an apostrophe or not? That is, is it "a master's" or "a masters"?


I was refused a UK visitor visa in April. Before that, I had been in and out of the UK twice, and I also schooled in the UK (MSC) and graduated without any dirt to my name. I never had any immigration problems either. I was scheduled to resume a PhD course in September 2017, but had to move it foward to March 2018 due to civil unrest where I live.   Since I was doing nothing at home, my parents decided to sponsor a one week trip back to the UK as I had made plans with my friends already. I went to the UK in October 2017. My parents and I decided I should stay a while longer, as I had a 6-month visa, to look for a house, do some shopping for school and prepare for my PhD program. I left my country with cash, £2000, and had additional money in my bank account. I returned home in January 2018, to discover my dad had a terminal illness, and he asked that I shift my resumption to September 2018, so I could start work in his company and learn the ropes, in case anything happens.   I called my supervisor, and shifted my admission to September 2018, even though I had paid tuition. Three months after I started work, I was to take on my first leave from work. Again my parents agreed to sponsor my trip to the UK, as there were couple of concerts I wanted to attend, and I also wanted to see my friends and to pick some of my stuff that I left in storage.   I was refused a visa, citing the fact that I stayed more than 7 days over my last visit, even though it is not a crime and I was well within my visa. As always, my parents sponsor my trip, this time, he had his accountant transfer money to my account, but they complained that the money did not come directly from my sponsor's account.  When it was time to resume in October 2018, my university asked me if I had ever been refused a visa and I said yes. They did some immigration checks and withdrew my PhD offer, without giving a reason.   The university apologised for the withdrawal and promised it does not affect my chances with another university. They are prepared to issue me a refund, but is it pointless applying to school in the UK because of a refusal? Should just apply to another country? I already applied to a couple of schools, but I am scared they won't admit me if they find out I have been refused a visa. I don't know how to defend myself as I have my bank statement showing all of my withdrawals and account credit while I was in the UK.

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?


I am printing my QGIS Print Composer maps in black and white, and I want to make sure that all the different attributes are distinguishable. But I can't select 5 colors that all look distinct from each other in black and white. Is there any way to add like a striped texture or a dotted texture into the QGIS print composer?

I am looking to replicate black & white maps in QGis, using hatching patterns and greyscales to indicate different categories of a continuous variable (example below).  It is possible/straightforward to do so in QGis? At first sight I only see color gradients and symbol fills.   ).


Usually we manage constants in interfaces. e.g.:  public interface CommonConstant {     int A_TYPE1=0;     int A_TYPE2=1; }   But I'm thinking that if the constant belongs to a class, we may just put it into that class? e.g.:  public class A {     public enum Type {         TYPE_ONE(0),         TYPE_TWO(1);          public final int val;         Type(int val) {             this.val = val;         }     }      private int type;     ... }   So which way should be better?

I'm looking at some open source Java projects to get into Java and notice a lot of them have some sort of 'constants' interface.  For instance,  has an interface called , and most other core classes implement this interface. The interface is riddled with static members. Is there a reason for this approach, or is this considered bad practice? Why not use enums where it makes sense, or a static class?  I find it strange to use an interface to allow for some sort of pseudo 'global variables'.  public interface PConstants {    // LOTS OF static fields...    static public final int SHINE = 31;    // emissive (by default kept black)   static public final int ER = 32;   static public final int EG = 33;   static public final int EB = 34;    // has this vertex been lit yet   static public final int BEEN_LIT = 35;    static public final int VERTEX_FIELD_COUNT = 36;     // renderers known to processing.core    static final String P2D    = "processing.core.PGraphics2D";   static final String P3D    = "processing.core.PGraphics3D";   static final String JAVA2D = "processing.core.PGraphicsJava2D";   static final String OPENGL = "processing.opengl.PGraphicsOpenGL";   static final String PDF    = "processing.pdf.PGraphicsPDF";   static final String DXF    = "processing.dxf.RawDXF";     // platform IDs for PApplet.platform    static final int OTHER   = 0;   static final int WINDOWS = 1;   static final int MACOSX  = 2;   static final int LINUX   = 3;    static final String[] platformNames = {     "other", "windows", "macosx", "linux"   };    // and on and on  }


As far as I know, it is possible to freely travel inside the Schengen zone with visa D of some EU country, using 90/180 rule (up to 90 days in 180 days). However, I have the following question: I have a study Swiss National visa, and would like to shortly visit my relative in Germany before start of my studies. However, I am worried about two things (in which this case differ from ones, which I found to be already discussed here):   Although Switzerland is included in Schengen, it is not part of EU, so I am not completely sure if the same rules applied to Swiss National visa. Usually people enter other EU countries after they entered country which issued visa, and have registered there. So would it be a problem to enter Schengen via Germany, stay there for a week, and then from there go to Switzerland? Instructions from swiss embassy say "It allows you to travel to Switzerland; transiting other Schengen States is possible", from which it is clear that I can enter through Germany, but not clear, whether I can stay there for a week. I am worried, that at German border I can be asked to show my tickets to Switzerland, and the fact that the flight would be in a week from my entrance to Germany, could be a problem.   I would appreciate advise, if anybody had some similar issue before.

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?