I am trying to make a table like the below image   here is the code i have been using:    \documentclass[runningheads,a4paper]{llncs}  \usepackage{amssymb} \setcounter{tocdepth}{2} \usepackage{graphicx} \usepackage[latin1]{inputenc} \usepackage[english]{babel} \usepackage{url}  \usepackage{float} \usepackage{booktabs}  \usepackage{hhline}% http://ctan.org/pkg/hhline  \usepackage{mathtools}  \usepackage{amsmath} \usepackage[english]{babel} \usepackage{booktabs,array}  \DeclareMathOperator\prb{probability} \DeclareMathOperator\cost{cost} \DeclareMathOperator\child{child}   \usepackage{lipsum} \setcounter{secnumdepth}{5} \begin{document}     \begin{table}[h!]   \centering   \caption{Cost oriented approach in A-ADTree}    \label{Cost oriented approach in A-ADTree}   \begin{tabular}{ |m{2.5cm}| m{4cm} | m{7cm} |}     \hline      case &  A-ADTree-Structure &  Selection metric \\      \hline         Disjunctive     &         \begin{minipage}{.3\textwidth}           \includegraphics[width=\linewidth,height=60mm]{img/conjunction-abstract-form-attack.jpg}         \end{minipage}     &      In cost oriented approach        \begin{align*}            \arg \ \min \ \cost \ i   \\            i \in \ \child(V)         \end{align*}         In probability oriented approach        \begin{align*}            \arg \ \max \ \prb \ i   \\            i \in \ \child(V)         \end{align*}     \\ \hline         Conjunctive     &         \begin{minipage}{.3\textwidth}           \includegraphics[width=\linewidth, height=60mm]{img/disjunction-abstract-form.jpg}         \end{minipage}     &         $$\ root.cost =\sum_{n=1}^{\ n} child_i.cost $$         $$\ root.probability= \prod_{n=1}^{\ n} child_i.probability $$     \\ \hline            Countermeasure     &         \begin{minipage}{.3\textwidth}           \includegraphics[width=\linewidth, height=60mm]{img/Cp.jpg}         \end{minipage}      &           \begin{align*}            \ \mathrm{Mainpro}_\mathrm{parent} \  is \ probability \ of \ parent \ node \ regardless \ of \ the \ countermeasure\\            \ \mathrm{pro}_\mathrm{parent} \ is \ the \ probability \ of \ parent \ considering \ countermeasure\\            \ \mathrm{pro}_\mathrm{child} \ is \ the \ probability  \ of \  countermeasure \ child\                   \end{align*}         \begin{equation}           \mathrm{pro}_\mathrm{parent} = \mathrm{Mainpro}_\mathrm{parent}            \times (1 - \mathrm{pro}_\mathrm{child})         \end{equation}       \\ \hline    \end{tabular} \end{table}  \end{document}   Almost everything is fine with the table, except its width exceeds the width of the paper. So, how can i fit it into the page?  The below image shows the output

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


I'm working on my first Android game and have been struggling a bit with scaling.  I've got 3 test devices 800x480, 1920x1080 and a 2560x1600 tablet. Some games look near perfect on all of them - many other games don't, including mine.  I'm really struggling with images looking blocky when scaling. I'm using the libdgx library, and have turned on linear filtering for everything. Almost always scaling down. Fonts are something I'm really struggling with.  I've been dissecting the apk's of various games for tips but can't see anything in particular that they're doing. In one game I examined (Candy Crush Saga) there's only 1 set of images, they only use 1 font. They also have a ttf in there, but I can't work out where that's used. The main font in a pre-created bitmap font.  Does anyone else have any tips or tricks. Ho do others manage it, especially the font scaling?

I'm making a 2D (Android) game. Android devices vary quite a lot in screen resolution; what do I need to keep in mind when making my game?   Do I need to keep big versions of all images and scale down depending on the resolution (doesn't that waste space)? Do bitmap fonts scale well or do I need to use something else? Anything else I'm forgetting?


How do I resize lvm partition on ubuntu 17.10 without loss of data?

I want to shrink my second (LVM) partition, in order to create a new partition in the newly freed space. I am using the Live CD to do so, because I know I can't resize/move this partition while it is in use. When I opened GParted in the Live CD, I realized that I could not resize the partition, because when I right-click it, the option "resize/move" is disabled.  I tried to unmount it, to "lazy" unmount it (umount -l /dev/sda2) but it didn't work.  A screenshot from GParted:


I was reading Schutz, A First Course in General Relativity. On page 9, he argued that the metric tensor is symmetric:     $$ ds^2~=~\sum_{\alpha,\beta}\eta_{\alpha\beta} ~dx^{\alpha}~dx^{\beta} $$   $\text{Note that we can suppose}$ $\eta_{\alpha\beta}=\eta_{\beta\alpha}$ $\text{for all}$ $\alpha$ $\text{and}$ $\beta$ $\text{since only the sum}$ $\eta_{\alpha\beta}+\eta_{\beta\alpha}$ $\text{ever appears in the above equation when}$ $\alpha\neq\beta$.   I don't understand his argument. If someone can explain why, I would really appreciate it.

Why is it that all problems I encountered until now have  that when represented in a matrix form turn out to be symmetric? Aren't there asymmetric matrices representing some metrics?


I recently bought a refurbished Nikon D3200 DSLR and saw this speck in the viewfinder.  My question: is it just dust or a scratch?  (This does not effect my photos- just the viewfinder.)

My viewfinder (not LCD) has spots of dust on it.  What is the best way to clean the inside?  I have cleaned the outside with a QTip.


i have managed to create script for search cursor which will replace the text element in one of the template from help provided from my previous question  I would like to know how i can specify the predefined template in the script below so that the script automatically load the template..   Currently i am change the template manually. the template is located in my Map template folder inside Arcgis installation directory.  note: this script is used in creating a map printout which also has select by attribute > zoom to selected feature, change view to layout view > update text element > print.   import arcpy mxd = arcpy.mapping.MapDocument(r"Current") table = r"C:\Users\name\Documents\ArcGIS\DATA.gdb\\Layer" # lyr from which data will be pulled value = arcpy.GetParameterAsText(0)# enter UNIQUE_REC from layer query = "\"UNIQUE_REC\" = %s" % (value) # string conversion via str() prior to formatting theseRows = arcpy.SearchCursor(table, query)  for row in theseRows: if theseRows:     print(row.getValue("LOT")) else:        print "CORRECT UNIQUE_REC" for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):    if elm.text == "text7":      elm.text = (row.getValue("LOT"))   arcpy.RefreshActiveView() del mxd

Using ArcMap 10.1, since there is not a way to control portrait or landscape of the layout view through python, is there a way to switch layout templates without opening a new mxd through python?   Since there is a change layout template button it would be nice to have a python function to do the same.


I'm trying to understand which supervised learning algorithms require normalization/scaling of features.  It appears that when an algorithm works by calculating the conditional probability (Naive Bayes, Linear Discriminant Analysis), then normalization is not necessary.  However, for algorithms that use any kind of distance metric (K-nearest neighbors, Support Vector Machine), then normalization is necessary.   Is this right?  I'm a complete n00b so please jump in and correct me wherever appropriate.

In some literature, I have read that a regression with multiple explanatory variables, if in different units, needed to be standardized.  (Standardizing consists in subtracting the mean and dividing by the standard deviation.)  In which other cases do I need to standardize my data?  Are there cases in which I should only center my data (i.e., without dividing by standard deviation)?


ever since updating my mac to high sierra my kernel_task has been using way too much RAM up to 1gb (i have 4 gb of RAM).  Any solutions on how to resolve this?

I was using my MacBook Pro (with 16GB of RAM) as usual and out of blue I've this popup that:  Your system has run out of application memory. To avoid problems with your computer, quit any applications you are not using.   I've obviously closed few which I could, but it didn't help. After checking on memory, it seems kernel task ate 7GB and 22.36GB swap memory was used of total 23GB (which obviously was the case). However I've still 20GB of space free on my SDD.  Activity Monitor didn't help much whilst my OS X was heading to the destruction.    My top stats before my kernel freeze: Processes: 344 total, 2 running, 5 stuck, 337 sleeping, 2580 threads                                                                                19:23:56 Load Avg: 1.56, 1.62, 2.09  CPU usage: 3.51% user, 8.47% sys, 88.1% idle   SharedLibs: 46M resident, 0B data, 6572K linkedit. MemRegions: 757970 total, 2139M resident, 56M private, 907M shared. PhysMem: 9410M used (6198M wired), 556M unused. VM: 1155G vsize, 1311M framework vsize, 112872658(320) swapins, 122668389(0) swapouts. Networks: packets: 299419263/363G in, 142126838/14G out. Disks: 58970173/1079G read, 20012389/1120G written.  At the end my OS X frozen and I had to do hard reset, repair my SDD in recovery mode and fixing afterwards (recovering lost work, fixing application conflicts, checking my lost+found folder, Chrome/Terminal tabs gone, headache, etc.). My question is, how do I check on high memory usage of kernel task or how to properly deal with that kind of situation? I've tried to take Sample with Activity Monitor, but it's greyed out.  My MacBook Pro details: 2.3GHz Intel Core i7 (late 2013) with 16GB RAM. OS X: 10.9.5


Is there any way in Windows explorer to specify arguments which will be added whenever opening a file? I didn't see anything that seemed relevant in Properties...

Is it possible to set default parameters for an application in Windows XP? (without using a shortcut) For example, I want Firefox to run with the parameters "-p username" when I run "firefox.exe".


I need to remove the last character from a string in this command:  sudo docker stats --no-stream 39858jf8 | awk '{if (NR!=1) {print $2}}'  The result is 5.20% , I need remove the % at the end, giving 5.20.  Is it possibile to do this in the same command?

I want to remove last character from a line:  [root@ozzesh ~]#df -h | awk  '{ print $5 }' Use% 22% 1% 1% 59% 51% 63% 5%  Expected result:  Use 22 1 1 59 51 63 5


Working through Chapter 3 of Spivak's Calculus.  The question is:  If $x_1, x_2, \ldots, x_n$ are distinct numbers, find a polynomial function $f_i$ of degree $n-1$ which is 1 at $x,$ and 0 at $x_j$ for $j \ne i$. Hint: the product of all $(x - x_i)$ for $j\ne i$, is 0 at $x_j$ if $j \ne i$. ( This product is usually denoted by  $\prod_{j=1,j\ne1}^n (x - x_j)$  I stared at this for awhile and it never made sense. So I went to the answer key so I could work backwards to understand the problem.  The answer is  $f_i(x) = \frac{\prod_{j=1}^n (x-x_j)}{\prod_{j=1}^n(x_i - x_j)}$  I stared at this too and the problem was just as perplexing as before.  I see that the answer expands to  $f_i(x) = \frac{(x-x_1)(x-x_2)\ldots(x-x_n)}{(x_i-x_1)(x_i-x_2)\ldots(x_i-x_n)}$  but so what? How is this a solution to the problem?  Assuming $n = 2$, we would have  $f_i(x) = \frac{(x-x_1)(x-x_2)}{(x_i-x_1)(x_i-x_2)} = \frac{x^2 - x_1 x - x_2 x + x_1 x_2}{x_i^2 - x_1 x_i - x_2 x_i + x_1 x_2}$  This is some arbitrary rational function. To me, it doesn't feel like an answer.  Here are some specifics I don't understand.  1) I see that we have a sequence of numbers. The index of the sequence is j. What is i supposed to be? Sure $j \ne i$, but how is that different from saying that $j \ne blah$  2) The question says "a polynomial of $f_i$ of degree $n - 1$, which is 1 at $x_i$". Does that mean $f_i(x_i) = 1$ or $n - 1 = 1$ when $x=x_i$?  3) Similarly, what is meant by it equals "0 at $x_j$" ?  Can anyone shed some light on this?

Yet again I find myself stuck on a Spivak question. This time it is simply the question that isn't clear to me. It states:  If $x_1, ..., x_n$ are distinct numbers, find a polynomial function $f_i$, of degree $n-1$ which is 1 at $x_i$ and 0 at $x_j$ for $j\neq i$. Hint: the product of all $(x-x_j)$ for $j\neq i$, is 0 at $x_j$ if $j\neq i$. This product is usually denoted by: $$\prod_{\begin{smallmatrix}{j=1}\\ {j\neq i} \end{smallmatrix}}^n(x-x_j)$$  To be honest I don't know where to begin. I understand how to create a polynomial equation for a given set of results but this is quite strange. I'm not sure exactly what the author is expecting.  The answer book shows:  $$f_i(x)={\prod_{\begin{smallmatrix}{j=1}\\ {j\neq i} \end{smallmatrix}}^n(x-x_j)}/{\prod_{\begin{smallmatrix}{j=1}\\ {j\neq i} \end{smallmatrix}}^n(x_i-x_j)}$$  Which I have expanded out just fine but don't know what to do with.


For creating new CSS rules in a stylesheet, as of now, I only know .insertRule() (excluding the non-standard ways).  Are there any other ways of creating more CSS rules? Something, for example: Warning: this is not standard, it is just an example to display the intent  var rule = new CSSStyleRule(); rule.selectorText = '.selector'; rule.style.display = 'block'; rule.style.color = 'red'; ruleSet.append(rule);   Anything like or somewhat like the above works as an answer. Instead of new, it may be document.createCssRule() or stylesheet.createCssRule()... I just this it would be useful for a piece of software I'm developing which left me if there's a programatically way of modifying values in such interface where to add new stuff is not restricted to a parsed string.  Do not worry about IE9 and below when answering, please.  Note: (to unclose) This is not about how to find and modify current CSS rules, this is about making new ones without using the text parser which is what .insertRule() is without building a complete CSS string like .insertRule() requires.

It's easy to set inline CSS values with javascript. If I want to change the width and I have html like this:

   All I need to do is:  document.getElementById('id').style.width = value;   It will change the inline stylesheet values. Normally this isn't a problem, because the inline style overrides the stylesheet. Example:

   Using this Javascript:  document.getElementById('tId').style.width = "30%";   I get the following:

   This is a problem, because not only do I not want to change inline values, If I look for the width before I set it, when I have:

   The value returned is Null, so if I have Javascript that needs to know the width of something to do some logic (I increase the width by 1%, not to a specific value), getting back Null when I expect the string "50%" doesn't really work.  So my question: I have values in a CSS style that are not located inline, how can I get these values? How can I modify the style instead of the inline values, given an id?


It seems like Make does not persist the value of a variable but instead re-evaluates it every time you call it. For example:  I have a Makefile where I define a variable MY_VAR as the first twelve digits of a hashed version of the current date. I have three targets target_1, target_2 and target_3 that:   echo $(MY_VAR) once echo $(MY_VAR) twice call target_1 and target_2   When I run make target_3, I expect the same hash to be printed three times. But instead, I get something like:  >>> make target_3 017af0c6483b 9873732118e7 7c78d1e4ba89   Here the complete Makefile:  MY_VAR=$(shell date +%s%N | sha1sum | cut -c1-12)  target_1:     @echo $(MY_VAR)  target_2:     @echo $(MY_VAR)     @echo $(MY_VAR)  target_3: target_1 target_2   What's the best way for persisting the value of a variable in Make, instead of re-evaluating? My current work around is that I write the first hash code into a file.

Can anybody give a clear explanation of how variable assignment really works in Makefiles.   What is the difference between :   VARIABLE = value  VARIABLE ?= value  VARIABLE := value  VARIABLE += value   I have read the  in GNU Make's manual, but it still doesn't make sense to me.


So i have this integral   $$\int_{\sqrt[3]{4}}^{\sqrt[3]{3+e}}x^2 \ln(x^3-3)\,dx.$$  I was thinking of using u subsitution to make everything easier.   I made $u = x^3-3$ and $du = 3x^2dx$.  So I would then re-write my integral as   $$1/3\int_{\sqrt[3]{4}}^{\sqrt[3]{3+e}} \ln(x^3-3)\.$$  How would I proceed from here. Should I plug in the integral values? Wouldn't I need to integrate the $\ln()$? Should I use u substitution again? Please help!  I already asked this question, so don't mark it as a duplicate. Unfortunately I couldn't understand what other people were writing.

![][1]  So i have this definite integral:  $$\int_{\sqrt[3]{4}}^{\sqrt[3]{3+e}}x^2 \ln(x^3-3)\,dx.$$  I thought of using integration by parts. So \begin{align} u & =\ln(x^3-3) \\[8pt] du & =\frac{3x^2}{x^3-3} \\[8pt] dv & =x^2 \, dx \\[8pt] v & =\frac{x^3} 3 \end{align}


I have a cloudserver running on rackspace with Ubuntu 12.04 LTS  The server is a LAMP stack that runs multiple live websites. Most sites are wordpress while others are PHP with a few scripts that use the mail() function to send emails.  I have followed several tutorials to no avail to get emails to send. The closest I have come are somewhat successful outcomes with very significant drawbacks:  1) In one setup, I have been able to get the server to send emails, but they end up in the spam folder  2) In another, I have been able to get emails successfully into the inboxes of recipients, using an SMTP relay (through GMail), but all emails are listed as sent from the gmail address I am relaying. (I used this tutorial to achieve this:  )  My server has postfix installed, and is currently setup using method 2, described above.  What I would truly like, if possible, is to setup my server, using postfix or otherwise, to be able to send emails from something like noreply@domain.com, for all of the domains I currently host, as well as other domains I will surely be hosting in the future.  Ideally, new sites/domains will be added to the server, and I wont have to worry about configuring ubuntu/postfix to send emails for that domain. For instance, with the Windows server we are migrating from, we were able to add new sites/domains and send emails from those domains without any additional configuration for emails.  A lot of tutorials get into setting up PRL records and what-not to bypass spam filters - but with our windows setup, we never had to do such things. Is there a possible way to setup my ubuntu server to send emails for various domains (ie: wordpress installs on our windows server automatically send emails as wordpress@domain.com - and get by spam filters, without needing to add PRL records to the DNS Zone files)  I have been through several tutorials but the best success I have had are only those listed as 1 & 2 above.  Thank's so much for your help, I'm available to get additional info if needed, please request as needed.

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


I don't understand what the goals are of a Chosen Ciphertext Attack.  What I've read from Wikipedia is that it is an attack one can use to obtain the key that the crypto algorithm uses.   However, I think that every file is usually encrypted using a different key. If so, why is the chosen ciphertext attack used ? Maybe I don't quite understand the concept of a key...  I'm no mathematician or cryptoanalyst but a simple curious boy :)

I'm trying to understand the difference between the following and what they actually mean :   Known plaintext attack Known ciphertext attack Chosen ciphertext attack Chosen plaintext attack   Any clarification is much appreciated…


I am struggling with a combinatorics problem stated in a title. It has to be said, that the 8-element set we are left after removal of the rest of elements has to be ordered without rearranging the leftover elements. Also, the numbers in the original 50-element set are all unique and the ordered set of 8 can be  sorted both ways, biggest to smallest or smallest to biggest, it doesn't matter. Even a hint where to start with this question would be welcome, I am completely crushed by this question.

Erdős-Szekeres Theorem: Any finite sequence of $n^2+1$ real numbers contains a monotonic subsequence of length at least $n+1$.  I was wondering what are the most important applications of the Erdős-Szekeres Theorem.  For example, I have seen the use of the theorem in monotone sequences where one can claim that any sequence contains a monotone subsequence. In other words, one asserts that it is always certain to find ordered substructures of large disordered structures.  Does anyone know any other applications of the above theorem?  Thank you.


I'm sorry if this is a noob question. I have searched some online. But can't really figure out how. I think I have a weird BIOS.. I'm trying to change the BIOS security settings.

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


Windows 7 has various fonts that cover different scripts within Unicode. However, the free  provide a good alternative, covering a very large portion of Unicode with a visually uniform design.  I want to make these Noto fonts behave as one giant font in Windows. I know that Windows 7 provides a  mechanism, but I don't know how to link all the Noto fonts together.  Specifically, my questions are:   What registry keys do I need to create in order to define the linked font? What else must I do to enable the font linking feature?

Recently I re-installed Windows XP English, and after setting the locale to Japanese, and installing my favorite fonts, all Japanese text in the GUI became strange. The GUI font is Tahoma (default).  In the past it would render foreign scripts with Windows' own fonts, but now, for some reason, it's using one of my own installed fonts, and a bad one at that! (the font I call Kiddie in this screenshot)    I deleted this font, and then windows took one of the very unreadable semi-cursive fonts. I re-installed the Kiddy font and windows immediately used that again (all without rebooting)  Does anyone know how to change/alter/configure the windows font fallback strategy? I don't care if it takes third-party software.


A very basic question.   Whether all packages installed by apt-get install reside in the same folder? If yes, where?  If no, how to find the location?  I am in the case of installing matplotlib Basemap and it requires me to know where libgeos_c or geos_c.h file are located. I installed libgeos-3.4.2 using apt-get install and had no idea to find those files. Further question, what is whichcommand doing? I did which libgeos and it didn't output, while doing which python gave /usr/bin/python

For some applications its fairly easy enough to locate where the application was installed to using the "which" command.  However, some applications such as Tomcat are a little out of my league to locate.  I'm asking for particular methodology that can be applied to any apt-get install  to locate where the binary, library, and support files are installed to.  The cause of this question is that I installed Tomcat7 and I can's seem to locate it and I have a list of customizations to perform.


I recently  that the review queue for low quality posts includes audits from those posts flagged as spam.  Just today I came across a post in said queue that actually looked like spam. A very short answer with a link to a commercial product that did not answer the OPs question.  So I clicked on "Recommend Deletion", and... there is no way to give "Spam" as the reason. The best option I could find was "No comment needed". All other reasons would have been plain wrong.  So I suggest either removing the "Spam" audits from the queue, OR giving the option to recommand deletion as "Spam".   It's somewhat sadistic to audit for Spam, without providing a good way to actually handle spam. I know the audits only check if you clicked on "recommand deletion", but anyway... if you want me to identify Spam, let me identify Spam.

I guess this is an additional to previous requests like  and .  But I just came across  review item, and was unable to flag it as spam.  edit: Since I posted this, the item has been removed (deleted) here is a screenshot:


Just like loaning out money carries risk, does loaning out your stock shares also carry risk?

Some types of brokerage accounts allow the stock broker to lend my shares to short sellers (probably without needing to notify me). Do I incur any risks when I sign up for such accounts? Is there any risk that I can lose my shares? If there are risks, how am I compensated for the risk (e.g. higher interest rates on idle cash, a small share of the commissions from the short seller, etc.)?


If $0\leq\theta\leq360$, and: $$\tan \theta=2+\sqrt{3}$$  Where $\theta$ is in degrees . How to find $\theta$  (without using a calculator) ? Can anyone give me some hints?

My (very simple) question to a friend was how do I prove the following using basic trig principles:  $\tan75^\circ = 2 + \sqrt{3}$  He gave this proof (via a text message!)  $1. \tan75^\circ$   $2. = \tan(60^\circ + (30/2)^\circ)$  $3. = (\tan60^\circ + \tan(30/2)^\circ) / (1 - \tan60^\circ \tan(30/2)^\circ) $  $4. \tan (30/2)^\circ = \dfrac{(1 - \cos30^\circ)}{ \sin30^\circ}$    Can this be explained more succinctly as I'm new to trigonometry and a little lost after (2.) ?    EDIT  Using the answers given I'm almost there:   $\tan75^\circ$    $\tan(45^\circ + 30^\circ)$   $\sin(45^\circ + 30^\circ) / \cos(45^\circ + 30^\circ)$   $(\sin30^\circ.\cos45^\circ + \sin45^\circ.\cos30^\circ) / (\cos30^\circ.\cos45^\circ - \sin45^\circ.\sin30^\circ)$    $\dfrac{(1/2\sqrt{2}) + (3/2\sqrt{2})}{(3/2\sqrt{2}) - (1/2\sqrt{2})}$   $\dfrac{(1 + \sqrt{3})}{(\sqrt{3}) - 1}$   multiply throughout by $(\sqrt{3}) + 1)$   Another alternative approach:   $\tan75^\circ$    $\tan(45^\circ + 30^\circ)$   $\dfrac{\tan45^\circ + \tan30^\circ}{1-\tan45^\circ.\tan30^\circ}$   $\dfrac{1 + 1/\sqrt{3}}{1-1/\sqrt{3}}$   at point 6 in above alternative


by setting a page, to "register" users into a mysql database, and using the following code:  $name = $_POST['name']; $saltedpwd = md5($definedsalt.$_POST['pwd']); $email = $_POST['email'];  $query = "INSERT INTO `users` ( `name`, `pwd`, `email` ) VALUES ( '$name', '$saltedpwd', '$email' )"; $insert = mysqli_query($database, $query);   is it vulnerable to any possible SQL injections?  About the email activation code, using this code:  $address = $_GET['email'];  if (isset($_GET['val']) && (strlen($_GET['val']) == 64)) { $validate = $_GET['val']; }  if (isset($address) && isset($validate)) { $query = "UPDATE users SET activated = 'true' WHERE ( email ='$address' AND validate='$val' ) LIMIT 1"; $result_query = mysqli_query($database, $query);  $get_member = ($database, "SELECT name FROM users WHERE email = '$email'"); $query_get = mysqli_fetch_array($get_member); $validated_name = $query_get['name']; $insert_validate = "INSERT INTO `member` ( `name` ) VALUES ( '$validated_name' ); $result_insert = mysqli_query($database, $insert_validate);   Is it then vulnerable to any SQL injections? I suppose yes, because I have to retrieve the value from a $_GET request, so I guess them are allowed to put something like:   page.php?email=address@address.com'SQL_INJECTION'&val=123456asdfghjkl   Am I wrong?  If it is actually vulnerable, how do I prevent any injections?

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 im building a game in GameMaker(A engine im good with), the development is going great and im making good progress. (Not going to go into detail about the game, its unrelated) but the problem i have is that when i do an update the player is required to start a new game as you cant load an old world into the new version (Not sure why, although i think i know) and i want a system that will just update the players current world with the new items, creatures etc. i have tried making the game use older versions of the save file, but it just loads the save file without the new items and creatures.  Edit i think i cant load a old world into the updated game because of it only having the save for the old items etc.(Not sure if this is correct though) Edit 2.0 the version is the games version, say if i tried to update to version 2 and the save is version 1, it wont load version 1 with the updated stuff in version 2.

I have a complex sim game I want to add save game functionality to. I'll be updating it with new features continually after release.  How can I make sure my updates don't break existing save games? What sort of architecture should I follow to make this possible?


On my PCB I'm trying to avoid a level shifter chip. So is it possible to connect my ARM CPU's GPIO pin (which runs at 3.3V) to the reset pin of the AVR chip?  I was thinking of setting the ARM GPIO pin to either low (to reset) or to set it to tri-state (let it float) and let the internal pullup of the AVR take it out of reset...  Do you see any issues with this?

I have a ATMEGA328(AVR) connected to a Raspberry Pi(RPI) via serial using a level shifter.   The AVR has the Arduino Bootloader installed and I would like to program it via serial.  What would be the best way to connect the AVR reset pin to the RPI GPIO pin 4?   (Keep in mind that the AVR reset pin has a 5V pull-up resistor connected to it.)


By considering $\sum_{r=1}^n z^{2r-1}$ where z= $\cos\theta + i\sin\theta$, show that if $\sin\theta$ $\neq$ 0, $$\sum_{r=1}^n \sin(2r-1)\theta=\frac{\sin^2n\theta}{\sin\theta}$$   I couldn't solve this at first but with some hints some of you gave, I was able to come up with my own solution. Here it is:  First, we want to consider what is given in the question, $$\begin{align} \sum_{r=1}^n z^{2r-1} & =z+z^3+z^5...\\ & = z + z(z^2)+z^3(z^2)+...\\ \end{align}$$ In Geometric Progression, sum is given by $$\sum_{r=1}^n z^{2r-1}=S_n = \frac{a (1-r^n)}{1-r}=\frac{z(1-(z^2)^n)}{1-z^2} = \frac {z-z^{2n+1}}{1-z^2}=\frac {1-z^{2n}}{z^{-1}-z} $$ Now, substitute $z = \cos \theta +i \sin \theta$  $$\begin{align} \sum_{r=1}^n z^{2r-1} & =\frac{1-(\cos (2n\theta) + i \sin(2n\theta))}{\cos\theta - i\sin\theta-(\cos\theta+i\sin\theta)} \\  & = \frac{1-\cos (2n\theta) - i \sin(2n\theta)}{-2i\sin\theta} \cdot \frac{(i\sin\theta)}{(i\sin\theta)}\\   & = \frac{i\sin\theta-i\sin\theta \cos (2n\theta) +  \sin\theta \sin(2n\theta)}{2\sin^2\theta} \\ \end{align}$$ Equating imaginary parts, $$\sum_{r=1}^n \sin(2r-1)\theta = \frac{\sin\theta (1 - \cos(2n\theta))}{2\sin^2\theta} = \frac{\sin^2n\theta}{2\sin\theta} $$

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


I've tried for hours to install nvidia drivers for my laptop. The standard nvidia-390, the newer nvidia-418 through the repo, various other versions, the .run files from Nvidia's website, tried changing into lightdm, tried the various grub parameters like nomodeset etc. Last thing I tried was installing nvidia-384 because why the hell not at this point, which resulted in a login loop. Not the first time this is happening either, the standard nvidia-390 does the same and I have no idea why. Has someone managed to install nvidia drivers in a similar system that could help me? Thank you. Edit: I've disabled secure boot, so unless my BIOS is lying to me, this shouldn't be an issue...  EDIT 2: After installing nvidia-driver-418 I can boot the system, but the command nvidia-settings give me this output:  ERROR: Unable to load info from any available system   (nvidia-settings:2477): GLib-GObject-CRITICAL **: 12:22:32.065: g_object_unref: assertion 'G_IS_OBJECT (object)' failed ** Message: 12:22:32.070: PRIME: No offloading required. Abort ** Message: 12:22:32.070: PRIME: is it supported? no   And the nvidia-settings window is empty. Any ideas?

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


function makeCounter() {     var i = 0;     return function() {         console.log( ++i );     }; }  var counter = makeCounter(); counter(); // logs: 1 counter(); // logs: 2   why the result of counter() invoked the second time is '2' but not '1'?  I try to find out its executing processes, so I rewrite makeCounter():  function makeCounter() {     var i = 0;     console.log('outer');     return function() {         console.log('inner');         console.log( ++i );     }; }  var counter = makeCounter(); counter(); counter();   and result is:  outer inner 1 inner 2   Can I think that: i is the argument of function counter(), the first counter() executed, i changes to '1'. So the second counter() executed, i is '2'.

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I'm have an issue with changing the visibility of my buttons.  Whenever I use the setVisibility() method I get a nullPointerException.  Here is the error I get:   04-08 15:59:02.529: E/AndroidRuntime(2807): FATAL EXCEPTION: main 04-08 15:59:02.529: E/AndroidRuntime(2807): java.lang.NullPointerException 04-08 15:59:02.529: E/AndroidRuntime(2807):     at com.android.Rides.RideTracking.onClick(RideTracking.java:307) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at android.view.View.performClick(View.java:4204) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at android.view.View$PerformClick.run(View.java:17355) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at android.os.Handler.handleCallback(Handler.java:725) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at android.os.Handler.dispatchMessage(Handler.java:92) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at android.os.Looper.loop(Looper.java:137) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at android.app.ActivityThread.main(ActivityThread.java:5041) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at java.lang.reflect.Method.invokeNative(Native Method) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at java.lang.reflect.Method.invoke(Method.java:511) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 04-08 15:59:02.529: E/AndroidRuntime(2807):     at dalvik.system.NativeStart.main(Native Method)   Here is the code:          public View btnStart = null;         public View btnPause = null;         public View btnResume = null;          case R.id.btnPauseRide:             mLoggerServiceManager.pauseGPSLogging();              setResult( RESULT_OK, intent );             btnPause.setVisibility(View.GONE);             btnResume.setVisibility(View.VISIBLE);             break;          case R.id.btnResumeRide:              mLoggerServiceManager.resumeGPSLogging();             setResult(RESULT_OK, intent);              btnResume.setVisibility(View.GONE);             btnPause.setVisibility(View.VISIBLE);         default:                             break;   Any help would be greatly appreciated.

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?


how can I find the CPU and speed of a UCS B230 Blade server? The chassis that I have do not power on and I was wondering if there is another way to find the specifications of these servers (ie. serial number etc.?  My last resort is to take the heat sink off and check and then put it back on (yes, I know I need to clean and prep before I reset the heat sink unit).

Is there a way to see the processor and speed of a Cisco UCS B230 Blade Server without the enclosure that runs it? The enclosure that we have does not power on and all I need is to see what cpu and processor speed is in it.


I'm trying to read a normal file from HDFS in class which I would be executing through spark-submit.  I have a method which does a String operations and its from this string output I create RDD.  I'm performing the below string operations before creating an RDD.   Should I use a StringBuilder or a StringBuffer for the variable valueString ?          while ((line = bf.readLine()) != null) {         String trimmedLine=line.trim();         if(trimmedLine.charAt((trimmedLine.length()-1))==';'){             if(extractionInProgress){                 valueString=valueString.concat(trimmedLine.substring(0,trimmedLine.indexOf(";")));                 keyValues.put(searchKey, valueString);                 extractionInProgress=false;                 valueString="";             }             else{                 int indexOfTab=trimmedLine.indexOf(" ");                 if(indexOfTab > -1){                     String keyInLine=trimmedLine.substring(0,indexOfTab);                     valueString=trimmedLine.substring(indexOfTab+1,trimmedLine.indexOf(";"));                     keyValues.put(keyInLine, valueString);                     valueString="";                 }             }         }         else{             if(!extractionInProgress){                 searchKey=trimmedLine;                 extractionInProgress=true;             }             else{                 valueString=valueString.concat(trimmedLine.concat("\n"));             }         }     }

What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?


I got a shapefile which is in degrees format. For a vector analysis, I need it to be in meters to set a maximum distance. I can't do that with degrees. I know about on the fly CRS change; That's not what I ask about.

I have a global map with CRS WGS84-EPSG:4326 and I want to calculate the area of my polygons. From what I read, to change the unit from degrees to meters I need to change my CRS. However, there is no global system for this. Is there any solution to change the unit from degrees to meters for a global map?


What exactly makes an object move? Momentum is $\vec p= mv$ where $m$ is mass of an object and $v$ is the velocity of an object, and as a result of this when I fire a bullet the bullet may travel much faster but the gun will recoil or move in opposite direction with the same momentum.  This seems well and good and we can say momentum makes objects move, but since kinetic energy is $\frac{1}{2}mv^2$ where $m$ is mass of an object and $v$ is the velocity of an object. That let us assume the mass of the bullet is $10$kg (very large bullet!) and is accelerated or is velocity is $1000$ $m/s$ which should mean that the kinetic energy is $5,000,000$ joules of Kinetic Energy and momentum is $10000$ $kg$ $m/s$. That said let us assume the mass of the gun is $100$ $kg$ then for the momentum to be conserved here then the velocity of the gun that would recoil backwards would be $100$ $m/s$ so its kinetic energy is $500,000$ joules which is 10 times less than the bullet.    I'm confused here, because of newtons 3rd law - "Every action has an equal and opposite reaction" so I think momentum moves an object but however kinetic energy is the energy of the movement so shouldn't both (gun & bullet) have equal kinetic energies?

Here is a classic problem:     A 60kg boy and a 40kg girl are sitting in front of each other on skateboards on a frictionless horizontal surface. The boy pushes the girl and the girl gains a velocity of 0.3m/s during the 0.5s the boys hand was in contact with her. What is the boy's resulting velocity?   Considering Newton's Third Law, the best way is to find the total force applied and rearrange the formula to find the boy's speed.  Newton's Law Method:  $F = m*a$  $a=\frac{0.3m/s}{0.5s}$  $F = 40kg * 0.6m/s^2$  $F = 24N$  Therefore the boy's speed will be:   $\frac{24N}{60kg} = a$  $a = 0.4m/s^2$  $v = 0.4m/s^2 * 0.5s$  $v = 0.2m/s$  Kinetic Energy Method:  $E_{k}=\frac{1}{2}*m*v^2$ the girl's kinetic energy  $E_{k}=\frac{1}{2}*40kg*(0.3m/s)^2$  $E_{k}=1.8J$  Since every action has an equal and opposite reaction the boy should have the same amount of kinetic energy.  $E_{k}=\frac{1}{2}*60kg*(0.2m/s)^2$  $E_{k}=1.2J$  As you can see, using Newton's Third Law, the kinetic energy was not the same. So what's going on here? I thought that in this case they should both have the same amount of kinetic energy due to Newton's Law. I must be missing something since there is more energy going in one direction than the other after meeting. My book used the first method as the answer and, well, it feels wrong.


This question is from my complex analysis assignment and I need help in it.  Suppose $u_1(z) $ and $u_2(z)$ are harmonic in simply connected domain D, with $u_1(z0 u_2(z)\equiv 0$ in D. Prove that either $u_1(z) \equiv 0 $ or $u_2(z) \equiv 0$ in D.  I first tried to prove $u_1 u_2$ is harmonic but they need not be. then I thought of using the result That every harmonic function is real part of an analytic functionand then Mean value theorem but I couldnot  use that to sucessfully solve it. Can you please help me with this?

"Let $u, v$ be harmonic functions on a region G. Prove that if the product $uv$ is identically zero, then either $u$ or $v$ must be identically zero." Could sb. give me a hint for this question? I tried all the properties and theorems on harmonic functions (definition, poisson integral, max. principle, passed a holomorphic function,..), but could go nowhere.  Thanks.


I run an online shop and I have been using Nikon 3100 for many years. Recently I started to notice that in all the pictures the right side slowly gets dark and there is a dark slit almost look like a vignette on the edge. I knew there were something not right but I could still use photoshop to solve that problem.   But all of sudden all the pictures are looking like that since yesterday. I use two strobe lights and manual mode to take studio pictures, strange thing is the shadow only appears in that circumstances. The pictures are absolutely normal when I use the other modes. My shutter speed is 1/250.   Can anyone tell me what’s wrong with my camera? Is it the shutter?

This is my very first day of shooting with flash and remote flash. And picture turned out like this: Bottom half of it is black. I have no idea what has caused this and how to prevent it? I just know that after this I shot a few more frames without flash or only with the camera's built-in flash and they were fine so I know the camera is not broken. When I read the photo EXIF info this is what I had: 1/400 sec with f 2.8 and 60mm.  My flash is a manual flash and its power was on 1/32 and zoom on 70mm. No specific reason for these numbers, I was only experimenting. Also I had set the exposure compensation of the camera to -5.00 in the hope that it would make the background darker and the foreground look more 3D because of the flash.


I am facing the following problems:   Array values are lost after looping through the for-loop I am unable to display the image using createImage() I am getting a NullPointerException   Here's my code:  import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.*; import java.awt.Color; import java.awt.image.MemoryImageSource; import java.awt.Image; import java.awt.Component;  class JpegData{     public static void main(String args[]) {         try {             File imgfile=new File("E:/Problems/","Lee.jpg");             Component comp = null;             int[] array = new int[1000];             BufferedImage img = ImageIO.read(imgfile); // ImageIO is final so no need to instatiate it             System.out.println("Height:" + img.getHeight());             System.out.println("Width:" + img.getWidth());              for (int height = 500; height < 550; height++) {                 for (int width = 660; width < 680; width++) {                     int pixel = img.getWidth()*(height-1)+(width);                     int a = 0;                     array[a] = img.getRGB(width, height);                         Color clr = new Color(img.getRGB(width, height));                     System.out.print("Pixel-" + pixel + ": "+"R:" + clr.getRed() + " G:" + clr.getGreen() + " B:" + clr.getBlue());                     System.out.println("at pixel:" + pixel + "rgb:" + img.getRGB(width,height));                     a++;                 }             }              for (int i=0; i < array.length; i++) System.out.println(array[i]);             Image dis = comp.createImage(new MemoryImageSource(20, 50, array, 0, 1));           } catch (IOException e) {             System.out.println("Error.Input Output Exception occured.");         }        } }


It seems I am not very good at using this app, or maybe I'm getting old (had to write something since SE don't allow me to just ask one a sentence question)   Can I edit my profile in android app? If so, how?

It would be nice to update the profile page from within the app.  Perhaps not many people update their profiles more frequently, but when required to do so, I would prefer to do it from the app instead of the mobile browser.


According to : Access to the threads table does not require a mutex  and has minimal impact on server  performance. The other sources have negative performance consequences because they require a mutex.   So yes, I want to use threads table to examine running queries. The trouble is, the PROCESSLIST_INFO column does not contain the full query. It just contains a truncated version of the query. There is a flag viz performance_schema_max_sql_text_length which controls how many bytes are allocated for the SQL query. But it seems to affect the events_statements_history_long table. There is no change in the thread table output. Am I missing something?

According to : Access to the threads table does not require a mutex  and has minimal impact on server  performance. The other sources have negative performance consequences because they require a mutex.   So yes, I want to use threads table to examine running queries. The trouble is, the PROCESSLIST_INFO column does not contain the full query. It just contains a truncated version of the query. There is a flag viz performance_schema_max_sql_text_length which controls how many bytes are allocated for the SQL query. But it seems to affect the events_statements_history_long table. There is no change in the thread table output. There is also the events_statement_current table. But it is not clear if accessing that table affects performance or not.


In a neural network (MLP), we can define the error function during training the difference between the target output and the output for the current input. Now we use backpropagation like so:   Calculate the error of the current layer (starting with the output layer going back). Calculate the gradient of the current layer which is the derivative of the total error (from the output layer) derived by the weights of the current layer. Update the weights of the current layer by the gradient multiplied with a learning rate (here we use simple gradient descend). Calculate the gradient of the previous layer which is the derivative of the total error (from the output layer) derived by the weights of the current layer, where we fix the weights of the next layers (which are closer to the output). Update the weights of the current layer by the gradient multiplied with a learning rate (here we use simple gradient descend). ... Continue with 4.   Assuming each layer as N neurons, each layer has N^2 weights. Let's also assume we have L layers, then we have N^2*L weights. With backpropagation, each layer's gradient vector has the size of N^2 entries.  My question in this: The entire MLP is basically a big function containing matrix multiplications and functions of those (like softmax at the end and so on). We are able to calculate the error function by using this function (using relatively simple things like subraction, squaring etc.). This big error function contains the N^2*L weights. I would think we should be able to calculate the gradient of the entire network by deriving it from the error function derived by the N^2*L weights, which would result in a gradient vector of N^2*L entries and update all weights at once with each gradient descend step. Considering that we have far fewer layers than weights per layer, this is a vector space that is not that much larger than the N^2-dimensional gradient vectors that we calculated with backpropagation. So why don't we do this?  I suspect something keeps us from calculating the gradient of the entire MLP - is that so, but what exactly if the MLP is basically a functions which is so well formulated?  (If so, then we could at least use gradient-free optimization methods, and my follow-up questions would be, why we don't and why backpropagation is still so dominant. I read somewhere in the context of Tensorflow, we cannot do without backpropagation, period. But that seems strange to me.)

Many neural network books and tutorials spend a lot of time on the backpropagation algorithm, which is essentially a tool to compute the gradient.  Let's assume we are building a model with ~10K parameters / weights. Is it possible to run the optimization using some gradient free optimization algorithms?   I think computing the numerical gradient would be too slow, but how about other methods such as Nelder-Mead, Simulated Annealing or a Genetic Algorithm?  All the algorithms would suffer from local minima, why obsessed with gradient?


Currently, I go to  and then click on + to create and open a new Google Sheet. Is there a direct link to create and open a new Google Sheet?

Is it possible to bookmark a link that, when chosen, will automatically open up new document (a word processing document in this case) in Google Documents even if I don't have GD open at the time? Having such a link would be a bit of timesaver for me.


I'm using ffprobe.exe to get info about video file.  Process probe = new Process(); probe.StartInfo.FileName = "\"" + ffmpegFolder + "ffprobe.exe\""; probe.StartInfo.Arguments = "-select_streams v -show_entries stream=duration \"" + path + name + "\""; probe.StartInfo.UseShellExecute = false; probe.StartInfo.RedirectStandardOutput = true; probe.Start(); string s = probe.StandardOutput.ReadToEnd(); probe.WaitForExit();   Do I need to call probe.Close() after process exits?

I have a C# app which uses a System.Diagnostics.Process to run another exe.  I ran into some example code where the process is started in a try block and closed in a finally block.  I also saw example code where the process is not closed.  What happens when the process is not closed?    Are the resources used by the process reclaimed when the console app that created the process is closed?    Is it bad to open lots of processes and not close any of them in a console app that's open for long periods of time?  Cheers!


I have 2 float number and I try to get the multiple. But in the console it does not get the correct one. I do not know maybe there is a leak ?  {"price"=>"0.049391", "size"=>"0.001"}   When I multiple them console shows;  ************ 0.049391 ************ 0.001 ************ 4.9390999999999995e-05 ************   Then when I push this data to array and in front end when I console.log  I get;  0.000049390999999999995   Why it is not  0.0000493901 ?

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


I have just installed Ubuntu and even didn't have enough time to solve usual grub problems. Suddenly I noticed, that Ctrl+Shift doesn't change languages. I tried to fix it from settings - they didn't react on Ctrl+Shiftat all. OK, tried usual gnome-tweaks method - then terminal ctrl+shift+v shortcut was shadowed. So question is How can I set language change on Ctrl+Shift and not shadow Ctrl+Shift+C/V combination at the same time?

Can I use Ctrl+Shift for changing languages? I can't set this hotkey for changing keyboard languages.  At this moment Alt+Shift switch languages, but I can't see this hotkey in keyboard hotkeys list or in   gsettings list-recursively  org.gnome.desktop.wm.keybindings | sort | more   output.


I'm trying to find the N-th largest element in a large 2-D array( approximately 850,000  elements). The method I'm using now is converting it into a 1-D array and then using the selection sort algorithm and finding it that way but it takes way too long.   Does anybody know a good way to find the N-th largest element while just looking through the matrix without sorting it, like finding the largest element.

I believe there's a way to find the kth largest element in an unsorted array of length n in O(n).  Or perhaps it's "expected" O(n) or something.  How can we do this?


I am trying to insert a GridView which is populated from my SQLite Database, but I am getting the error   "Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference"  MyAdapter.java class  public class MyAdapter extends BaseAdapter { Context context; ArrayList<Players> playerList; private static LayoutInflater inflater = null;  public MyAdapter(Context context, ArrayList<Players> playerList){     this.context = context;     this.playerList = playerList;     inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); }   @Override public int getCount() {     return playerList.size(); }  @Override public Object getItem(int position) {     return position; }  @Override public long getItemId(int position) {     return position; }  @Override public View getView(int position, View convertView, ViewGroup parent) {     if (convertView == null)         convertView = inflater.inflate(R.layout.layout_grid_item, null);      TextView idTextView = (TextView) convertView.findViewById(R.id.tv_player_id);     TextView nameTextView = (TextView) convertView.findViewById(R.id.tv_player_name);     TextView roleTextView = (TextView) convertView.findViewById(R.id.tv_player_role);      Players p = new Players();     p = playerList.get(position);     idTextView.setText("ID " + String.valueOf(p.getId()));     nameTextView.setText("Name " + String.valueOf(p.getName()));     roleTextView.setText("Role " + String.valueOf(p.getRole()));      return convertView; }   }  GameActivity.java Class  public class GameActivity extends Activity { DatabaseHelper db;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.game_activity);     db = new DatabaseHelper(this);  }  public void FragmentOneClick(View view) {     Fragment myfragment;     myfragment = new RolesFragment();      FragmentManager fm = getFragmentManager();     FragmentTransaction fragmentTransaction = fm.beginTransaction();     fragmentTransaction.replace(R.id.fragment_switch, myfragment);     fragmentTransaction.commit(); }   }  RolesFragment.java  public class RolesFragment extends Fragment {  GridView gridView; ArrayList<Players> playersList; MyAdapter adapter;  public View onCreateView(LayoutInflater inflater,ViewGroup container,                          Bundle savedInstanceState) {      View view = inflater.inflate(R.layout.fragment_viewroles, container, false);      gridView = (GridView) getView().findViewById(R.id.gv_players);      DatabaseHelper databaseHelper = new DatabaseHelper(getActivity());     playersList = new ArrayList<Players>();      playersList = databaseHelper.getPlayers();     adapter = new MyAdapter(getActivity(), playersList);     gridView.setAdapter(adapter);      return view; }   }

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


I'm using less to view a large file and I want to search for a pattern with wildcards — e.g., " x 1??" where ? is any character.  Does less support that, and if so how would I do that interactively?

I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?


How to make a numeration of the rows in the table(tabularx) automatically?  I have a table, and in the first column I have numbers of the rows, right now I just type this numbers manually, but is there is any command which can do it automatically?  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[russian]{babel}  % Включаем пакет для поддержки русского \usepackage{multirow,tabularx} \usepackage[a4paper,margin=1in,landscape]{geometry}  \begin{tabularx}{\textwidth}{ |X|X|X| } \hline №  & Характер работ & Ответственные лица \\ \hline 1.  & Покрасить стену & Иванов И.И. \\ \hline 2.  & Покрасить стену & Петров И.И. \\ \hline 3.  & Сидоров & Сидоров А.О. \\ \hline \end{tabularx}  \end{document}

Is there any way to get automatic row numbers in table?  For example, if I define table contents as  \begin{tabular} % black magic column definition    \rownumber & foo\\    \rownumber & bar\\    \rownumber & baz\\ \end{tabular}   and get something like  1 | foo 2 | bar 3 | baz


Do ideal gases have a certain potential energy at a certain temperature?

Do ideal gases at zero Kelvin have potential energy?


I tried as root  service network-manager stop   and   /etc/init.d/network-manager stop   But that doesen't exist.  And:   killall NetworkManager   but it seems to restart immediately.  How do I stop it???    EDIT: I filed a new Question that describes more, what my problem is:

The network interface should not make a request for an IP over DHCP. So, what is the command to turn off NetworkManager in Ubuntu?   Update:  I am writing a script in which the interfaces receive static IPs. For this to happen I need to put a line in the script which will turn off NetworkManager. But when I'm not using that script I want to have DHCP on the interfaces.


I am looking for an example of a sequence which shows that, $a_{n+1} - a_n \to 0$ as $n \to \infty$ does not imply that sequence $a_n$ converges. I have a feeling that the sequence should be an oscillatory one but I am unable to think of an example.

If $a_n$ is a sequence such that   $$a_1 \leq a_2 \leq a_3 \leq \dotsb$$   and has the property that $a_{n+1}-a_n \to 0$, then can we conclude that $a_n$ is convergent?   I know that without the condition that the sequence is increasing, this is not true, as we could consider the sequence given in  to a similar question that does not require the sequence to be increasing.  $$0, 1, \frac12, 0, \frac13, \frac23, 1, \frac34, \frac12, \frac14, 0, \frac15, \frac25, \frac35, \frac45, 1, \dotsc$$  This oscillates between $0$ and $1$, while the difference of consecutive terms approaches $0$ since the difference is always of the form $\pm\frac1m$ and $m$ increases the further we go in this sequence.    So how can we use the condition that $a_n$ is increasing to show that $a_n$ must converge?  Or is this still not sufficient?


This is quite popular.. C3P0 had a memory wipe, but R2-D2 never had a memory wipe.   This question is from out-of-universe perspective. Why did Lucas choose to do this after Prequel Trilogy? What did he try to make compatible with the Original Trilogy? What would have been different if R2-D2 had memory wipe and C3P0 never had memory wipe, or both had memory wipe, or memory wipe thing wasn't even mentioned?  Update: My question is asking from out-of-universe perspective. What was in Lucas's mind? Was it going to make the plot compatible with the Original Trilogy? So, it isn't duplicate of this question:

In Revenge of the Sith after Luke and Leia are born, they are sent to separate parts of the galaxy. The droids are given to Captain Antilles, with the instructions to clean them up, and have C-3PO's memory wiped. Why just C-3PO's and not also R2-D2's?   Initially I thought it was due to R2-D2's inability to communicate verbally, but he not only can communicate via text message (as seen in The Empire Strikes Back I believe), but we see other characters understanding his blips and bleeps as well.


How many and which distinct groups of order 20 that are not isomorphic?  Why are they not isomorphic?  I have the $Z_{20}, Z_2+Z_{10}, D_{10}$.  There are more than 4.  I don't know the limit.

Find four groups of order 20 not isomorphic to each other and prove why they aren't isomorphic.   So far I thought of $\mathbb Z_{20}$, $\mathbb Z_2 \oplus\mathbb Z_{10}$, and $D_{10}$ (dihedral group), but I can't find another one. Would $U(50)$ work? I know it has order 20 and is cyclic but I'm not exactly sure how to move from there. Can someone to point me on the right direction?


I have about two hundred bibtex references in my document. Sometimes I am browsing the references section and find something that I want to use again. Let's say there is an item like the following:  [45] Smith, John. Whatever paper, 2013   The problem is then which ID should I use in order to add another reference to the same paper? There are two ways to include such reference again:   Search for "Whatever paper" in the bibtex file and see that the ID is "smith2013.blablabla". Search for [45] on the generated PDF file, then find a text like "according to Smith [45]", then go to the TEX file and find "according to Smith \cite{smith2013.blablabla}".   This is obviously time consuming. It would be much better to see those IDs on the exported references:  [45] [smith2013.blablabla] Smith, John. Whatever paper, 2013   I only want to see this while I am writing the document, so it should be easy to remove those IDs when I generate the final version.

I am trying to print an entire *.bib file. I would like to print the citation key along with all the entries in the .bib file. I can print my bibligraphic data file (.bib) but cannot get it to print my cite key. I can use BibTeX or biblatex. Any ideas how to do this?  Here is a clearer explanation:  My MCMC.bib file contains:  @ARTICLE{Ait04,   author = {Y. A\"{i}t-Sahalia},   title = {Disentangling Diffusion from Jumps},   journal = {Journal of Financial Economics },   year = {2004},   volume = {74},   pages = {487-528} }  @ARTICLE{Ait02,   author = {Y. A\"{i}t-Sahalia},   title = {Maximum-Likelihood Estimation of Discretely-Sampled Diffusions: A Closed-Form Approximation Approach},   journal = {Econometrica },   year = {2002},   volume = {70},   pages = {223-262} }   I use the following LaTeX file:  \documentclass[12pt]{article} \usepackage[style=verbose,citestyle=alphabetic,sorting=nty,natbib=true]{biblatex} \bibliography{MCMC} \begin{document} \nocite{*} \printbibliography  \end{document}   I would like the output file to contain the cite keys Ait04 and Ait02 at the start of each citation so that I know what key I have assigned to each citation. Any help would be most appreciated.


As I understand it, there are several models for what the universe could look like from the “outside”. I don’t know if any of these are outdated, so if they are please tell me if they are.   Expanding bubble. This model says the universe will never stop expanding, and the universe will die because the energy all turns to photons and gets spread out so much. Bubble that will eventually collapse. In this model the universe will stop expanding, and collapse. Everything merges into super-massive black holes, and the universe dies with fire. The universe is a torus. I'm not clear whether the size of the universe in this model is changing, but the central idea is that space is donut-shaped.   Those are the major ones that I have heard of. My question involves what I have heard to be the most popular of the three, #2. In this model, eventually something will "touch" the edge of the universe. Obviously, the first thing to "touch" it would be photons as they travel at, well, the speed of light. This involves all forms of energy in the universe, but I thought it might be easier to explain for something without mass.  What happens if some form of energy "touches" the edge of the universe? Logically, the energy cannot be lost without violating the law of conservation of energy. The only thing I can think of, is that it would "bounce" or be refracted off the edge.  I realize that it sounds silly, however if model #2 is correct then this situation will arise some number of billions of years from now.  I can only assume that there is either a new model that accounts for this, there is some complex explanation, or that model #2 is incorrect.

What is the exact shape of the universe? I know of the balloon analogy, and the bread with raisins in it. These clarify some points, like how the universe can have no centre, and how it can expand equally everywhere in all directions. But they also raise some questions, like if you are on the surface of a balloon and travel in 1 direction, you will eventually return to your starting point, is it possible our universe have this feature?  If it has, or had, would this be a symmetry of sorts ($\psi(x)=\psi(x+R)$), and as such have a conserved quantity associated with it (by Noether)? Assuming "small curled up dimensions" wouldn't these dimensions have this type of symmetry, what are the associated conserved quantities? Is it known exactly what the geometrical shape of the universe is? (on a large scale) (I am not talking about only the observable universe). How does one define the "size" of a dimension, is this scale only applicable to curled up ones? Is it possible to describe to a layman the shape of the universe without resorting to inept analogies?


I would like to rename a bunch of files which are named in a general form of,  text1 text2 [firstname.lastname] text3 ... textn.ext  I want to remove the text [firstname.lastname] from the name of a file. To simplify the task, assume that [firstname.lastname] is a fixed first and last name for all the files.  I use Ubuntu 12.04, and I tried the following command,  $ find . -name "*.ext" -print | xargs sed -i 's/[firstname.lastname]//g'  but it doesn't work.

I have a directory full of images:  image0001.png image0002.png image0003.png ...   And I would like a one-liner to rename them to (say).  0001.png 0002.png 0003.png ...   How do I do this?


So when I want the gcf of a,b I could use the euclidean algorithm for example.  But why is gcf (a mod b, a) = gcf (a,b)    (because 0<=a<=b and in a mod b, a is always smaller than the rest from a mod b?)   So essentially my question is: how does the gcf(a mod b, a) work.  A dumb question:   why is the result of a mod b even smaller than a and how is that linked to the greatest common factor of a,b?    Thank you.

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 using Nginx 1.5.12.1 with PHP-FPM for PHP 5.6.5 on CentOS 6.6 x64.  When I visit any page, I get a 404 with the error:     File not found.   My PHP-FPM error log doesn't say anything useful, but my Nginx error log:     2015/04/02 10:25:44 [error] 24689#0: *35 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.31.42.64, server: _, request: "GET /_index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.dev.example.com"   At this point, you are probably thinking that SCRIPT_FILENAME is configured incorrectly.  It's not, or at least appears correct to me.  If I fire up a packet sniffer and dig into the connection between Nginx and PHP-FPM, I can see that the variables are set correctly:   SCRIPT_FILENAME is /opt/example/_index.php SCRIPT_NAME is /_index.php DOCUMENT_ROOT is /opt/example REQUEST_URI is /_index.php DOCUMENT_URI is /_index.php   The script is indeed located at /opt/example/_index.php, and the document root is /opt/example.  Do you see anything wrong with those variables, as passed to PHP-FPM?  Assuming that they are correct, I guessed that PHP-FPM didn't have access to the files.  I set everything to 777, including the entire example directory.  That didn't solve the problem.  What are some other reasons that PHP-FPM would return "Primary script unknown"?  How can I further debug the situation?  Are there any other permissions that PHP-FPM needs to do it's work?  Edit:  I've found that if I run PHP-FPM as root, my problem is resolved, so this is going to be some sort of permissions problem but I don't know what since the scripts and directories they are in are wide open.

I'm having a problem setting up a vhost on Apache 2.4, using CentOS 6.3.  This question seems to have been answered several times on this forum, but none of the solutions work for me.  Basically, I set up a vhost with a particular document root. When I attempt to access the site, I get a permissions error. But I have no problem if I use a different root.  More specifically, if I set the root to be /volume1/web/xxx, I get a 503 because of a permission problem on index.html.  But if I set it to be /volume1/web, the index.html comes up without a problem.  The details:   I set the persmissions on volume1, web, and xxx to 755. I set the permissions on the index.html files to 777. I copy the index.html file to both /volume1/web and /volume1/web/xxx, so that they have identical index files with identical permissions.   In httpd.conf, I set the VirtualHost options so that I can easily switch the document root by changing 2 comment marks  I have the following lines in the conf file:  NameVirtualHost *:80  <VirtualHost *:80>     ServerName localhost     #DocumentRoot /volume1/web     DocumentRoot /volume1/web/xxx      #<Directory /volume1/web>     <Directory /volume1/web/xxx>       Options Indexes FollowSymLinks Includes ExecCGI       AllowOverride All       Order Allow,Deny       Allow from all     </Directory>      ErrorLog logs/localhost-error_log     CustomLog logs/localhost-access_log common </VirtualHost>   These lines contain all the suggestions that worked for other people with the same problem.  What I get when I enter localhost in my browser depends on the document root.   If the root is /volume1/web, the index.html page comes up. if the root is /volume1/web/xxx, then I get a 503 error, and the apache error log has this line:  [Thu Jul 19 17:17:52 2012] [error] [client ::1] (13)Permission denied: access to /index.html denied   I also tried adding an index.php file to the directory. I then got permission denied messages for both the php file and the html file.  I also tried setting the user : group to apache : apache on the directories and files. That didn't help.  I've done everything I can think of to fix the permissions, to no avail.  Does anyone have an idea about what's happening here?  Thanks.


I have read quite a few of the answers to password problems but am completely new to Ubuntu and can't figure this out.  I bought my computer (a Dell vostro) a few days ago, and I was trying to install some apps and it asks for an authentication code. I got as far as to check user account (only one, admin) and it doesn't seem to have a password.   I read a thread about setting a password but I don't know what "Windows Key" or "Terminal" are, so could someone please explain this?

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.design.widget.TabLayout.addOnTabSelectedListener(android.support.design.widget.TabLayout$OnTabSelectedListener)' on a null object reference   Declared this before onCreate():  TabLayout.OnTabSelectedListener listener;   and this in onCreate():  TabLayout tabLayout = (TabLayout) findViewById(R.id.tabLayout); listener = new TabLayout.OnTabSelectedListener(){         @Override         public void onTabSelected(TabLayout.Tab tab) {             viewPager.setCurrentItem(tab.getPosition());         }          @Override         public void onTabUnselected(TabLayout.Tab tab) {          }          @Override         public void onTabReselected(TabLayout.Tab tab) {          }     };     tabLayout.addOnTabSelectedListener(listener);   I'm having trouble seeing how listener is null. I have other NullPointerExceptions that even claim null object on primitives including ints defined by drawable pngs?

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 want to combine records' fields values (to be comma separated) based on another field in the record. To get the issue better, kindly check the example below, I tried to simplify the scenario as much as possible  I've the following table, assume it is called 'My_Table'  +------+-------+ | Key  | Val   | +------+-------+ | A    | 5     | | B    | 8     | | A    | 7     | | C    | 4     | | B    | 8     | | B    | 9     | | C    | 6     | +------+-------+   I need a query to retrieve the following table   +-------+--------+ | Key   | Vals   | +-------+--------+ | A     | 5,7    | | B     | 8,9    | | C     | 4,6    | +-------+--------+   Kindly note that [B, 8] exists twice, I don't want the result to be  +-------+--------+ | Key   | Vals   | +-------+--------+ | A     | 5,7    | | B     | 8,8,9  | | C     | 4,6    | +-------+--------+   PS, I'm using MySql if it matters.    [UPDATE] BTW, it's not a duplicate question, the extra piece of info is solving the duplication

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


I'm working on an assignment for school and we're supposed to make a script that counts to 100 in blocks of 10. So you would get number 1 to 10 in row 1, from left to right. In row 2 you'd get 10-20, from left to right, and so on.  I've wrote some part of the script but I can't figure out how to allign it from left to right, instead of top to bottom. This is what I've got so far:  def number(count):  while count!=11:     print(count)     count=count+1; number(0)

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


We have missed executing this activity for the two consecutive weeks. 'For the two consecutive weeks'. Is the usage of article 'THE' mandatory here?

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


prove that if the limit as x approaches a from the positive side of the x axis, f(x) = L, and if the limit as x approaches a from the negative side of the x axis, f(x) = L, then the limit as x approaches a of f(x) = L as well.

My teacher proposed this question as a challenge proof to do on our own and I can't seem to get it. Was Wondering if anyone could give me a hint or help me on the process to completing it.  Let $a \in \mathbb{R}$. Let $f$ be a function defined, at least, on an interval  centred at $a$, except possibly at $a$. Let $L \in \mathbb{R}$.     If $\lim\limits_{ x→a-} f(x) = \lim\limits_{ x→a+} f(x) = L$   then $\lim\limits_{ x→a} f(x) $ = $L$.    We are supposed to prove this using the "delta-epsilon" proof style. Thanks in advance!!


I'm trying to merge the props from values into this.   The following throws an error. How can I do this?  this = {...this, ...values}

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


How do I disable my keyboard's suspend key? My keyboard (Logitech k800) has a key for powering off the pc, in Ubuntu its working as a suspend button. I've tried assigning another shortcut to that button, but its not preventing the computer from sleeping. Also, I'm not sure if there's a difference between suspend and sleep, but it appears to be turning the computer completely off, but when I start it back up it resumes where it left off.

I have a "power button" on my keyboard that enables standby or hibernate. I can't find the mapping of this key anywhere in "sytem settings>Keyboard", "system>power management", "compiz config> or similar (where I could find it before unity). How can I disable (not remap) this button?  I do not want to disable hibernate/sleep altogether, it's simply this key that gets pressed a lot by accident and it's getting quite annoying.


If I have a set of all possible $x$ for $x \in \mathrm{R}^n$ for non-natural number $n$, what meaning would this have and how would it be used?  For instance, if I had $\mathrm{R}^{2.5}$, would this be a set of something between 2-coordinates and 3-coordinates? Would it be only positive? Etc.  Thanks! I apologize in advance if this does not make sense.

This is not a very well-defined question.  Are there any standard constructions of metric spaces, parameterized by real-valued $n \ge 1$, such that:   When $n$ is an integer, the metric space is precisely $\mathbb{R}^n$. When $n$ is non-integer, the metric space can be seen as a reasonable generalization of $\mathbb{R}^n$.  For example, perhaps it has  of $n$.   Alternately, a non-existence result that you can't maintain some of the important properties of $\mathbb{R}^n$ in a generalization like this would be interesting to me.


As in question title, is there a way to flat plane object affecting by proportional edit without creating new plane object?  here my image :    I don't know how to flat this object except create new plane object or edit position of vertex to z=0 individually.

I have added a plane in top view. I have then extruded the plane according to a floorplan in topview.  I don't know what happened, but when I switched my view, I could see that some parts of it are for some reason high up in the air.  I would like to ask how I can bring everything back down onto the grid / floor.  And if somebody could tell me how this might have happened, I would also be glad.


I want to plot a function. The function is, F is proportional to x/cos(x). Here x is rotation in degree and F is the force. I have to plot the graph where the x axis will be from 0 to 70 degree and the y axis will be linear value 0 to 5. I am not able to find any option to draw graphs where x axis is with rotational degree. I was using these codes: \begin{document}  \usepackage{pgfplots}  \begin{tikzpicture}  \begin{axis}[  grid=both,  trig format plots=deg  domain=0:70, samples=50, no marks,  xticklabels={0$\deg$,10$\deg$,20$\deg$,30$\deg$,40$\deg$,50$\deg$,60$\deg$,70$\deg$},  xtick={deg(0),deg(10),deg(20),deg(30),deg(40),deg(50),deg(60),deg(70)}, x post scale = 5 ] \addplot {deg(x)/cos(deg(x))};  \end{axis}  \end{tikzpicture}  \end{document}


Is it possible to play Destiny without an Internet connection?

Today I went to a store to buy Destiny for PS4. I have been played Destiny in the demo 1 month ago. I play just a few hours per week and I don't want have the PlayStation Plus signature.   At the Store the guys advise me to play Destiny I must have the PlayStation plus signature to play this game.   I would like know is it true, why I'm not able to play by myself?


This seems like it would be common question and I searched for it, but came up dry.  Whenever I get an email or message on Outlook, Skype, etc. OSX puts a red number over the icon with the number of messages received. How can I set this number for my own app?

How do I add a badge to the Dock icon for my app using Cocoa? Is there any roughly "standardized" way to do this?   (I'm referring to the kind of badges that show up in Mail, iChat etc. to indicate the number of unread messages and the like.)  Cocoa Touch does provide one such method, but I haven't been able to find any equivalent for a regular Cocoa application.


Last night on , someone posted a question that was basically a suicide note, along with the question of what Judaism thought about suicide. The question was put on hold very quickly, and several supportive comments were posted ("You've listed Los Angeles as your location. A local program that could probably offer a great deal of help is...."). Someone started a conversation in chat, which is how I discovered this question, asking about SE's official policy for posts with serious mentions of suicide or self-harm. I answered with a link to , and a , which was a HNQ question at some point, which was how I found out about the SoftwareEngineering.meta question (I do not have an account on programmers). In any event, it turns out that our wise moderators , though we didn't find that out until later. After searching MSE for an official position, I found that we . Hopefully this won't come up so often, but I feel that this should be made public here (significantly more public than SoftwareEngineering.meta) so that people will know what to do when this comes up.

What should I do as a Moderator when I encounter situations regarding self-harm and suicide?


We are a team working from home and can't share iPad in the office due to pandemic.. We are looking for a virtual environment of iOS (iPad) to run on Windows 10 when it's time to troubleshoot iOS related questions. I am not sure this even exists for copyright and so on but I thought asking here might get me somewhere. Thanks in advance!

Does an iOS virtual machine for Windows exist? If it doesn't are there any reason why it couldn't?


I booked a train ticket on the Yeswantpur (Yeshvantapur, YPR) to Pondicherry (Puducherry, ODY) . I gave my boarding point as Hosur. My reservation is from Yeswantpur. Am I entitled to board at Banaswadi (BAND) or Krishnarajapuram (KR Puram, KJR)?

I booked a train ticket on the Yeswantpur (Yeshvantapur, YPR) to Calicut (CLT). I gave my boarding point as Yesvantpur (YPR). My reservation is from Yeswantpur. Am I entitled to board at Karmelram (CRLM)?


What are those old "two-tone"  actually called?-- You know, the ones with the "natural-rubber" color on the sidewalls?

Are there any modern road/light touring tires which look like the gumwall tires of yesteryear?  In particular, I'm looking for all-weather road tires with serious puncture resistance, i.e. a more-or-less-direct competitor to .


Let G be a group of rationals under addition, if $G_1$ and $G_2$ are two non empty subgroups of G, then prove that $G_1 \cap G_2 \neq${0}

I need to prove that any two nontrivial subgroups of $\mathbb{Q}$ have a nontrivial intersection as part of a larger proof that $\mathbb{Q}$ cannot be represented as a nontrivial direct product.    (Yes, I realize that there are other ways to prove that $\mathbb{Q}$ cannot be represented as a nontrivial direct product, but I am not interested in those, and will not accept answers showing me how to do that).  Based on the density of the rationals, I guess this idea kind of makes sense, but I am doing this proof for an abstract algebra class, and I don't think real analysis proofs would be accepted.   Everywhere I've looked online has said this is "trivial" or "easy to see" without bothering to actually prove it for those of us mere mortals who don't see it as such. As for myself, I have literally no idea where to even get started proving this. Could somebody help me figure this out (without giving me cutesy examples that aren't really all that related with the expectation that I should be able to figure it out from looking at those - that's not really how my brain works)?  Thank you.


I have added some of the keywords in a meta tag, but my site is still not in the top position when Googled. How can I achieve this?

What are the best ways to improve a site's position in the Google search results?


I've just started playing Skyrim and I've noticed that everyone is asking me whether I'm sick. I don't get this. Is this something connected to the skin color I have?

I just created my new character 2 hours ago and I've reached a town. Sometimes random guards will comment that I look ill, or that I should rest. "You look sick, honey. Do you want to lie down?", isn't uncommon.  Did I unexpectedly get vampirism? I didn't fight any vampires, only a couple of wolves and bandits.  I'm a dark elf, so maybe my race isn't seen much around Skyrim and the remarks are more roleplay than actual illness.  Any ideas?


When a question becomes a hot network question, the time it became such is shown in the edit history of the question. You can replace the last part of the URL with revisions to see. I just came across , no edits yet so there's no button to click to see edit history. I tried to "replace" the last part of the URL with revisions in several ways: https://quant.stackexchange.com/questions/61760/revisions https://quant.stackexchange.com/questions/61760/why-are-there-no-papers-about-stock-prediction-with-machine-learning-in-leading/revisions https://quant.stackexchange.com/questions/61760/timeline https://quant.stackexchange.com/questions/61760/why-are-there-no-papers-about-stock-prediction-with-machine-learning-in-leading/timeline  No luck, all the pages just redirect to or show the original question. How can I see the time it became hot network question?

For the past year I have been quite active on SO and a bit on meta, but I had never heard of the timeline of a post until today in a comment on meta.  There was an  two years ago of this feature as "experimental". ( for that question).  This feature was , answer: this exists, but the link has to be built manually.  I think this could be quite interesting sometimes and I would like to use this, but I will not do so if I have to build the link each time by myself.  This feature has existed for two years and is still "experimental"? Who is using it? Who knows about it?  My feature request: Implement a link in the posts to their timeline. I am sure this nice feature will be used.


I am a teaching assistant for a sophomore mechanical engineering laboratory course. One of our lab modules is focused on PLCs, and another uses Arduino micro controllers. One of my students asked why they are different and I found myself without a good answer.  They both have input and output pins, perform logical operations, and are programmed via regular computers. They can be used to control the same equipment, read the same sensors, and make the same logical decisions. The differences in programming languages and the fact that they look and feel very different seems superficial. Is there a fundamental difference between the two, or is a PLC just a micro-controller designed to work in an industrial environment? How can I explain this difference to a sophomore college student with no background in electronics?  A good answer will either answer my question or offer a useful frame challenge; I may be asking the wrong question entirely.

Why does everyone use PLCs in industrial environments, instead of a microcontroller based solution?  For a longer task, the PLC program is as complicated as a microcontroller program.   A microcontroller based solution may be more customisable, and of lower price.


In the movie Aquaman, we saw that all those soldiers who came to attack both Aquaman and Mera, have water filled up in there suits. In one scene, when Mera broke one of the helmet of a soldier, he immediately went for the "toilet water", apparently can't breath air. But others, like Aquaman, Mera, Vulko, Orm etc can breath underwater as well as on ground.   Why is it so? As it was explained in the movie that when Atlantis went down, everyone got the ability to breath underwater. So everyone should also be able to breath above water as well, they were all "grounders" before Atlantis drowned?

In the new Aquaman movie there are a number of scenes where Atlanteans are seen on land wearing suits filled with water so they can breathe. In some of the fight sequences we even seen their suits breaking and the person inside "drowns" like a fish out of water.  Yet Aquaman, his mother, and numerous other Atlanteans have no trouble breathing both air and water. I suppose in Aquaman's case he was half Atlantean and half human, but that doesn't explain the others who had this ability.   I felt like this was either not explained at all or else I missed it. Why do only some Atlanteans need water breathing suits while others don't?


I regularly flag comments as Obsolete, for example if they are pointing out a mistake in the post which has since been corrected. I think cleaning up obsolete comments is a beautiful thing, and many commenters do this on their own accord.  I'd like to know, if I flag someone else's comment as Obsolete, what exactly happens?   If another user flags the same comment, will it be removed at that point? Is there a reputation requirement for the flagger? Are moderators alerted? I don't really want to waste their time...

I just flagged a comment as "obsolete" in . To my surprise, it was deleted immediately, just after pressing "Flag Comment".  Now I see it in my flag summary as helpful:        Does this mean that obsolete flags are somehow handled automatically? I went through  but could not find any description on this.


When a page is auto refreshed, or it updates itself on Stack Overflow, the shown time is wrong. It always shows "12 hours ago," instead of actual time. If I refresh the page manually, it shows the time correctly, as you can see in the screenshot.      I am using Google Chrome running on Windows 7.

On Stack Overflow, the time shown for answers and comments is incorrect. When the post is just 20 mins old, the comments and answers say that they are 12 hours old. I have seen this mistake in more than one post. What is the problem with the clock / time display?  Please, take a look at that.


Is it possible to stop all cronjobs for a particular cpanel user? The cronjobs should be resumable when required later.  There are several hundred cronjobs running under this user. Only this user's cronjobs should be paused/suspended.

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


This is a circuit  exercise from Razavi's book. He used to point to the direction of current leaving the source in his circuit for N type of MOSFETS. But here, I think the drawn arrow refers to the current leaving the drain. Now I am confused, why he made it like this? Is this even NMOS or PMOS?! Which method should I use to distinguish between source and drain?

I know that , a basic MOSFET contains source and drain , and either it's a NMOS or PMOS ; it is indicated by an arrow at source . But let's look at a fabricated NMOS.   Here we can easily see that either a pin is source or drain is totally depended on the connection. Without connections , this device is symmetrical . But look at the conventional MOSFET symbols .   all these symbols marking a pin as source and other one as drain. Why is that ? Why this symbols are not symmetrical as the device is?   When I work on Cadence , schematics symbols all have this types of symbols where sources are marked .But when it will be used for fabrication , source and drain will be determined by the connection , not by the symbol.


I have a partition mounted with mount /mnt/filesys.bin /mnt/mymnt/  Each time I reboot, I need to remount. How can I keep this mounted after every reboot?

I am using Ubuntu Minimal + LXDE. I am wondering how can I auto-mount a partition (internal) on boot automatically. Currently I do something like   mount /dev/sda3 /media/works   But I want it to be permanent. Also I have GParted, but the Partition > UnMount is greyed out (yes, unmount, even though I haven't mounted it)


Recently I tried to set up a new email server using iRedMail on Lubuntu.  The mail server workes very well when email conversation is in the same domain.  But when a user tries to send email to some of the most popular domains like gmail, hotmail or yahoo; all the emails are blocked.  I tried to send an email to my gmail account, this is error response I got.     host gmail-smtp-in.l.google.com[74.125.130.27] said: 550-5.7.1   [XX.XX.XX.XX      12] Our system has detected that this message is   550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent   to Gmail, 550-5.7.1 this message has been blocked. Please visit   550-5.7.1    for   550 5.7.1 more information. g12si14338274pat.29 - gsmtp (in reply to   end of DATA command)   The XX.XX.XX.XX part is my IP.  Latter I found that my ip is added to black list at . I requested them to remove my IP. They accepted my request. It also suggested to activate the smtp authentication.   But it was already set to yes as given below.  smtpd_sasl_auth_enable = yes   After a few hours, I again tried to send a mail to my gmail account, again same msg is replied. When I check the spamhaus database, my ip is also there.  Please help.

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


Having the following inequality: $$|x|-|y|\le |x-y|$$ does it imply that $||x|-|y||\le|x-y|$ if it does (i think it does) how to prove it?

I've seen the full proof of the Triangle Inequality  \begin{equation*} |x+y|\le|x|+|y|.  \end{equation*} However, I haven't seen the proof of the reverse triangle inequality:  \begin{equation*} ||x|-|y||\le|x-y|. \end{equation*} Would you please prove this using only the Triangle Inequality above?  Thank you very much.