My MacBook Air's internal keyboard and Trackpad have stopped working. To be honest, she had a bit of a fall about 2 weeks ago, about 3 feet onto carpet, it has worked fine ever since yesterday. I reset PRAM and SMC, no luck.   Works totally fine with external mouse and keyboard. How do I get it working again?

Recently the keyboard and trackpad on my 2015 13" MacBook Pro have stopped working. This is the second laptop to do this, the same issue happened about 6 months ago and Apple gave me a new one when they could not figure it out.  The issue usually starts with force touch not working then progresses to the keyboard and trackpad not being recognized at all. Currently the power button works and force touch works but all other keys and the trackpad don't work.  When this happens there are a lot of errors in the console regarding the AppleHSSPIController.  4/21/16 6:56:47.000 AM  kernel[0]   Error: AppleHSSPIDevice::start failed to get device descriptor 4/21/16 6:56:47.000 AM  kernel[0]   Error: AppleHSSPIController::_enumerateDevice Start failed 4/21/16 6:56:47.000 AM  kernel[0]   Error: AppleHSSPIController::_handleEnumerationFailureGated Giving up on device   You can see the full log here:


So I'm using a template I've found on latextemplates.com and I'm trying to print the bibliography but nothing seems to be working. Also no error warning appears, it just simply skips it.  \usepackage[backend=biber,style=authoryear,natbib=true]{biblatex}  \addbibresource{library.bib}  \begin{document}   some text bla bla bla \printbibliography[heading=bibintoc] \end{document}   I've changed the backend to every one I've found online: bibtex, biber and bibtex8.  And it seems that every time I compile it creates a *.bib file automatically.   What can I do?

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


Let $f:[a,b]\rightarrow\mathbb{R}$ be continuous on $[a,b]$ and differentiable on $(a,b)$. Show that if $\lim_{x\rightarrow a}f'(x)=A$, then $f'(a)$ exists and equals $A$. Use the definition of $f'(a)$ and the Mean Value Theorem.  Definition of a derivative:  Let $I\subset\mathbb{R},f:I\rightarrow\mathbb{R}$, and $c\in I$. We say $L$ is the derivative of $f$ at $c$ if $\forall\varepsilon>0,\exists\delta>0$ such that if $x\in I$ and $0<|x-c|<\delta$, then $|\frac{f(x)-f(x)}{x-c}-L|<\varepsilon$. We say $f$ is differentiable at $c$ and denote it as $f'(c)=L$. We can say $f'(c)=\lim_{x\rightarrow c} \frac{f(x)-f(x)}{x-c} = L$  Mean Value Theorem:  Suppose $f$ is continuous on a closed intervale $I:=[a,b]$ and that $f$ has a derivative in the open interval $(a,b)$. Then there exists at least one point $c\in(a,b)$ such that $f(b)-f(a)=f'(c)(b-a)$  Quite honestly I do not see how I could make these two things work together. Also, if we simply replace $f'(x)$ with its limit definition we would have a limit inside of a limit, and I am not sure how to deal with that either.  Any help in pointing me in the right direction would be greatly appreciated.

Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h>0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is.


We wish to prove that $\gcd(a,b)=\gcd(a, b- k \cdot a )$, where $a,b, k$ are integers.   For any divisor $d|a$ and $d|b$ then we also have that for all integers $x,y$ we have $$d|(ax+by)$$ now let $x=-k$ and $y=1$ then $d|(b-ka)$. I still have to make the step to the gcd now, since I prove this for general divisors, is my proof also valid for the gcd? this only would mean that $d$ is the greatest such integer.

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


I'm not clear on how packages are included into the repos that apt-get queries.  For example, redshift is at v1.11, but the one that is installed via apt-get install redshift is 1.10.  Why is it using a verion that is over a year old, and how can I help to include the latest version?

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


A website can get information about your browser and system via several methods:    user agent,  javascript attributes (like navigator.platform),  profiling by testing avalaible browser features (Javascript API for example),  asking available browser plugins,  etc.    This website shows some of these:    At least, I would like to know how to spoof the user agent and javascript attributes so that the website cannot detect my OS. I did it once by patching Chromium source code, but I'm looking for an easier way.   I'm interested in solutions for Chromium (Chrome) and/or Firefox.

I'm using Chromium (Version 30.0.1599.114 Ubuntu 12.10) under Linux. I'm trying to access  that claims that it doesn't work under Linux. Of course, this is most likely crazy since the web is platform-independent (unless they're using some kind of evil plug-in).  I've used a user agent switcher to supply a Windows user agent, but to no avail. Upon viewing the source, it appears that the site is using Javascript to determine the operating system. I'm looking for a way to get my browser to report in Javascript that it is Windows or MacOS.  Do you know how to do it?


I'm studying exam class to generate question paper sample tex file is mentioned below:   \documentclass[addpoints,answers,10pt]{exam} \usepackage{multicol} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{tabularx} \usepackage{nonfloat} \usepackage{lmodern} \usepackage{textcomp} \usepackage{ifpdf} \usepackage[export]{adjustbox} \begin{document}   \begin{multicols}{2} \begin{questions} \question[4] Question  \begin{choices} \choice Option A \choice Option B \choice Option C \choice Option D  \end{choices} \end{questions} \end{multicols} \end{document}   How Can I Start question with , question id in circle ; something mentioned in the image below?

I'm using the exam document class for an exam with a multiple choice section. To match the appearance of the scantron form, I'd like to use circled numbers in the choices and oneparchoices environments. I've got it working for the choices environment, but it's not working for the oneparchoices environment.  Below is a minimal working example. Any suggestions?  \documentclass{exam} \usepackage{pifont} \renewcommand\choicelabel{\thechoice} \renewcommand\choiceshook{   \addtocounter{choice}{191}  } \renewcommand\thechoice{\ding{\arabic{choice}}} \begin{document} \begin{questions}  \question With the choices environment this \begin{choices}     \choice  does     \CorrectChoice  work     \choice nicely  \end{choices}  \question With the oneparchoices environment this     \begin{oneparchoices}     \choice does      \CorrectChoice not           \choice work  \end{oneparchoices} \end{questions} \end{document}


Is there log which record the operation of files in linux. Just like, if some users rename or delete or add some files, can root user see the records of the operations. Do these logs exists in linux.  Thx

I'm looking for a simple method that will log file system operations. It should display the name of the file being accessed or modified.  I'm familiar with powertop, and it appears this works to an extent, in so much that it show the user files that were written to. Is there any other utilities that support this feature.  Some of my findings:  powertop: best for write access logging, but more focused on CPU activity iotop: shows real time disk access by process, but not file name lsof: shows the open files per process, but not real time file access iostat: shows the real time I/O performance of disk/arrays but does not indicate file or process


On testing the code    #include <stdio.h>   int main()  {      char a[5][3];       printf("a = %p\n", a);      printf("&a[0] = %p\n", &a[0][0]);      printf("&a = %p\n", &a);      printf("*a = %p\n", *a);       return 0;   }   it get compiled and giving the output with C mode ():    a = 0xbfd8ea51 &a[0] = 0xbfd8ea51 &a = 0xbfd8ea51 *a = 0xbfd8ea51   While compiling it with strict C99 mode (), it results in compilation error:    prog.c: In function ‘main’: prog.c:7:10: error: format ‘%p’ expects argument of type ‘void *’, but argument 2 has     type ‘char (*)[3]’ [-Werror=format] prog.c:9:10: error: format ‘%p’ expects argument of type ‘void *’, but argument 2 has    type ‘char (*)[5][3]’ [-Werror=format] cc1: all warnings being treated as errors   Isn't the above code is valid in C99?

I was trying to understand something with pointers, so I wrote this code:  #include <stdio.h>  int main(void) {     char s[] = "asd";     char **p = &s;      printf("The value of s is: %p\n", s);     printf("The direction of s is: %p\n", &s);      printf("The value of p is: %p\n", p);     printf("The direction of p is: %p\n", &p);      printf("The direction of s[0] is: %p\n", &s[0]);     printf("The direction of s[1] is: %p\n", &s[1]);     printf("The direction of s[2] is: %p\n", &s[2]);      return 0; }   When compiling it with gcc I get these warnings:  $ gcc main.c -o main-bin -ansi -pedantic -Wall -lm main.c: In function ‘main’: main.c:6: warning: initialization from incompatible pointer type main.c:9: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘char (*)[4]’ main.c:11: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘char **’ main.c:12: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘char ***’   (The flags for gcc are because I must be C89)  Why incompatible types of pointer? Isn't the name of an array a pointer to it's first element? So if s is a pointer to 'a', &s must be a char **, no? And why do I get the other warnings? Do I have to cast the pointers with (void *) in order to print them?   And when running I get something like this:  $ ./main-bin The value of s is: 0xbfb7c860 The direction of s is: 0xbfb7c860 The value of p is: 0xbfb7c860 The direction of p is: 0xbfb7c85c The direction of s[0] is: 0xbfb7c860 The direction of s[1] is: 0xbfb7c861 The direction of s[2] is: 0xbfb7c862   How can the value of s and it's direction (and of course the value of p) be the same?


Which is correct?     None of us are getting out of here alive.   or     None of us is getting out of here alive.

I was asked if the following sentences will create problems and what are the assumptions I have to make:  (d) There are grammarians in the room but none of them is an American. (e) There are grammarians in the room but none of them are Americans.  What is the problem in both sentences? They clearly have two main clauses which are connected by the coordinated conjunction 'but'. I know that grammar-wise, the 'is/are' don't really matter since both can be used with 'none', but would the tense in the first main clause 'are' affect the use of 'none'?


I started like this :  $a^2+c^2=b^2(a^2-1)\\c^2 +1=(a^2-1)(b^2-1)$  but it's leads to nowhere. can you help please ?

Find all integer solutions of the equation $a^2+ b^2 + c^2=a^2 b^2$.  This is one of the questions we presented in one session to contest preparation PUTNAM. It turns out that I can't get from the problem. Could someone just give me a hint? (Please, don't give me the answer. Simply, an argument that can help me advance in the problem or theorem might suffice.)


Wrote C program to generate random 2D array of to represent adjacency matrix of for non-directed graph,  It works fine when V is smaller or equal to 700,  Once exceed, it crashes during run-time  Any specific reason? any modification can be made so that it could possibly generate bigger matrix?  #include <stdio.h>  #include <stdlib.h> #define V 700 int main(){      //CREATE FILE     char v[4] = {'7','0','0','\0'};      FILE *fPointer;      fPointer = fopen ("adjMatrix.txt","w");     fprintf(fPointer,v);     fclose(fPointer);       int graph[V][V];      int i;     int j;      for (i=0;i<V;i++)     {         for(j=0;j<V;j++)         {             if(i==j)             {                 graph[i][j] = 0;             }             else             {                 graph[i][j] = rand()%10;                 graph[j][i] = graph[i][j] ;             }         }     }       //append file     fPointer = fopen ("adjMatrix.txt","a");      for (i=0;i<V;i++)     {         fprintf(fPointer,"\n");         for(j=0;j<V;j++)         {             fprintf(fPointer,"%d ",graph[i][j]);         }     }       fclose(fPointer);     return 0;  }

The following code is generating a stack overflow error for me  int main(int argc, char* argv[]) {     int sieve[2000000];     return 0; }   How do I get around this? I am using Turbo C++ but would like to keep my code in C  EDIT:  Thanks for the advice.  The code above was only for example, I actually declare the array in a function and not in sub main.  Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes.  Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable.


I DM a group of four PC's and even "easy" battles take at least an hour to resolve. Normal encounters take even longer! I want to speed up combat so my players can do more in a session.  I've been trying a lot to speed up combat, we are already using:   Initiative cards that the players keep up 30 second bonus rule: if someone take his turn within 30 seconds, he receives a token. This token can be used to give a +1 on attack or damage, after rolling. Completely removed healing surges Checked all character sheets, they are roughly equal Roll damage and attack at the same time   I even introduced an experienced player, which helped my party to play more strategic, but speed hasn't improved.  Also the party is Lv 8, nearing Lv 9.  This is not an issue of the DM's turn taking too long. My turns take about 60 seconds tops. The 30 second rule helps a lot, most of the the players turns are within or near 30 seconds.   The major issue appears to be the sheer number of rounds, averaging on 25-30 rounds needed to resolve even a "normal" encounter.  What can I change to resolve combat faster?  I'm looking for both 4e solutions, system agnostic and home brew solutions.

I'm DMing for a campaign where the player characters will sometimes face small squads of creatures, most recently six ground troops and two archers helping out. In this setting, these creatures dominate the land the PCs are in and have an organised military, hence squads of enemies.  Combat tends to go quite slowly, however. Eight enemies and three players means the players spend a lot of time waiting between their turns!  Without reducing the number of enemies in the encounter, how can I speed up combat when the players are fighting many enemies?


The opposite category of C is defined by setting hom(x,y)=hom(y,x) for all objects x,y of C. However in a concrete category, morphisms do not always have inverses (because functions don't always have inverses). So I am wondering how it is possible to always construct a reversed arrow for a given arrow and whether or not it is always possible to construct the opposite category.  Edit: Thank you for the responses and references I think I understand the main part of the question. As I understand it, when you construct the opposite category you forget all the meaning that the objects and morphisms have and reverse the arrows only in terms of classes of objects and sets of morphisms. One question I have is this. When you say a statement about a category you get the dual statement for "free" because the proof also applies in the opposite category. Do you only get things for free when your are talking about types of categories and not specific categories. For example in the category of groups, products always exist but coproduction do not.

Given some category ${\mathcal C}$, then the opposite category will consist of the same objects with the morphisms "turned around."  Given $f:A\rightarrow B$, for $A,B$ objects of ${\mathcal C}$, then in general do we have a canonical $f^{op}:B\rightarrow A$ which is induced by $f$?    Slight Motivation:  This is something that's just been bothering me recently, and I feel like I am thinking about this concept incorrectly.  To make this question slightly less vague, if we had, say, the category of rings and we had the mapping $f:{\mathbb Z}\rightarrow {\mathbb Z}/2{\mathbb Z}$ by $f$ sends even numbers to 0 and odd numbers to 1, then what is the corresponding map in the opposite category, $f^{op}:{\mathbb Z}/2{\mathbb Z}\rightarrow {\mathbb Z}$ induced by $f$?  Also, I always see this $f^{op}$ that I've mentioned just written as $f$; is this shorthand, or is there something deeper there?


I have a code like that:  SELECT .... FROM .... LIMIT (SELECT COUNT(*) FROM ...)   How do I get the SELECT in LIMIT to be a number?

I am writing a stored procedure where I have an input parameter called my_size that is an INTEGER. I want to be able to use it in a LIMIT clause in a SELECT statement. Apparently this is not supported, is there a way to work around this?  # I want something like: SELECT * FROM some_table LIMIT my_size;  # Instead of hardcoding a permanent limit: SELECT * FROM some_table LIMIT 100;


I'm a little confused with the meaning of a statistically significant result. Does statistically significant just mean it's a phenomenon worth exploring given that there is a high likelihood of seeing a value as extreme as the observed value? And we should do further tests to understand the phenomenon?

According to Wikipedia,  A result has statistical significance when it is very unlikely to have occurred given the null hypothesis  does that mean if our alternative hypothesis is true we will call our results "Statistically Significant"? which certainly shouldn't be the case.


So far I have combined the fractions to get $ \ (3n^5 + 5n^3 +7n)/15 \ $ and that is equal to $[n(3n^4 + 5n^2 + 7)]/15$. So I need to show that $15\mid n(3n^4 + 5n^2 + 7)$.  Case 1: 15 divides $n$. Then we are done.  Case 2: 15 does not divide n. Then I need to show that $15\mid(3n^4 + 5n^2 + 7)$. This is where I am stuck. Can someone please tell me if I am going in the right direction or if I need to do it a different way?

Using congruences, show that the following is always an integer for every integer value of $n$: $$\frac{1}{5}n^5 + \frac{1}{3}n^3 + \frac{7}{15}n.$$


Let $W$ be a standard, one-dimensional Brownian motion and $0 < T < \infty$. Show that  $$\lim_{\beta \to \infty} \sup_{0\leq t \leq T} |e^{-\beta t }\int_0^t e^{\beta s } dW_s| = 0$$ a.s.

How to show that  $$ \lim _{\alpha \rightarrow \infty } \sup_{t \in \left [0,T \right]} \left | e^{-\alpha t} \int _ 0 ^t e^{\alpha s} ~ dB_s \right | =0, \ \ \text{a.e.} $$  where $\left (B_s \right)_{s\geq 0}$ is a real standard brownian motion starting from zero ?


Given that there are two complex numbers - $z, w$ - such that $w\overline{w} = 1$ and $z = \frac{1+w}{1-w}$, how do I deduce that $z$ lies on the imaginary axis?

If $|z|=1$, show that: $$\mathrm{Re}\left(\frac{1 - z}{1 + z}\right) = 0$$   I reasoned that for $z = x + iy$, $\sqrt{x^2 + y^2} = 1\implies x^2 + y ^2 = 1$ and figured the real part would be:  $$\frac{1 - x}{1 + x}$$  I tried a number of manipulations of the equation but couldn't seem to arrive at any point where I could link the two to show that the real part was = 0.


I've installed a command called gsutil on my Ubuntu VM with the command           sudo snap install google-cloud-sdk --classic   However, when running gsutil I started an unrelated existing program of the same name (GSutil, a GrandStream BudgeTone phone backup, restore and reboot utility), which was stored in usr/bin/gsutil. Following advice from  I ran   sudo dpkg --purge gsutil   which removed it. But now when I run gsutil I get  -bash: /usr/bin/gsutil: No such file or directory   With which gsutil I get  /snap/bin/gsutil   And I tried to make a symlink with  ln -s /snap/bin/gsutil gsutil   but still get the same results. Why can't bash find it? Both locations are in my PATH:   echo $PATH  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

I uninstall codeblocks via these commands (Ubuntu 14.04):  sudo apt-get autoremove codeblocks sudo apt-get --purge remove codeblocks   After that I run:  $ codeblocks bash: /usr/bin/codeblocks: No such file or directory   That means codeblocks is still stored in a PATH somewhere.  So I have a few Qs:   Is the way I used the correct way to safely uninstall everything of codeblocks? If so, why the path is still there (isn't it part of the uninstalling process to remove the path as well)? Where is the file that I can manually remove that obsolete path?   Thanks.


I have a small file hosting website that I am trying to store the files that users upload in a database. The issue that I am having is that I cannot decide which method would be better:   To store all users in one table  create a new table for each user.    I understand that the second method will slow performance but by how much? I am planning on having 1000+ users eventually. The issue with the first method is listing the files back to the user. What method should I go with and which one would be the most efficient?

I'm creating a user-based website. For each user, I'll need a few MySQL tables to store different types of information (that is, userInfo, quotesSubmitted, and ratesSubmitted).  Is it a better idea to:  a) Create one database for the site (that is, "mySite") and then hundreds or thousands of tables inside this (that is, "userInfo_bob", "quotessubmitted_bob", "userInfo_shelly", and"quotesSubmitted_shelly")  or  b) Create hundreds or thousands of databases (that is, "Bob", "Shelly", etc.) and only a couple tables per database (that is, Inside of "Bob": userInfo, quotesSubmitted, ratesSubmitted, etc.)  Should I use one database, and many tables in that database, or many databases and few tables per database?    Edit:  The problem is that I need to keep track of who has rated what.  That means if a user has rated 300 quotes, I need to be able to know exactly which quotes the user has rated.  Maybe I should do this?  One table for quotes. One table to list users. One table to document ALL ratings that have been made (that is, Three columns: User, Quote, rating).  That seems reasonable. Is there any problem with that?


I found some weird things about Javascript. For instance when I run in a node Shell (by just typing node) there are some statements that I do not understand.      > [] + []     ''                           (because [] is converted to an empty string ?)     > {} + []     0                            (why 0 ?)     > x = ['10', '10', '10']     (this is ok)     ['10', '10', '10']     > x.map(parseInt)     [ 10, NaN, 2 ]               (really weird)   I would like to know how Javascript works under the hood to understand why I get those results (especially the last one)

From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]


input: L = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] How to concatenate every 4th occurrence in a list using for loop. Explanation1: [0+4+8,1+5+9,2+6+10,3+7+11] like this and my final out put should be Output: [12,15,18,21]

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Is there software that allows the webcam to be used as a camera?  I'm using Ubuntu 12.04 desktop.  Thanks!

What software options are there for taking videos and or pictures within Ubuntu (Much like Apple's Photobooth)?  Please limit one software solution per answer and include key features/description of the software


I made two functions which count punctuations in a text file. These punctuations are comma, apostrophe, hyphen and semi-colon. Counting comma and semi-colon is quite straight forward, but counting apostrophe and hyphen is a little bit more complicated as there are certain rules I must follow (according to my assignment) e.g. I can only count an apostrophe if it is between two letters like in shouldn't, won't etc. So I split this task up into two functions: countpunc1() and countpunc2().   At the end of both of these, I return a dictionary that has the count of these punctuations.   Then in the function main(), I want to be able to return a dictionary that has both the results from countpunc1 and countpunc2 combined into one key: punctuations.   Example shown at the bottom.  Here is my code:   def countpunc1(text):      for ch in '0123456789abcdefghijklmnopqrstuvwxyz!"#$%&()*+./:<=>?@[\\]^_`{|}~-':         text = text.replace(ch, '')     words = text.replace('--', '').replace("'", '').split()            wordlist = list(words)      dictToReturn = {}     punctuations = [',', ';']      punclist = list(i for i in wordlist if i in punctuations)       for x in range(len(punctuations)):         dictToReturn[punctuations[x]] = dictToReturn.get(x,0)     for p in punclist:         dictToReturn[p] = dictToReturn.get(p,0) + 1      return dictToReturn   def countpunc2(text):     for ch in '!"#$%&()*+./:<=>?@[\\]^_`{|}~':         text = text.replace(ch, ' ')     words = text.replace('--', ' ').split('\n')         wordlist = str(words)      punctuations = "'-"                dictToReturn = {}     letters = "abcdefghijklmnopqrstuvwxyz"     for i, char in enumerate(wordlist):         if i < 1:             continue         if i > len(wordlist) - 2:             continue         if char in punctuations:             if char not in dictToReturn:                 dictToReturn[char] = 0             if wordlist[i-1] in letters and wordlist[i+1] in letters:                 dictToReturn[char] += 1      return dictToReturn  def main(text):     text = open(text, 'r').read().lower()     profileDict = {}     # profileDict[punctuations] = ??     return profileDict   In the second last line above that is commented, I tried doing things like:  profileDict[punctuations] = countpunc1(text) + countpunc2(text)  and   profileDict[punctuations] = countpunc1(text).items() + countpunc2(text).items()  Clearly all of these are wrong and I get an TypeError: unsupported operand type(s).   Expected result is something like this:  E.g:  dict[punctuations] = {",": 9, "'" : 0, ";" : 4, "-" : 11}  PS. the function themselves work fine as I tested them on multiple text files.

I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.)


This error started randomly after making a change in my program. There are no errors being diplayed by Netbeans.   I've encountered random errors in Netbeans 8.2 before that were usually resolved by deleting the cache but I have deleted the cache, restarted Netbeans and still get the same error.   I performed a clean and build to no avail.    The program ran. I can still compile it and run it on a separate machine, but Netbeans keeps giving me this error:  Exception in thread "main" java.lang.NullPointerException at rss.RSSFeedParser.main(RSSFeedParser.java:157) ....\NetBeans\Cache\8.2\executor-snippets  \run.xml:53: Java returned: 1 BUILD FAILED (total time: 3 seconds)   run.xml line 53  <java classpath="${classpath-translated}" classname="${classname}" dir="${work.dir}" jvm="${platform.java}" fork="true" failonerror="${java.failonerror}">   Update: I was catching a "NumberFormatException" on my try catch. Netbeans threw no errors on this previously until all of a sudden. I changed it to "Exception". The program Runs fine, but I have a suggestion from Netbeans to change it back to "NumberFormatException". What gives here? I thought that as long as the required exceptions were caught, there would not be a problem.   Please see attached screen shots.

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 am travelling from India to Netherlands, and have Schengen visa for Netherlands. While returning from Amsterdam to Delhi,  India I have a flight layover at Frankfurt, Germany around 13.35 hours. Means from Amsterdam to Frankfort I will reach in around 2hours and there I have to wait for around 14hours then change my flight to come to Delhi via muscat.   Do I need a transit visa for changing flights (same

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


Thought of this to be a very basic issue which people would have definitely faced. But unfortunately, I couldn't find a solution for this after searching a lot.   I am using mysql command line client to run a query, and later on parse the output as per my requirement. By default, it returns output as tab separated. And some of the columns of the table have tabs in it.  Because of this, I am not able to parse it properly as the tabs in column data are not escaped. When I cut my output for tab, I get more columns then expected.  I will be using select * from table type queries. So replacing tab column wise in query is not an option.   Checked at mysql  for any available option but there doesn't seem to be any. Any way to solve this?

Is there an easy way to run a MySQL query from the Linux command line and output the results in  format?  Here's what I'm doing now:  mysql -u uid -ppwd -D dbname << EOQ | sed -e 's/        /,/g' | tee list.csv select id, concat("\"",name,"\"") as name from students EOQ   It gets messy when there are a lot of columns that need to be surrounded by quotes, or if there are quotes in the results that need to be escaped.


What are the differences between these sentences?     1) If I won the lottery, I would buy a house.      2) If I win a lottery, I will buy a house.      3) If I were to win a lottery, I would buy a house.      4) If I had won a lottery, I would have bought a house.

What is the difference between the three sentences:   If i were to play, i would win the match. (Depicts future tense) If i were to play, i would have won the match. (Depicts past tense) If i were there, i would have helped here. (Depicts Past)   My question is that how do we identify where the past subjunctive is being used and where the future subjunctive is being used?


As the tile says, I did a fresh install from a USB (LiveRecoveryCD). Now my system boots up with three mounted volumes (499 Mb, 10Gb, 10 Gb). Is this an issue? I did not create them when installing. Whenever booting up I get a "System error prompt" but everything seems to work alright. However I can't open the Ubuntu Software center. Any command I could use to diagnose/fix this issues? Thanks.    Very odd: seems as if everything from my system is scattered through the different partitions!          After running lsblk .

I am new user for Ubuntu and i use Ubuntu 16.04 LTS version. My problem is that I can not open software center. It can open before. After update and install some application, can't open software center.


Open ID is really a nice feature. But if i wish to change my email id there, Stack Overflow i guess considers it as a prime key and won't allow to change.  For instance i had used my company's mail id while signing up using google OpenId but now i wish to switch the account over to my personal email id. So that i can login using my personal email id.  Is there any way we can do so?

I have one SO login that is linked to a Google Apps Account. The thing is... I have a second Google Apps account and I would like to add it to My Logins but nothing I have tried has worked.  I've tried editing the email address on my login profile. It now shows the second Google App email address but when I click on the Google logo to login I still have to log in to Google with the first account for the fullOfGAS username to appear when I log in to SO.


#include <stdio.h> int main(){     int c[3]={1, 2, 3};     printf("%d, %d\n", c[2], 2[c]); }   The code gives 3, 3 as an output.  What happens when 2[c] is compiled? How does the compiler know the type of it? How does the syntax hold?

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


I have received my F1 visa already in Chile, but I would like to travel in the US for a couple months before the start of my program. My F1 visa only allows me to enter the US 30 days prior to my program start date, but as a citizen of Chile I am eligible to travel under the ESTA/Visa Waiver Program for 90 days. My question is if I can activate my F1 visa while in the US or if I must travel back to Chile and then back to

Here's my situation: I'm a UK citizen. I have an H-1B visa to work in the US as of 1 August. I also have a valid ESTA.  I would like to go to the US in July for a holiday, immediately prior to beginning my work. The holiday would be at the other end of the country from my work.  I can't enter with the H-1B as I can only enter the US on that visa 10 days prior to starting work.  Specific question: Would it be possible to visit the US in early July on the VWP, visit Canada/Mexico for a few days in late July, and re-enter the US with my H-1B visa?  General question: Is it possible to visit the US on the VWP, leave briefly, and re-enter on a different status (e.g. H, F, J, K, etc), without ever returning to one's home country?  I have posted this in Travel rather than Expatriates because, although in my specific case I have an H-1B visa, my question is more generally about VWP and travel, and I believe that it is applicable to travellers with non-immigrant visas.  There's a similar question , although that's about going to the US and before having the H-1B visa.


I was reading about how to find the buoyancy force when I came across this explanation:  Imagine a box submerged in a tank of liquid. The distance from the surface of the liquid to the bottom surface of the box is greater than the distance from the surface of the liquid to the top surface of the box. In short, $h2 > h1$. Because $p = \rho g h$, the pressure on the bottom surface due to the liquid must be greater than the pressure on the top surface. This results in there being more force on the bottom surface of the box than there is on the top surface. The difference between these two forces causes there to be a net force upwards called the buoyancy force.   (source: ) I understand how the force acting downwards onto the top surface of the box is found. This is simply due to the column of water above the box. But how is the force acting upward onto the bottom surface found? I specifically want to to understand where the force acting onto the bottom surface of the box, upwards, derives from.

I realised, reading another Phys.SE question about  that I don't really understand how  works. Particularly concerning, for a SCUBA diver.  The top answers to that question seem to claim that balloons get their "sense of down" from a pressure differential. They continue: when a car accelerates, the air at the back of the car becomes more dense, and at the front less dense, changing the plane of the pressure differential and so also, the balloon's sense of up. I find that extremely hard to credit. However, I realised that I don't really know why less dense things float in more dense things.  I'm fairly sure it's something to do with displacement of heavier things by lighter things, and I think pressure acting on the lighter thing's surface has something to do with it, but that's about it.


i've to find the sequence of chars ,. inside a json file for example: ":0,.0}},{", so what is the best fitted regex string for it?  i tried /(,.){1,}/g but it doesn't work well.

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I remember reading a story of a boy finding a settlement of various creatures on a tree. Some points which may help in figuring out the book are as follows.:   The book was in English. The title may contain "tree" or "willow". The story was at least 300 pages long and was directed for a young audience but was also a perfect adult read. I read it about ten years ago. I suppose that the settlement always experienced night. I think the settlement was lighted with lanterns. As the boy climbed the tree, he made new friends and finally reached the clouds.   I can be a little off in the details but would be grateful if someone could provide the nearest match to this story. One may clear any further doubts in the comments.

In the 90's I read a book about two children (I think they were siblings, boy and girl) who climbed a tree. At the end they found a door to another world. After some time the (fantasy) worlds switched to another one. Once they got stuck in a world, because the world went on traveling and therefore the door couldn't be reached anymore. They met many curious individuals during their adventures.  It's a completed novel for kids. I've read it in German, but I can't remember if the author was a German one, so it might've been available in English as well. It was a fairly thick book.  EDIT: After some thought I remember a pancake kind of person


Trying to get the filenames using aws commands in python.But getting error.  import subprocess output=subprocess.check_output(['aws', 's3', 'ls', 's3://dev-lake/staging/20181111/', '--recursive', '--human-readable', '--summarize', '|','awk', '{print $4}']) print output   Error  Unknown options: |,awk,{print $4} Traceback (most recent call last):   File "list.py", line 2, in <module>     output=subprocess.check_output(['aws', 's3', 'ls', 's3://sdx-dev-lake/staging/20181111/', '--recursive', '--human-readable', '--summarize', '|','awk', '{print $4}'])   File "/usr/lib64/python2.7/subprocess.py", line 219, in check_output     raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['aws', 's3', 'ls', 's3://sdx-dev-lake/staging/20181111/', '--recursive', '--human-readable', '--summarize', '|', 'awk', '{print $4}']' returned non-zero exit status 255

How do I execute the following shell command using the Python  module?  echo "input data" | awk -f script.awk | sort > outfile.txt   The input data will come from a string, so I don't actually need echo.  I've got this far, can anyone explain how I get it to pipe through sort too?  p_awk = subprocess.Popen(["awk","-f","script.awk"],                           stdin=subprocess.PIPE,                           stdout=file("outfile.txt", "w")) p_awk.communicate( "input data" )   UPDATE:  Note that while the accepted answer below doesn't actually answer the question as asked, I believe S.Lott is right and it's better to avoid having to solve that problem in the first place!


I am using PDOs first time on my project and have some confusions in my mind and wanted to clarify:   Everyone recommends PDOs because it prevents from SQL injection so   Do we need to apply other functions before making query like strip_tags OR they aren't necessary with PDOs?  What is different betweeen :username and username?   Example:  $stmt = $db->prepare("SELECT id FROM USERS WHERE username=:username); $stmt->bindParam(":username", $username); $stmt->bindParam("username", $username);  Does this prevent from SQL injection? PDO::PARAM_STR which is used as third parameter in bindParam statement Is it necessary to close connection by setting connection object to null in end? like  $db = null;

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


So I working on a programming assignment that uses multiple algorithms to solve the floodit game. I have taken some of my data that I have collected thus far. I did a shapiro test:     shapiro.test(x[1:5000])     Shapiro-Wilk normality test     data:  x[1:5000]    W = 0.9806, p-value < 2.2e-16    To my understanding, I must reject the null hypothesis, which means my data is not normal. I then used the hist function in R:   Does this Hist show a normal distributed data? if so does that mean i reject my results from the shapiro test? and If so, why do reject the shapiro test?

I think I am dealing with this issue   I have large data set(10k data points) that slightly diverges from normal, and I get p-value of 0. I am interested in having perhaps a more crude test that tells me if data is extremely divergent from normal, versus looking somewhat normally distributed. I am currently trying Kolmogorov-Smirnoff, and in both cases I just get p-value of 0. Any alternatives?  I also looked at this:   So, taking all this into consideration, is there any kind of test I can perform that distinguishes between data that's roughly normal, and not normally distributed at all?  I am using scipy.


I am using Ubuntu 16.04 with GTX 1080. On my first boot, the screen turn black after I selected Ubuntu in grub. After I added nomodeset, the black screen gone however it only shows the Ubuntu default background image. It can't reach the login screen.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Seems like a NoClassDefFoundError would be an easy thing to fix, however I can't seem to figure this out.    I'm using pyleus on the . I am able to build using:   pyleaus build word_count/pyleus_topology.yaml   Then I attempt to run local (or even if I attempt to submit, I get the same error):   pyleus local --debug word_count.jar  Running: /mypath/jre/bin/java -client -Ddaemon.name= -Dstorm.options= -Dstorm.home=/mypath/storm -Dstorm.log.dir=/mypath/storm/logs -Djava.library.path=/mypath/jre/lib/ -Dstorm.conf.file= -cp /mypath/storm/lib/storm-core-1.0.1.jar:/mypath/storm/lib/asm-5.0.3.jar:/mypath/storm/lib/log4j-over-slf4j-1.6.6.jar:/mypath/storm/lib/log4j-slf4j-impl-2.1.jar:/mypath/storm/lib/log4j-core-2.1.jar:/mypath/storm/lib/kryo-3.0.3.jar:/mypath/storm/lib/storm-rename-hack-1.0.1.jar:/mypath/storm/lib/objenesis-2.1.jar:/mypath/storm/lib/reflectasm-1.10.1.jar:/mypath/storm/lib/log4j-api-2.1.jar:/mypath/storm/lib/minlog-1.3.0.jar:/mypath/storm/lib/slf4j-api-1.7.7.jar:/mypath/storm/lib/clojure-1.7.0.jar:/mypath/storm/lib/servlet-api-2.5.jar:/mypath/storm/lib/disruptor-3.3.2.jar:word_count.jar:/mypath/storm/conf:/mypath/storm/bin -Dstorm.jar=word_count.jar com.yelp.pyleus.PyleusTopologyBuilder --local --debug Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: backtype/storm/topology/IRichBolt         at java.lang.Class.getDeclaredMethods0(Native Method)         at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)         at java.lang.Class.privateGetMethodRecursive(Class.java:3048)         at java.lang.Class.getMethod0(Class.java:3018)         at java.lang.Class.getMethod(Class.java:1784)         at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)         at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: backtype.storm.topology.IRichBolt         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)         ... 7 more   What's confusing to me here is that it does look like all the storm libs are included in the classpath if you scroll on my error log. What am I missing here? I'm using Storm 1.0.1, pyleus 0.3.0, Java 1.8, Python 2.7.

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


TL;DR: # mkntfs --label media1 --fast /dev/sdb  /dev/sdb is entire device, not just one partition. Refusing to make a filesystem here!  Why does the script "refuse to make a filesystem on the entire device"? In detail: What are the possible downsides if the whole disk is formatted as NTFS? I.e. not one single big partition taking up all the space, but the disk itself. I imagine that as a system disk (i.e. for running Windows) it would not work, because there would be no space for a boot loader. (Or would be? Does formatting the whole disk also overwrite the MBR area?) But what if the disk is used only as a data storage? (This is the part that is more relevant to me at the moment.) Would all the OS-es that support NTFS (Windows/Linux/...) still be able to correctly read and write files? Would all other devices handle it correctly? (E.g. HDD connected to a TV via USB.) Or is there any chance that this could cause irreversible damage to the disk? (This is what is preventing me from simply trying it out.) Remarks:  I know that I could force formatting the whole drive with the mkntfs -F flag, so the question is not how to do it, but whether I should or not?  Why would I want to do that in the first place, you may ask? The answer is, why waste space on the partition metadata, if I'm going to use the whole disk as data storage anyway? (But I'm interested in the system-disk POW too, just for broadening my perspective.)

I have a Transcend Storejet external USB hard disk. This is not an SSD, but a mechanical disk with rotating plates. I have formatted the whole disk, without partitioning, as NTFS. I have used mkntfs tool under Linux.  When plugged into a Linux machine, the system sees a drive with two partitions (/dev/sdc /dev/sdc1 /dev/sdc2). However, as I know it is a partitionless disk, I can mount the whole device (mount -t ntfs /dev/sdc /mnt) and it works without any problems.  When plugged into a MS Windows XP machine, the systems sees a disk with two unformatted partitions, and it does not assign a drive letter to either the whole disk, nor to any of the partitions.  Would anyone know how to get MS Windows to mount my disk as a NTFS superfloppy?  I have already tried removing old USB mounting points and residual devices using 'DriveCleanup'. It did not help.  By the way, I also have an external Kingston USB SSD, also formatted as NTFS superfloppy, without partitioning. However, this one is recognized and mounted normally by MS Windows.


I want the following code to show only rounded numbers by two decimals . . .    public class Main {      public static void main(String[] args) {          double gross = 4322.12d;         double tax = 397.04d;          double net = gross - tax;         double fee = gross * 0.30d;         double vat = fee * 0.20d;         double takeHome = net - (fee + vat);          System.out.println("Gross Refund £" + gross);         System.out.println("Tax Deducted £" + tax);         System.out.println("Net Refund £" + net);         System.out.println("Our Fee £" + (fee + vat));         System.out.println("Funds remaining after deductions £" + takeHome);      }  }

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?


where is the change occurring if i am reassigning a character to *p .  #include<stdio.h> int main() {  char* p="hello" ; printf("%s",p); *p='a' ; printf("%s",p);  return 0;  }   *p='a' should have replaced 'h' with 'a' in the string .  *p should access and base element of the string pointed by p and replace it .  but print statement prints "hello " both times   but it doesnt can anyone explain why not ??

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


Example:     He was very plain. He could be considered (as) the standard of the average.   Do I need the "as" in the following sentence? Why or why not?

I have the following idea:        The reconstruction of object models is performed using a graph   matching approach, which is considered a corner fixing dilemma.    The reconstruction of object models is performed using a graph   matching approach, which is considered as a corner fixing   dilemma.      Which way is correct?


How long can you keep large batches of seasoned raw jerk chicken outside of the fridge? What is the safe temperature?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I have a feeling this question has been posted before, but I wanted to ask as my situation is slightly different. I've recently decided to leave my PhD program in the social sciences in order to look for work. I've basically come to the conclusion after completing 3 full years, courses, and fieldwork that I don't want to be an academic but would rather put my skills to use with NGOs, non-profits, or the public sector. In many ways, the last hurdle of the PhD (i.e. writing the dissertation) seemed more like a barrier to what I wanted to do, rather than something that would bring me closer to it. I left because I wanted to go in a new direction, not because I wasn't sure that I was capable of finishing.   Anyways, my main concern right now is how to present this discrepancy on my resume. As I've been a TA and doing research projects since getting my MA, I've decided to list my years as a TA, and the rest under the position of "Researcher." I figure that the situation is a little too complex to really explain in a resume or cover letter, and that most employers will be able to read between the lines that I was probably in a PhD program. I've basically been marketing myself on my resumes/cover letters as a "researcher" with lots of research projects under my belt, without specifically stating under the "education" section that I have a partially finished PhD. My motivation behind the "researcher" title is that during my graduate studies I designed, proposed and carried out individual research on a number of projects.    I guess I should qualify this by mentioning that my PhD studies were in the social sciences, and there seems to be a bit more leeway in terms of describing what we do. All of my dissertation research was funded by a fellowship, and all of my various other research projects (where I wasn't principal investigator) were the result of competitions funded by grants. I have always designed my own research projects, which is why I didn't think it was a bad idea to go with "researcher", and my references could verify that.  It looks like this title would be a little confusing given the circumstances, so I think I'm going to use "Graduate Student Researcher", "PhD Researcher" or something similar in the future. I guess this seems like it gives a more accurate representation of what kinds of things I was doing. I figure that the 4 years of MA/PhD work on research projects gives me (and any other former graduate student) skills that are valid to most employers. I just want to be able to address this discrepancy honestly and enthusiastically in an interview, rather than clumsily addressing it in a cover letter/resume. What do you guys think? Is this the right strategy to take?

I am in the process of leaving my PhD programme in life sciences at a top university in the UK. A PhD is simply not for me and I find the work/life balance to be intolerable; in addition, my PhD so far has included an industrial placement at a Fortune 500 company that was very eye opening and enjoyable. I am looking to leave academia permanently and apply for graduate schemes.  My question is whether it is better to leave the fact that I quit a PhD off my CV, or to have the failed PhD / MPhil on there, or to mask it as '18 months of lab experience' or something similar. Is it possible to make the fact I left a PhD sound good?


Does the sentence: "I am positive." mean "I am sure 100 percent"?

In general, which one is conveys a stronger conviction/opinion? I did some quick google search but didn't find any interesting results.      I'm positive that   or     I strongly believe that


A fill in the blank from a school's worksheet. What bothers me is the word 'all.' Does it matter in deciding the verbs in this blank?     I ______ (work) on the project all night.    The confusion:  Without any context, it could be had been, have been, or simple past tense. Say:      I had been working on the project all night. I have been working on the project all night.  I worked on the project all night.   Who knows which night? Last night, the night last week, or the night last year? So with almost all the blanks there!   Does the answer lie in the word 'all'?  What am I missing? What could be the answer?

Could you help me with these sentences:   I lied to her. (I'm just making a statment)  I've lied to her because the truth would have hurted her.   Second example:   I have been working at Google for 10years. (Meaning I am still working there) I've worked at Google and it was nice.(I don't work anymore) I worked at Google. (Not sure about the difference with the previous one)   I'm learning the different tenses and it isn't so easy for me. Any help would be welcome.  Regards,


Let $U_1, U_2, \ldots$ be a sequence of independent random variables with PDF $$f(u) = 1, \;\; 0 < u < 1$$  Find $E[N]$ when $N = \min\left\{n\mid \sum\limits_{i = 1}^n U_i > 1\right\}$.  Hint: For $x\in (0,1)$, define $N(x) = \min\Big\{n\mid \sum\limits_{i = 1}^n U_i > x\Big\}$.  I am absolutely lost on this question. Any help would be greatly appreciated.

Find $E[N]$ for $N = \min\{n:U_1+U_2\cdots+U_n>1\}$ where $U_1,U_2, . . .$ are independent uniform (0,1) random variables.   I may be way off base with my thinking here, but is $\min\{n:U_1+U_2\cdots+U_n>1\}$ the same as $\max\{n:U_1+U_2+\cdots+U_n\leq1\}$? If so, I'm thinking of this as a renewal process where n is the maximum number of "arrivals" by time = 1. Then I'm just finding E[N(t)] which is the renewal function m(t) that satisfies the integral equation $m(t)=F(t)+\int_0^tm(t-x)f(x)\cdot dx$ and I know where to go from there.


Whenever I open my documents, all the folders in it are displayed with a lock icon. Therefore, I cannot delete any file or folder in it.and also can't change folder permission.so, give me solution how to fix this problem

Whenever I open my documents, all the folders in it are displayed with a lock icon. Therefore, I cannot delete any file or folder in it.  I tried changing the root access using sudo chmod user:directory/  but it fails. I am not able to delete or perform any file action with it.  What action should I perform to fix it?


Show that discrete analogy of partial integral formula as below. $$  \sum\limits_{k=0}^{n-1} y(k)\Delta x(k)=x(n)y(n)-\sum\limits_{k=0}^{n-1}x(k+1) \Delta y(k) + c  $$ I have tried as below and I stuck. \begin{align*}   \sum\limits_{k=0}^{n-1} y(k)\Delta x(k)&=   \sum\limits_{k=0}^{n-1} y(k)\left(x(k+1)-x(k)\right)\\   &=\sum\limits_{k=0}^{n-1} \left(x(k+1)y(k)-x(k)y(k)\right)\\   &=\sum\limits_{k=0}^{n-1} x(k+1)y(k)- \sum\limits_{k=0}^{n-1} x(k)y(k)\\  \end{align*} Now I can't expand it in form $$=x(n)y(n)-\sum\limits_{k=0}^{n-1}x(k+1) \Delta y(k) + c.$$ Anyone can give me hint?

rudin's summation by parts  3.41  Theorem Given two sequences $\left\{a_n\right\}$,$\left\{b_n\right\}$,put $$\begin{align*}A_n=\sum _{k=0}^n a_k~~~(1)\end{align*}$$ if $n\geq 0$; put $A_{-1}=0$. Then, if $0\leq p\leq q$, we have $$\begin{align*}\sum _{n=p}^q a_nb_n=\sum _{n=p}^{q-1} A_n\left(b_n-b_{n+1}\right)+\color{blue}{A_qb_q}\color{red}{-}\color{blue}{A_{p-1}b_p}.~~~(2)\end{align*}$$  My derivation:  blue color highlight the changed item.  Questions  question1:  The blue part of (2) is a little hard to memorize before I've done the calculation. What's the relation between (2) and the  which I think is easier to memorize (without those indexes). $\int f dg=f g-\int f dg$ or $\int _a^bF(x)g(x)dx=F(b)G(b)-F(a)G(a)-\int _a^bf(x)G(x)dx$ question2:  What's the guidelines to derive the (2)? As you see the wiki's edition, there are also several versions. Although I get (2), I did it by cheating, i.e. I'm doing proof, and I checked (2) in my process of derivation. Of course, the proof in text, is much easier: $$\begin{align*}\sum _{n=p}^q a_nb_n=\sum _{n=p}^q \left(A_n-A_{n-1}\right)b_n=\sum _{n=p}^q A_nb_n-\sum _{n=p-1}^{q-1} A_nb_{n+1}~~~(4)\end{align*}$$ ,and the last expression on the right is clearly equal to the right side of (2) question3  $A_n$is summation from $0$ to $n$, how does it look reasonable when $p=5$?


On average, how would range of shared centimorgans compare between first cousins who have same paternal grandmother versus first cousins with different paternal grandmothers, same paternal grandfather in both cases.

Related to , what would the expected range and average shared cM be?  In this case, I'm seeing 64.0 cM over 3 segments.  Looking at the table, that is less than half the expected average (433 cM) and nearly outside half the range (115 cM to 753 cM).  In this case, the further (1R) path includes a terminal paternal link that is a undocumented father with family stories giving the link.  Does this cast doubt on the half 1C1R and perhaps suggest it is more likely 2C1R (and no longer halved), that is the father of the illegitimate child was not the other's grandfather but instead his brother?  In such a path, the cousins most recent shared ancestors are now a married couple, hence no more need to halve the relationship.   Source:


Why are they not ten-one, ten-two, ten-three, .... just like twenty-one, twenty-two, twenty-three?  What I'm asking for is a reason for breaking the pattern, less interested in the origins of the words coming from other languages. Even if they did originate from other languages, why don't we change and adapt a uniform pattern?

In short, why is it not oneteen and twoteen, and we start at thirteen in English?  In another thread, I supposed that despite that fact that people have ten fingers, amounts of items leading up to and including twelve were more common because twelve is more easily divisible evenly by two, three, four, and six. Both English and German (which are related) switch to a -teen (-zehn auf Deutsch) ending after twelve. Based on that thread, so does Norwegian. Could this be the explanation?  Looking at other languages (Arabic, Japanese, even a related romance language of French), this doesn't seem to apply, and you'd think that if something so fundamental as divisibility were the explanation, we'd see a more universal distribution across them.


How do I export color models in Blender? I'm trying to color them but they come out in gray.

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


I would like to use my iPad as a graphics tablet to draw stuff on Ubuntu. Is there any solutions to this? As to see that Ubuntu has built-in Tablet support.

I read some articles, and seen some videos about a github project that do a sort of thing, but it's a little bit outdated things.I wanna see if this thing is possible to do, nowadays. Thanks


When downvoting a post,  explaining how the author can improve their post.  What type of comment should I leave on ? Is there a comment template we can use for these scenarios? I've considered forwarding users to "", but explaining my downvotes with a link-only comment feels a bit hypocritical.

More than often I get a lot of itch when I see an answer which contains only a link. For example .  Check this link, it will solve your query..   This answer does not explain in any way why and how it solves the OP's concrete problem without the need to click the link. Also, if the link ever goes down, then the whole answer is completely useless. I am very tempted to flag this as "not an answer" and hope that the moderator understands the hint and converts it into a comment. Can I flag them as such? Related:


Given $f:\mathbb{R}\rightarrow\mathbb{R}$, and the function $f$ satisfies $f(x+y)=f(x)+f(y)$ for any $x,y\in S$. Can we say that this function $f$ must be continuous?   I think it is false, but couldn't give an example. Can someone tell me whether it is true or not? Thank you very much.

By reading the  on the Wiki,  it is said that      On the other hand, if no further conditions are imposed on f, then (assuming the axiom of choice) there are infinitely many other functions that satisfy the equation. This was proved in 1905 by Georg Hamel using Hamel bases. Such functions are sometimes called Hamel functions.   Could anyone give a more explicit explanation of these many other solutions?   Besides the trivial solution of the form $f(x)=C x$, where $C$ is a constant, and the solution above constructed by the Hamel Basis, are there any more solutions existing?


After the wort is chilled and ready to rack to the fermenter, I run into a problem. When pouring wort into the strainer in the funnel, a ton of hop gunk gets stuck. Then I need to scrape and repeat many times. All that time, the wort is exposed.  Is the answer to use a hop bag so the transfer is faster?

At the moment the most frustrating part of my brewday is getting the cold wort into the fermenter. Here is my process. I have a 20 litre saucepan that i use as a kettle that does not have a tap. At flame out I add my immerseion chiller that is plumbed into my kitchen sink tap. When I have reached temperature I remove the chiller and whirlpool and leave it to rest to 30 minutes. I am use a siphon to rack directly into the plastic bucket fermenter.  The problem is that the siphon always gets clogged with the hops after i have only transfered about 20% of the wort. I have also tried carefully pouring the wort through a seive, but this sort of depfeats the point of the whirlpool and also the seive got blocked with hops as well. All in all i end up wasting a lot of the wort because i am afraid of getting a lot trub in the fermenter.  What are the best processes to use with my current equpment to get the wort into the fermenter?


I have a set of N elements. I draw (without replacement) a subset of M elements, then replace it. What value M do I need, to have a probability greater than p to draw all N elements within X subset draws? I found the answer when M is 1, but I am not sure how to adapt that in a general case. Thin coupon problem is different from  since we do not have duplicates when we draw a subset.

Given the coupon collector's problem, the expected number of coupons is calculated as follows:  $E[X] = N \sum_{i=1}^N \frac{1}{i}$  This assumes we can draw one coupon at a time.  Let's assume one can draw a pack of size $m$. All coupons in a pack are independent, which means there may be duplicates in one pack. In each draw we are only interested in one coupon which we do not have yet. All other coupons are discarded for that draw. Drawing packs is repeated until we have all $N$ coupons.   How do I calculate the expected number of draws for that case?


I have lost the to me essential hibernate functionality after upgrading ubuntu. This is normal, but unfortunately I could not reenable it this time.  I tried these three previous solutions:   , , and  plus restarting the menu/indicators and rebooting   but no hibernation option appears.  Some additional info:   sudo pm-hibernate outputs nothing and appears to do nothing. sudo s2disk outputs:     s2disk: Could not open the snapshot device. Reason: Operation not permitted    I guess this is my key clue, but I didn't find any obvious explanations/solutions when googling that - I'm afraid I'm ignorant of the meaning.  There is no change to dmesg output and /var/log/pm-suspend.log does not exist after running pm-hibernate.  The machine is capable of hibernating under ubuntu 15.04 and earlier - the above options worked previously.  (I am aware this is a potential duplicate of , but wanted to add more detail.)

I'm using Xubuntu 14.04 64 bit. I know that question been asked a billion times, but all of them consist of editing following file:  /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla   That file does not exist on my system. I tried com.xubuntu.enable-hibernate.pkla but doesn't exist either, locate command doesn't find it.


Observation  While browsing trough the most up-voted questions in the mobile app (Stack Overflow) I noticed that questions with a vote count higher than 10.000 are displayed wrong or at least in a way I don't understand.    Expected behavior  1,1k is according to my knowledge 1100. But when opening the question it shows a vote count of 11089 which is way more than 1,1K. The correct display value would be 11k or 11,1k (with rounding).  Note that my phone locale is Dutch. Which means that points are used for separating thousands and commas decimals.  Proposed fix  Method one: decimal point when the K postfix is used and the number is shorter than 3 digits.  public static String format(int votes){     // Without K     if(votes < 10000){         return String.format("%,d", votes);     }     // K + 1 decimal     else if(votes < 100000){         return String.format("%,.1fK", votes/1000.0);     }     // Just K     return String.format("%,dK", votes/1000); }   Result:  1043    >  1.043   11089   >  11,1K   100000  >  100K   1000000 >  1.000K     Method two: no decimals at all (my favorite).  public static String format(int votes){     if(votes < 10000){         return String.format("%,d", votes);     }     return String.format("%,dK", votes/1000); }   Result:  1043    >  1.043   11089   >  11K   100000  >  100K   1000000 >  1.000K

I have been browsing through the most upvoted questions on Stack Overflow and noticed there is a bug in the number of upvotes for the most popular one:    At least on the Android app instead of 11k only 1.1k are displayed.


Is it possible to integrate Django web site and PHP forum by some apache directive in httpd.conf file? For example:  <VirtualHost *:80> ServerName myserver DocumentRoot home/myserver/www/ WSGIScriptAlias / /home/myserver/www/mywebsite/mywebsite/wsgi.py <Directory "home/myserver/www/mywebsite">     Order allow,deny     Allow from all </Directory> Alias /forum/ /home/myserver/www/mywebsite/forum/ <Directory /home/myserver/www/mywebsite/forum>     *tell apache it's PHP* </Directory>  I've seen this question, but no one said anything about directives..

I'm just about to launch a new Django website (RedHat EL4, Apache 2.0.52, Django 1.1, mod_wsgi), transitioning from a basic static-html and php site.  As it's currently configured, Django handles every request on the new site, starting from the site root  (i.e. mydomain.com/ is processed by Django).  The old site had a PhpBB forum set up at mydomain.com/forum/.  I'm trying to figure out how (or if) I can get the forum system to live in the same place on the new site.  So, anything under mydomain.com/forums/ is handled by PhpBB and everything else is handled by Django.  I feel like the Apache 'Location' directive is the tool to use, but I'm not getting enough specific advice from the Apache docs and Google.  I'm reasonably familiar with Apache conf files, but I haven't had to do this type of thing before.  Thanks for any suggestions.


I want to have a dual boot for windows 10 and ubuntu 16.04  During the installation and after the first screen:   Then the installation type screen has no options:    I select the '+' then I am asked for a username and password which I don't know.  I am stuck in this screen and I don't know how to proceed.

I'm trying to install a dual boot (with Window 10) on my new XPS-15 (with a SSD 256Go).  Everything works well (following  until I go on step "Installation type".  Where I can't select "Something else", and I already have the partition table but completely empty. I can't see any existing partition, or add new one.


Why did the world stop using it for transmission ? And is there any countries still use it ?

Is there a good reason why we are not in the process of completely converting our electrical transmission system to DC? The main reason for using AC on the grid (no offense Tesla, I love you man) was to enable transformation to higher voltages in order to drop line losses (\$P=IE=I^2R\$) and if the conductor size remains the same, when \$E\$ is increased in the equation \$E=IR\$ then \$I\$ must necessarily decrease, in turn decreasing losses as the square of \$I\$). But now we have the ability to transform AC (at all thermal, hydro and wind generators) and DC (at solar generators) to any level of DC we desire and transmit, usually to residential or commercial loads which tend to use DC anyway. If need be it can be converted back to AC at industrial loads (motors usually).  In this way many transformers, capacitors, spacing issues, etc. can be eliminated from the electrical grid, increasing efficiencies dramatically, and in turn decreasing emissions and costs.  Am I missing something here?


From an external point of view, an astronaut falling towards a black hole takes an infinite amount of time to reach the horizon, while the horizon vanishes in finite time due to Hawking radiation. Does the infalling astronaut agree about the black hole evaporating before she reaches it?

I am not a professional physicist, so I may say something rubbish in here, but this question has always popped in my mind every time I read or hear anyone speak of particles hitting singularities and "weird things happen".   Now to the question at hand, please follow my slow reasoning... As far as I've learned, to reach a black hole singularity, you must first cross an event horizon. The event horizon has this particular property of putting the external universe on an infinite speed to the falling observer. Now due to the Hawking radiation, and knowing that the cosmic background radiation is slowly dimming, sooner or later every black hole in this particular instance of inflation we are living in will evaporate, according to an external observer of said black holes.  This means that every black hole has a finite timespan, as long as this universe survives that long. Now if we go back to the falling observer, we had already established that such an observer would see the outside universe "speed up" infinitely. This means that when the falling observer "hits" the event horizon, he will (or it if we speak about particles, which is clearer in this case), be immediately transported in time towards the final evaporation moment of the black hole. Either this or the particle gets some weird treatment. My point is, such a particle never gets to the singularity, because it has no time to get to it. The moment it crosses the event horizon, the black hole itself evaporates.  Where am I wrong here?


I'm currently trying to get my head around how to create an item class which contains data for multiple purposes.  As for example I would like to have an Axe which could be used as weapon, but also as a tool to chop trees. The class should contain the following:  Durability, weight, damage vs npcs/players (when attacking), damage vs trees (when chopping), attack speed, chop speed and some enum in which equipment slot the axe fits (e.g. melee slot).  What would be the typical approach?  I stumbled about  answer, but I'm not 100% sure if I'm understanding him right. Is it something like:  public class Item {      public int durability;     public float weight;      public Weapon weapon;     public Tool tool;      public class Weapon {         public int damage; // damage vs players         public int speed; // attack speed     }      public class Tool {         public int damage; // damage vs trees         public int speed; // chop speed     } }   ?

I am casually working on an RPG type game in Java but I am having trouble figuring out how I can have items that can do many different things without creating a different class for every item.  As an example, how would I create an Axe that could chop trees and attack monsters?  If I extend either the chopping or the weapon class then I can't extend the other class.  If I have chopping and weapon be an interface then I will have a lot of duplicated code when a dagger can also attack monsters and a different axe can cut trees.  I am hoping there is a way to have a single Item class and load the items and their respective abilities from a file. If that is possible how can it be done? If it isn't then what is the best way to have items in a game?


I am trying to download a file from my onedrive using the microsoft graph api. I have managed to get to the point where i can retrieve the item from the GraphServiceClient. However, once i get the file using /me/Drive/Items/{itemid}/Content it returns to me a System.IO.Stream object.  How do i use this System.IO.Stream object to download the file?  Here is the code i have now for getting the file (for security purposes i did not put the itemid in the sample code, but i can assure you it is correct.) :  public async Task<ActionResult> OneDriveDownload() {     string token = await GetAccessToken();     if (string.IsNullOrEmpty(token))     {         // If there's no token in the session, redirect to Home         return Redirect("/");     }      GraphServiceClient client = new GraphServiceClient(         new DelegateAuthenticationProvider(             (requestMessage) =>             {                 requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);                  return Task.FromResult(0);             }));      try     {         var stream = await client.Me.Drive.Items[ItemID].Content.Request().GetAsync();         return View(stream);     }     catch (ServiceException ex)     {         return RedirectToAction("Error", "Home", new { message = "ERROR retrieving messages", debug = ex.Message });     } }   Additionally, i would like to create a button that can execute this download in the view.

I have a StreamReader object that I initialized with a stream, now I want to save this stream to disk (the stream may be a .gif or .jpg or .pdf).  Existing Code:  StreamReader sr = new StreamReader(myOtherObject.InputStream);    I need to save this to disk (I have the filename). In the future I may want to store this to SQL Server.   I have the encoding type also, which I will need if I store it to SQL Server, correct?


I am working on a bot project. I want to give auto reply if any string found from array: This is my code so far: var boys = ["sam", "nick", "jason", "satish", "jochem"];  if (data.items[index].snippet.displayMessage.toLowerCase() == boys) {   myFunction();   ..... }

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I'm using SQL Server 2014 to maintain a small database and while looking for a way to keep a History of my Data I came upon the Change Data Capture Mechanism.  My question now is if there is an easy way to create a lookback query using Change Data Capture, so I could for example query against the database state from 3 Days Ago.  I could do all that with temporary tables but I kind of doubt I'm the first one thinking about this and maybe there's even a built in capability i missed.  Any other way to manage lookback queries is also appreciated :)

It seems to be quite difficult to find comparisons between system-versioned temporal tables and the older options, such as DB triggers and CDC. I currently don't have the time to write an extended test on SQL Server 2016, so I thought I'd ask about it here.  Basically, the typical advantage with triggers is that they are easier to manage in stand-alone and clustered / alwaysOn environments, are real-time for being synchronized, and have access to session data such as the user ID.  CDC on the other hand while requiring a bit more management and being asynchronous, is much lighter, and thus performs far better. So if there's any doubt at all that the bottle necking caused by triggers could become a problem, CDC will basically be the superior solution. In terms hardware requirements, there's a negligible extra space requirement by CDC due to using logs and cdc audit tables for tracking the changes.  The question: How do temporal tables compare to the two above? In terms of speed, performance, storage space usage. WHEN should I use temporal tables instead of triggers or CDC? When should I not?  I understand anything as potentially complex as the business requirements and technical limitations behind DB auditing isn't going to have one easy answer, as it depends largely on the requirements and scope of the project. But anything to shed more light on the questions above would be appreciated. Thanks!


Here is my MWE. As you can see, the problem only happens when we use the macro \suppOrApp.  \documentclass{article}  \usepackage[english]{babel} \usepackage{blindtext}  \usepackage{caption} \usepackage{float} \usepackage{ifthen}  \title{A caption test} \author{Some one} \date{\today}   \begin{document}  \newcommand{\suppOrApp}{   \ifthenelse{\boolean{thesisStyle}}     {Appendix}     {Supplementary} } \newboolean{thesisStyle} \setboolean{thesisStyle}{false} % Might want to reconsider this here.   % This has additional space: \renewcommand{\tablename}{\textbf{\suppOrApp Table}} % But this would work fine. %\renewcommand{\tablename}{\textbf{Supporting Table}}   \begin{table} \begin{tabular}{cc} 1 & 2 \\ 3 & 4 \\ \end{tabular} \caption{\blindtext} \label{mytable} \end{table}  \blindtext  Please refer to Supporting Table~\ref{mytable}.  \end{document}

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


Given a commutative ring A. Prove that the set of prime ideals in A   has minimal element with respect to inclusion.   I try to apply Zorn's lemma to prove above problem, but I can't find the way to construct a lower bound for any chain in prime ideals set. Please give me an idea to construct this. Thanks in advance!

Prove that in a no trivial ring, the set of all prime ideal has minimal elements (ordered by subset inclusion).  I have thought that we can take as a lower bound of the set the ideal (0)={0} because it's the lower bound of any chain and applying Zorn's lemma we know there's a mininmal element.  I don't know if Zorn's lemma can be used in this way. Thanks.


I am an Ubuntu newbie, and I accidentally typed chown www-data:www-data * -R. After a while, I tried to restart, but my computer couldn't even start, saying:   # Your screen, graphics cards, and input device settings could not be detected correctly.  # You will need to configure these yourself.    the command I executed is like this:  cd /home sudo chown www-data:www-data * -R   sudo usermod -a -G www-data username   Is there any way I can get out of this mess? Thank you

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


I want to modify . I've tried a few different ways since what worked on old OS doesn't on 10.14 Mojave:   I've navigated to the file through finder, went to Get Info, unlocked the file (via the lock icon), and tried to change permissions.    I get the message "The operation can’t be completed because you don’t have the necessary permission."  I've tried this command:  chmod 777 /Applications/Notes.app/Contents/Resources/en.lproj/DefaultFonts.plist  I get the message: Operation note permitted  I've also tried:  sudo nano /Applications/Notes.app/Contents/Resources/en.lproj/DefaultFonts.plist  I'm able to get into the editor, but when I try to save I get message: "error writing /Applications/Notes.app/Contents/Resources/en.lproj/DefaultFonts.plist"  also, I cannot cd to /Applications/Notes.app/Contents/Resources/en.lproj. (And I cannot see Notes.app when I'm in the Applications folder.)  The application is closed while I'm doing all this.  I have admin permissions on my computer. What in the world am I doing wrong here?  UPDATE: I'm now able to edit the file thanks to @bmike. However, changing the font size values in the file doesn't seem to affect the application. I think I have the correct file. (btw, not sure if I should be writing this follow-up here or just in comments...or creating a new post. Feedback welcome.) Created new post to address this:

Apple has introduced , also known as "rootless", with OS X 10.11, El Capitan. I understand this is a step for general protection against malware but as a developer I need write access to some of the files it locks away.  How do I disable this protection?


How to recover plaintext, if we know public key(RSA), correctly encrypted text and text encrypted with faulty public key, where one bit is changed?

This is an exam question an i have no idea how to recover the message m.   John wants to send an encrypted message to mary who has a pair of RSA keys, However, John does not know Mary's public key and so John sends an email to Mary to ask for the key. mary's email reply is intercepted by Peter who replaces Mary's public key $\{e,n\}$ with $\{e_2, n\}$ where $e_2$ is obtained by changing one bit in $e$ from $0$ to $1$. Now john encrypts a message $m$ to Mary by using $\{e_2, n\}$. As Mary cannot decrypt the message, she resends her public key to John and asks John to send the encrypted message to her again. Peter does not interrupt this time. However, Peter eavesdrops the whole communication and obtains both encrypted message (one encrypted by $\{e_2,n\}$ and one by $\{e,n\}$. Explain how Peter can recover the message $m$.  How can encryption with both $\{e_2,n\}$ and $\{e,n\}$ be used to recover the message $m$?  I did think that it is related to common module attack, but i have no idea how to prove that $\gcd(e,e_2)=1$.  Does anyone have some idea on how to recover the message?


I have a small server running Debian and I want to add an account with SSH access for backups. The user of this account should have no console access. He can only transfer (backup) data via SCP to/from one directory on the server, nothing more. How can I do this?  edit  I have found a solution.  contains a different question but the solution exactly solves my problem.

I would like to create a user who can only do one thing: via ssh specify a script ( and commandline arguments to the script ) that resides in one particular folder ( for the purposes of this question let us call it /local/remote_only_scripts/foo ) and have that script execute and return it's output.  To be clear some examples of things I do not want the user to be able to do:   Locally log in to the account.  The login application is /bin/login. It is not a script in the /local/remote_only_scripts/foo folder, so should not be called by the user. Remotely log in to the account. Again login ( is that what is called by ssh? ) is not a script in the relevant folder. List the contents of the directory. ls is in /bin/ls. It is not a script in the appropriate directory. Edit a file in that directory. emacs, vi, gedit most other editors are not scripts in that directoy. View the contents of a file in that directory. Execute a file in that directory that he does not have permission to execute.   Note that these are examples there are many other actions which I do not want the user to be able to do. In considering an action, ask "is this being done by a script in /local/remote_only_scripts/foo?" if the answer is no the user should not be able to do it. If the answer is yes then the user should be able to do it.  PS: Let me clarify what I mean by "adding a user". I do not mean adding a user to some ssh subsystem. Rather I mean adding a user to the computer system. So, for example, I have a system running debian stable, call it by it's address, www.hg.bar.com. I want to add a user ( via kuser, users-admin or useradd or some similar way ) call him hg_guest. hg_guest cannot login locally or do any of the things in the above list. All hg_guest can do is execute scripts "remotely". I said he should be able to do so via ssh, but thinking about it now, maybe allowing him to use ssh may allow him to login in locally, so some other mechanism may be required.


I purchase a blue and red toad house in Mario Run. What is the point of purchasing those houses? Does it give you more toads or anything?

I have a few red Toads and a Toad is just hanging out in town. I see an option to buy a red Toad house, ostensibly for him. Are there any added benefits of purchasing this or are the colored Toad houses just cosmetic?


I have a problem with this limit, I don't know what method to use. I have no idea how to compute it. Can you explain the method and the steps used?  $$\lim _{x\to 0}\left(\frac{x\left(\sqrt{3e^x+e^{3x^2}}-2\right)}{4-\left(\cos x+1\right)^2}\right)$$

I have a problem with this limit, I don't know what method to use. I have no idea how to compute it. Is it possible to compute this limit with the McLaurin expansion? Can you explain the method and the steps used? Thanks. (I prefer to avoid to use L'Hospital's rule.)  $$\lim _{x\to 0}\frac{x\bigl(\sqrt{3e^x+e^{3x^2}}-2\bigr)}{4-(\cos x+1)^2}$$


I have the problem, that all my object look very unrealistic, even with shaders on them. I broke the problem down to copying a template object to my Blender file. In the original, it looks very realistic, but after copying to my project, it also looks like crap. I guess, that this has to do something with my world or render settings. Can someone help me fixing this problem?

I am trying to render a kitchen sink / Faucet    Here is another reference image of what I want   What I have got so far is this   Settings for World:  I have used an environment map HDRI with 0 saturation.  Material settings:  Triad with glossy, glass anisotropic and there mix shader combinations and the new principled bsdf shader too but didn't get the required result.  Studio lights: Followed multiple youtube tutorials on setting up studio lights in blender but the results were not what I wanted.    LEAVING CYCLES :  Decided to try some other software So, Downloaded Keyshot 5 but keyshot wasn't able to produce cycles like results LoL.  Not : I have always struggled to get professional quality product rendering in cycles      So now I'm back in cycles looking for help.


In a .cls file, which is referenced by my latex code, I have the following definition for the end of proof symbol:  \newcommand\qedsymbol{\hbox{\rlap{$\sqcap$}$\sqcup$}} \newcommand\qed{\relax\ifmmode\else\unskip\quad\fi\qedsymbol} \newcommand\smartqed{\renewcommand\qed{\relax\ifmmode\qedsymbol\else{\unskip\nobreak\hfil\penalty50\hskip1em\null\nobreak\hfil\qedsymbol\parfillskip=\z@\finalhyphendemerits=0\endgraf}\fi}}   Can somebody please explain what is happening here, and how should I change it, so that I can just have the black box symbol (■) at the end of the proofs.

When I write out my own proofs by hand on paper, I use my own personal variant of Q.E.D. / square to finish out the proofs (its a cursive version of my initials).   I've doodled up this icon on paint and want to insert it into my proof environments in the end as its Q.E.D. symbol.   I know how to change the symbol to whatever using   \renewcommand{\qedsymbol}{text here}   But I don't know how to extend this to use an image file rather than text. Any advice appreciated!


I am running QGIS 2.18.13 with Grass 7.2.2[1? ... can't remember which number was shown ... see comments below] installed via the OSGEO4W installer on both Windows 7 and Windows 10 (64bit).   (I have double checked within the OSGEO4W "advanced install" directory that the "qgis-grass-plugin7" and qgis-grass-plugin-common" are installed as for version 2.18.13-1)  The Grass Plugin/Toolbox is no longer in the Plugins Manager.  This plugin/toolbox was very handily available in recent versions but seems to have vanished though I am not sure with which update.  Is the plugin/toolbox still available?  How do I re enable it?

I've installed QGIS 2.16.3-1 on Windows 10 via the OSGeo4W 64-bit installer and also selected the following packages:   grass (7.0.5-1) qgis-grass-plugin7 (2.16.3-1) qgis-grass-plugin-common (2.16.3-1)   I can't find the GRASS plugin in the list of plugins at Plugins > Manage and Install Plugins > Installed (panel)  And the QGIS Browser can see the grass location and mapset folder, but doesn't have the GRASS icon like it does in Linux. So layers can't be added to the map. I guess that means that the gdal-grass plugin is unavailable as well.  I tried launching QGIS Desktop 2.16.3 with GRASS 7.0.4 but get the same results as above. Maybe the GRASS version mismatch is a problem or just a shortcut name typo.


I'am really shocked. Coconut battery shows 55.8% from Full Charge Capacity and battery is jumping in charge (like 90% after 5 minutes 50%).   And some time ago was "Service Battery" label, but after it have disappeared. It's not ok, I understand. Have checked serial for replacement program and it's not for my laptop. My keys are ok, and I can't replace top case by this.  I was at authorized service (I'm not from country where apple devices officially, just authorized). There they can replace it only for ~500$. I don't know what to do.  Please help, maybe advice?

Recently my Macbook Pro Retina Late 2013 has started to shut down unexpectedly while running on battery. I thought it was because of my CPU was too hot but it was not the case. When checking it further, I found that my battery status is "Service Battery". I used coconutBattery to check and found that the Full Charge Capacity of my Mac is insanely low. I could be sure that it was around 90% last week and suddenly now it dropped to 46.9% of the Design Capacity.    I tried resetting SMC like many other said but unfortunately, it did not work for me. One symptom I saw before having this issue is that my Macbook temperature was quite high. I could feel the obvious difference in temperature between my Macbook and others' at the office when touching my hand on it, I guess my Mac was about 10 degree Celsius higher than others.  Is anyone here had this issue before? Should I replace my battery completely? Is it possible to replace the battery only on this Mac, I think it is nonremovable?


I would like to give out a notification on screen by a script that is running by root on Ubuntu 14.04.  I tried this:  #!/bin/bash MAINUSER=$(cat /etc/passwd|grep 1000|sed "s/:.*$//g") su $MAINUSER -c 'notify-send "starting some scan... "' #.... su $MAINUSER -c 'notify-send "scan finished "'   which works fine and creates a notification, if you run it as root in a terminal, that was started in the desktop screen, but it doesn't if you change to another screen with Ctrl+Alt+F1 to start it from there as root.   I also tried it with export DISPLAY=:0; sudo -E -u rubo77 notify-send, but that didn't change the behaviour either.  I would like to add it here in my script to   relevant discussion:   I also tried to use  instead, but the same result

Maybe this is answered somewhere else, but I didn't see it.  I am running Ubuntu 14.04. When I SSH into my machine, for example:  ssh <user>@<machineip> notify-send "Hello"   I don't see anything on the monitor where I am logged into the machine. If I prefix notify-send with DISPLAY=:0.0 or DISPLAY=:0 nothing different happens. I just never see any notification on the current session.  Is there some trick/switch to getting this working?  In case this isn't clear, allow me to reiterate: From Computer A, I SSH into Computer B. Within the SSH session, I wish to execute notify-send to run on Computer B. I expect a growl-type notification to appear on the monitor of Computer B.