I want that the following two plots share their x-axis using pgfplots and tikzpicture. It is important that the first one is fully logarithmic and at the second plot only the x-axis (semilogx). I did not find an idea for this special case. In addition to that I still want to have two plots. So the first plot, then a line and below the second plot with the x-axis. Only this x-axis shall be shared.  \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc}  \include{pgfpages} \makeatletter  \usepackage {tikz} \usepackage{pgfplots} \begin{document}  \begin{center} \begin{tikzpicture}    \begin{loglogaxis}[width=0.8\textwidth,height=0.3\textheight]      \addplot[red] plot coordinates{(1,1)(2,4)(3,9)(4,16)};    \end{loglogaxis} \end{tikzpicture}  \begin{tikzpicture}    \begin{semilogxaxis}[width=0.8\textwidth,height=0.15\textheight]      \addplot[blue] plot coordinates{(1,0)(2,0.2)(3,0.2)(4,0.4)};    \end{semilogxaxis} \end{tikzpicture}    \end{center} \end{document}   So all in all there should be one tikzpicture. It would be great if the CSV import would work with that too, because in my paper I import it that way, but left it out here to keep it as simple as possible.

I'm aware of the possibility given by pgfplots to have two y-axes, one on the left and one on the right with two different scales. But I'd like to explore other ways to have multiple axes, e.g. putting a separate axis besides a given plot.  I've studied the groupplot environment and tried to put a second y-axis on the left of a plot.  Here's my MWE:  \documentclass{article} \usepackage{lmodern} \usepackage{pgfplots} \pgfplotsset{compat=1.3} \usepgfplotslibrary{groupplots} \begin{document} \pgfkeys{    /pgf/number format/.cd,        set decimal separator={,{\!}},       set thousands separator={} } \pgfplotsset{    every axis/.append style = {       line width = 1pt,       tick style = {line width=1pt}    } } \begin{tikzpicture}     \begin{groupplot}[         group style = {             group size=3 by 1,             horizontal sep=1.3cm, vertical sep=0pt,         xticklabels at=edge bottom     },     height=5cm, width=9cm,     no markers     ]     % this is the leftmost y axis     \nextgroupplot[         width=2cm,         hide x axis,         axis y line*=left,         ymin=0, ymax=10,         ytick = {0,1,...,10},         ylabel={\color{red}$y_2$}     ]     % this is the red curve     \nextgroupplot[         xmin=0, xmax=10,         xlabel={$x$},         ymin=0, ymax=100,         ytick = {0,20,...,100},         ylabel={\color{blue}$y_1$}     ]         \addplot[very thick, blue, domain=0:10] {x^2};     % this is the blue curve     \nextgroupplot[         xshift=-8.715cm,% see above: horizontal sep=1.3cm          xmin=0, xmax=10,         ymin=0, ymax=10,         hide x axis,         hide y axis,      ]         \addplot[very thick, red, domain=0:10] {0.05*x^2}; \end{groupplot} \end{tikzpicture} \end{document}   that produces the following result:   Q1: Why the yticks for the red curve (label $y_2$) are wrong?  Q2: is there a more neat way to shift left the last plot (red curve), instead of setting "xshift=-8.715cm" after a trial-and-error process?


I am a newbie user with a fresh install Ubuntu "Bionic Beaver" (v18.04), who has migrated from Windows 10. I want to make the file sorting order in Ubuntu match that of Windows, because that is how I have organised my (extensive) file archive. I think the answer lies in a post called , which says:  If you want collation to be equivalent to strcmp() sort order (i.e. do a >simple comparison of the code point values for the characters in the string), >you can switch to the legacy C locale for collation. This can be done by editing ~/.profile and adding (or modifying) a line like >the following: export LC_COLLATE=C  These instructions are too obscure for me to follow and I do not know where to find this ~/.profile, or how to edit it safely. I hope someone will be able to give me explcit instructions on how to do this that are intelligible to someone of my inexperienced status.

I feel stupid asking, but I can't seem to find the answer to this anywhere. I'm trying to follow  to edit my bash prompt, but there is no .bashrc in either my user directory (~/.bashrc), or in my home directory, or in the main file system directory.   There is no .bashrc in /etc/ (there is a bash.bashrc, however).   Do I create a .bashrc file in my user or home directory? Is there a better, more recent set of instructions for modifying the bash prompt?


This is the achievements drop-down on Ask Ubuntu:    It doesn't look very good. The same happens on Meta SE - so it's a new and old top-bar issue.    Mac OS 10.12.6, Chrome 60.0.3112.113. Also happens in Safari 11.0 and Chrome incognito mode with no extensions, so is not a user-script issue. Zoom at 100%.  Does not happen with Chrome on Windows 10.

This is what my achievements on all SE sites look like on Firefox 49.0.2 and Chrome 54.0.2840.99 m (64-bit):    But this is what it looks like on Microsoft Edge 38.14393.0.0:    If I recall correctly, the latter picture is how it used to be in all browsers.    It seems like the width of .achievements-dialog .message-text is too big:  .achievements-dialog .message-text {     margin-left: 2px;     width: 276px; }     Is this a  or ?


I have one content type as "refund", I want all number of node of this content type according to month wise, year wise and per day. I can get total number of nodes of refund content type by query but how to get sorted by month wise, year wise and per day wise and then show through views?  Please help me to solve this issue. Thanks in advance

I would like to display the number of nodes in a particular view OUTSIDE OF THAT VIEW. For example, on the home page (page--front.tpl.php) I want to insert a simple php echo statement that pulls the number of nodes in "View X", and another php echo statement that pulls the number of nodes from "View Y", etc.  function theme_get_node_count($content_type) {      $query = "SELECT COUNT(*) amount FROM {node} n ".               "WHERE n.type = :type";      $result = db_query($query, array(':type' => $content_type))->fetch();      return $result->amount; }   The previous code does not work because I am not counting a content type. Is there a $view variable I can plugin into this function to achieve the same results?  Thanks


I mistakenly tried to sudo apt remove python3 (I was trying to install multiple versions of Python), but stopped it using Ctrl+C immediately. Looks like I damaged the package and I was unable to open a terminal or anything. After struggling for hours now I can open terminal and apps like Google Chrome and Telegram, but can't open VS Code. When I try to sudo apt install python3, after lots of failed dpkg queries, it says: Processing was halted because there were too many errors. libdvd-pkg: Checking orig.tar integrity... /usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting... E: Sub-process /usr/bin/dpkg returned an error code (1)  I looked it up and on  it was suggested to try these commands: sudo dpkg --configure -a  It fails and after failed dpkg queries, returns: Processing was halted because there were too many errors.  sudo apt-get install -f also failed with the following error message: Processing was halted because there were too many errors. libdvd-pkg: Checking orig.tar integrity... /usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting... E: Sub-process /usr/bin/dpkg returned an error code (1)  I checked and it seems I can manually install each dpkg query by downloading the source file and compiling it, but it wouldn't be sane to do such thing. There are a lot of damaged packages it seems.

FYI: I am using Kubuntu 18.04  I keep getting the following error when I install apt-transport-https  Things I have already tired to fix this error are:  sudo apt-get autoremove libdvd-pkg  sudo apt-get install libdvd-pkg sudo apt-get update sudo apt-get install -f sudo apt-get purge apt-transport-https && sudo apt-get install apt-transport-https   The error I continue to see is  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   apt-transport-https* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 152 kB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 246794 files and directories currently installed.) Removing apt-transport-https (1.6.6) ... libdvd-pkg: Checking orig.tar integrity... /usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting... Reading package lists... Done Building dependency tree        Reading state information... Done The following NEW packages will be installed:   apt-transport-https 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 1,692 B of archives. After this operation, 152 kB of additional disk space will be used. Get:1 http://ca.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.6 [1,692 B] Fetched 1,692 B in 0s (6,872 B/s)                Selecting previously unselected package apt-transport-https. (Reading database ... 246791 files and directories currently installed.) Preparing to unpack .../apt-transport-https_1.6.6_all.deb ... Unpacking apt-transport-https (1.6.6) ... Setting up apt-transport-https (1.6.6) ... libdvd-pkg: Checking orig.tar integrity... /usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...


About 5 years ago, I managed to convert a pointer to a int, store it temporarily and then take that int and convert it back to a pointer (Objective-C). But I can't for my life remember how I did it.  Can anyone help me out?

I am trying to adapt an existing code to a 64 bit machine. The main problem is that in one function, the previous coder uses a void* argument that is converted into suitable type in the function itself. A short example:  void function(MESSAGE_ID id, void* param) {     if(id == FOO) {         int real_param = (int)param;         // ...     } }   Of course, on a 64 bit machine, I get the error:  error: cast from 'void*' to 'int' loses precision   I would like to correct this so that it still works on a 32 bit machine and as cleanly as possible. Any idea ?


While going through some SQL books I found that examples tend to use question marks (?) in their queries. What does it represent?

I am dissecting some code and came across this,   $sql = 'SELECT page.*, author.name AS author, updator.name AS updator '      . 'FROM '.TABLE_PREFIX.'page AS page '      . 'LEFT JOIN '.TABLE_PREFIX.'user AS author ON author.id = page.created_by_id '      . 'LEFT JOIN '.TABLE_PREFIX.'user AS updator ON updator.id = page.updated_by_id '      . 'WHERE slug = ? AND parent_id = ? AND (status_id='.Page::STATUS_REVIEWED.' OR status_id='.Page::STATUS_PUBLISHED.' OR status_id='.Page::STATUS_HIDDEN.')';   I am wondering what the "?" does in the WHERE statement.  Is it some sort of parameter holder?


Since the last update it has been impossible to hide the most visited sites. I don't know if it's some temporary sick joke by the chrome team but I need to remove it.  I have tried changing my home to something other website, this works for when you first launch chrome but not for opening news tabs.

I don’t like the behavior of the new tab page in Google Chrome 29+. How can I restore the old behavior?  The new tab page (if you have Google set as the default search engine) now shows the Google logo (or, apparently, the doodle of the day if there is one), a search box, and a few recently visited websites. It also added an Apps button to my favorites bar, seemingly the only way to access my apps page, which has easy access to things I use regularly (Calendar, Gmail, Docs, G+, Facebook, Feedly, Google News, Netflix, Play Music, Pandora, Drive, Keep, etc.) I don’t like this behavior. I actually don’t mind having the logo of the day and search box, but I want my apps linked to on my new tab page.  Is there any way to get the old behavior back? I checked the settings and it doesn’t seem like it’s possible to set chrome://apps to be the new tab page (which would restore the old behavior) or to configure the new new tab page to display apps instead of recently visited sites.


There is a  suitable for sourcing, which I am modifying for my own purposes.    Background  I have an odd mix of environments to work in, from a Mac OS terminal, to various Linux distributions, and even to a MobaXterm on my Windows work laptop.  I'd like to get the color codes to a maximum portability for these environments  In MobaXterm, tput setaf 2 (for example) doesn't work at all—it just says "Segmentation fault," though I see no ill effects.  Likewise, echo '\e[4;32m' doesn't work either; it just displays those literal characters.  (This is likely because it is BusyBox echo.)  printf '\e[4;32m' works, though.    The question:  Is there any reason not to use printf in place of tput in all cases?  Or put another way:  Is there any environment (or OS or shell) in which printf WON'T work to set terminal colors, but tput WILL?

In people's '.*rc' files I see online or in various code, I tend to see a lot of people who manually use ANSI escape sequences instead of using tput.  I had the understanding that tput is more universal/safe, so this makes me wonder:  Is there any objective reason one should use escape sequences in place of tput?  (Portability, robustness on errors, unusual terminals...?)


I want to validate MM/YYYY in VB6  I used (0[1-9]|1[012])/(19|20)[0-9]{2}  But it is not working as expected. Even it allows 5 digit year.


Trying to find out where the . (current directory) entry in PATH originates, I've run bash as follows:  $ env -i /bin/bash --norc -c 'echo $PATH' /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.   Surprisingly, current directory is still listed there. I've then tried using strace to find out what files bash reads, but found nothing relevant:  $ env -i strace -fefile /bin/bash --norc -c 'echo $PATH' |& grep -v ' ENOENT ' execve("/bin/bash", ["/bin/bash", "--norc", "-c", "echo $PATH"], 0x7fff02c40550 /* 0 vars */) = 0 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/dev/tty", O_RDWR|O_NONBLOCK) = 3 getcwd("/home/ruslan", 4096)            = 13 openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3 /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:. +++ exited with 0 +++   So, where does bash take this default value for PATH?

On Mac OS X, the default $PATH values are:  /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin   What are the default values on Linux?


I am not too sure if viruses are considered living organisms.   I learned that living organism:   -Change their size -Reproduce -Heal themselves -Need energy (by eating) -React to the environment -Have a lifespan -Made of at least 1 cell (some exceptions)  Which features that are listed are not in viruses?  If I need to be more clear, please tell me as I'm not very good at explaining.

The recent  about a new supermassive virus being discovered got me thinking about how we define viruses as non-living organisms whilst they are bigger than bacteria, and much more complex than we first gave them credit for.   What biological differences between viruses and cellular organisms have made viruses be deemed non-living?


When trying to flag a question as a duplicate, you used to be able to paste in a link and the dialog box would find the question via the link. As of now, I can only get it to work by pasting in the question number. Did something change? I have already flagged the duplicate question and can't return to the dialog to actually show you the question that had the problem.  I tried to flag but I had to put the post ID 21771566 to get the box to trigger and let me flag it.  (Note: I know this question is not a duplicate of the one I selected, it is just an example)

When closing a question as a duplicate there is a text box which says: "search, or enter a question link or numeric id". You can copy and paste a question link into here, but this fails if the URL starts with https:// instead of http://, with the message "Your search returned no matches; please try a different search".


Scema:  Person(pid:int,        name:char(20),        predecessor:int -> Person.pid       )   Example Table:  pid, name, predecessor 0,   'abc', NULL 1,   'bcd', 0 2,   'cde', 1 3,   'efg', NULL 4,   'fgh', 3   How do i find all successors of a Person 'abc'?  Desired Ouput:  name  'bcd' 'cde'    Many Thanks!

I have a table similar to this:  CREATE TABLE example (   id integer primary key,   name char(200),   parentid integer,   value integer);   I can use the parentid field to arrange data into a tree structure.  Now here's the bit I can't work out. Given a parentid, is it possible to write an SQL statement to add up all the value fields under that parentid and recurse down the branch of the tree ?  UPDATE: I'm using posgreSQL so the fancy MS-SQL features are not available to me. In any case, I'd like this to be treated as a generic SQL question.  BTW, I'm very impressed to have 6 answers within 15 minutes of asking the question! Go stack overflow!


I am using a button to post data using ajax (Join and leave a group like facebook), after post is successful it will refresh part of the page element and and reload the content. Once the content is reloaded it will replace the button as well.
  ..... Join Group .....
   After the div is reloaded button changes to
  ..... Leave Group .....
   The problem is when I click "Join Group" button it will Join group, refresh the div element and replace the button to "Leave Group" (it takes longer time to receive response) but if I click in the leave group it doesn't trigger the button click. but if refresh the page and click Leave Group button it works fine but then again Join Group doesn't work.  Here is my script:      Anyone can help on this, or explain why its happening? or what will be the best option to create a Join/Leave button like facebook groups.   Thanks in advance, for taking your time to check on this.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I am using Ubuntu 13.10 and successfully installed the latest version of Eclipse, but when I  run it, I can't open menus like file, Edit, Run, etc.   Why is this and what I should do to solve this problem?

I'm using Ubuntu 13.10 (with JDK 1.7.0_45).  I've downloaded and uncompressed Eclipse Kepler for Java EE Developers.  The software menus are messed up. I didn't notice similar problems in other software.  When I click any menu in Eclipse, the drop-down seems to be "cut". Sometimes the drop-down shows, but the options are invisible.  I tried Eclipse Indigo, but the same problem occurs.


Is it mathematically correct to say that $\sin(x)$ converges to zero as $x$ approaches $0$?  If the $\sin(x)$ iteration is done starting at $\dfrac{\pi}{2}$ in Java, for $10^9$ iterations, the result is $5.4772255370828254\times 10^{-5}$. Even with the range of the integer data type exhausted, the result is not displaying $0$. Does this mean that it won't converge to zero on a computer?

Sin(x) converges at x=0 as can be seen with a graphical illustration. When attempting the fixed-point iteration for sin(x) on a computer, the number gets closer and closer to zero but it does not display zero. How can we explain this?  For n = 1000000 (10^6) iterations  sin(x) using Float: 0.0017321599  sin(x) using Double: 0.0017320423900648602  For n = 10000000 (10^7) iterations  sin(x) using Float: 5.589425E-4  sin(x) using Double: 5.477222534834344E-4


So, I was looking status of my badges and I've noticed that text is out of the borders. I thought it was because of zooming, but it's not, and it happens on all SO communities. Is there some problem with this? Some bug?  This is not same question as  one. Thoose are badges that I gather in tags, these are other ones. It may be related, because of badges, but they are not the same badges or on the same part of site.

The "Select your next badge" dialog box is not displaying correctly. It looks like this:    Freehand circles, as requested:    It seems to be an issue with box-sizing, because when it's content-box, it looks fine. I think the width and height rules for .popup-badges .all-badge-progress .badge-progress should be increased a little, for example:  .popup-badges .all-badge-progress .badge-progress {   width: 214px;   height: 96px; }   Tested on the latest Chrome and Firefox on Linux Mint.


I bought a Windows 7 Pro licence a couple of years ago. The installation got activated, of course. I've been working on the machine for some years. Of course, the licence has been used only on this one machine.  During the free upgrade offer, I did an inplace upgrade to Windows 10 Pro. The installation was activated, too. That's how it's supposed to be done. Once activated this way, it is valid to do a clean install of Windows 10 on the same machine.  The problem: After the clean Windows 10 reinstallation (version 10.0.14393) on the same machine without any hardware changed, it can not be activated. I'm getting the message that the activation servers cannot be reached. This can be read there for several days. I have a direct internet connection without a proxy. I've ensured that the firewall is not blocking anything related. In the event log, I can find the error number 0x80070426: The service cannot be started. I'm an experienced developer. I was not able to find out which service. All deactivated services are unrelated. The activation trouble shooter does not work because of the same error 0x80070426.  There is the slmgr.vb script to manage licences. Using "slmgr /ato" returns the same error. Starting the script (to be exact: cscript.exe executing the vb script) from within WinDbg shows a different behavior: Now WmiPrvSE is started, it connects to the internet and finally tells me that the product key is blocked. I do not know why. I think I did everything right. The only "helpful" answer I was able to find, was doing the whole process again, starting with the installation of Windows 7. For sure, I will not do this as it will take me several days again (yes, it does). Other reports of the problem were different as to at least one of the preconditions weren't met.   I'm also aware of this:

I had to reset my Windows 8 laptop to factory settings because an application downloaded from the Microsoft official page totally ruined the OS and now I cannot activate Windows. When I enter product code in an elevated command prompt I receive a WindowsScriptHost error:     "Run slui.exe on a computer running Microsoft Windows non-core edition     0x2a 0x80070426 to display the error text".   Google told me to check for Software Protection service - when I try to start it, I get: Error 5-access denied, although I am administrator.  Can anyone please help - there must be a solution other than formatting? I am using Windows 8.1 64b on Dell Inspiron laptop.


I'm new to MySQL, I've created my first data driven website but have some questions about how to best structure it for multiple users.   To explain: The website allows companies to keep track of promotions they are offering. Many companies will use the website and from each company there will be many promotions and many users. The database will contain several table describing the products being offered, sales data etc.  Assuming they successfully login,I assume it's best for each company's info to be stored in separate databases, I see three options for how to structure the data:   Should I also have a distinct database for each promotion?(This will lead to a very large number of databases). Would it be better to only have a single database with data from all promotions appended within the same tables and distinguished the records with a column describing the promotion id? (This strikes me as the simplest conceptually, however, with this approach the tables would become large, and when the user sorts the tables they will have to sort data from all promotions even though they are only interested in a single promotion) Or should I have a single database and create separate tables for each promotion, perhaps by adding the promotion name as a suffix.(This will lead to a very large number of tables within the database over time as each company may have 100 promotions a year).   Sorry for the long question, any help appreciated.  Thanks

When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs to know that login and password somewhere. What is the best way to secure that password? It seems like just writing it in the PHP code isn't a good idea.


On my Ubuntu 20.04 machine it seems that some internet addresses are blocked or unavailable. I cannot not reach github.com and askubuntu.com from the browser. Also cloning from github via the terminal is not possible. Other websites work like google.com. Even sudo apt update seems to have connection problems.   Update: I have run systemd-resolve --status for DNS info and here is the output:

I just installed the latest Desktop OS Ubuntu 16.04.03 LTS. After install, I cannot connect to the internet.  I tried to ping google.com and it says ping: unknown host google.com.  I tried to ping google's IP 172.217.25.14 and also their DNS 8.8.8.8 and the connection is successful.  I think the problem is with my DNS. I already reinstalled Ubuntu with the same results. I can also Ping and even browse my local router at 192.168.1.1. The machine has a valid IP address (from the router). And there is not problem with my internet (there are other computers that are connected to the network and can connect to the internet).  I've got this installed on an ASUS P8Z68-V PRO/GEN3 motherboard. I'm using the onboard LAN.  I cannot browser, the system cannot update because it cannot connect to the internet. Again I think this is somewhere around name resolution but I just can't put my finger on it.  Thanks for the help.


Let $X_{1}, X_{2}, \ldots$ be exponential random variables with parameter $1 .$ Let $N$ be a geometric random variable with parameter $p$. Prove that $S_N = \sum_{i=1}^{N} X_{i}$ is exponentially distributed with parameter $p$. The sum of n exponential random variables with parameter $β$ is a $gamma (n, β)$ random variable, therefore $f_{S_N}(s) = \frac{1}{(N-1)!}s^{N-1}e^{-s}$ and it should be equal to $pe^{-ps}$. I just don't see how this can be possible. I feel like I have to apply Poisson process with rate 1 as $X_i$'s are interarrival times and $f_{S_N}(s) = P_{N-1}(s)$. Any hints?

Let $X_i$ for $i=1,2,...$ be a sequence of i.i.d exponential random variables with common parameter $\lambda$. Let $N$ be a geometric random variable with parameter $p$ that is independent of the sequence $X_i$. What is the pdf of the random variable $Y=\Sigma_{i=1}^N X_i$.


I cant find achievements, in menu, in-game, everywhere, i have searched a post on this side but it didnt worked, i checked every single setting but theres no "achievements" button. Yes i checked the exact post saying "how i check my achievements on minecraft" (or idk name) it didnt work

I don't know how to view my achievements. I am on Minecraft bedrock edition v.1.14.60. I have actually looked up "how to find achievements in Minecraft bedrock edition 1.14.60" on Google, but even after searching that long phrase and looking everywhere the achievements were on their screens, I still can't find achievements anywhere. Here's proof!


Is there a feature that lets me cross post one of my questions from Stack Overflow to the Web Applications SE?  I want my question to appear on both sites, but I don't want to have to rewrite it.

It is possible to migrate a question from one Stack Exchange site to another by closing, but if I have a question that I think is on-topic for multiple Stack Exchange sites, is it OK to post it on both (multipost)?   For example, I have a question that's earned me the tumbleweed badge on SO and I'm not sure what the best thing to do with it is. It's about a web server so it might be answerable on Server Fault but it's really more of a programming thing, hence the posting the question on Stack Overflow.    Is there any way to make the question visible on multiple sites (crosspost) and then accept the answer wherever it came from?


I have searched for how feature importance in random forest works, but I could not understand. Can anyone explain how it works?.  How random forest selects feature importance by Gini?

I'd like to determine the relative importance of sets of variables toward a randomForest classification model in R. The importance function provides the MeanDecreaseGini metric for each individual predictor--is it as simple as summing this across each predictor in a set?  For example:  # Assumes df has variables a1, a2, b1, b2, and outcome rf <- randomForest(outcome ~ ., data=df) importance(rf) # To determine whether the "a" predictors are more important than the "b"s, # can I sum the MeanDecreaseGini for a1 and a2 and compare to that of b1+b2?


Pokémon Go graphic glitch.  My daughter was trying to capture Raikou, after feeding berries and several failed attempts with ultra balls she fled the capture prize screen.  When trying to go back and capture the prize we are brought to a blurry bluish white screen with no buttons or options to click on.  Please help!!!  Here’s a video of my issue:                                !

I finished all my field research tasks last night and attempted to capture Raikou, but ran out of Pokeballs. I fled the capture, assuming I could come back later and do it again once I had collected more.   Today the prize is still there, but every time I click it takes me to a blue and white screen and nothing happens. I have rebooted and signed out to try and restart it but now I don't know what to do. Any ideas? Has anyone experienced this?


I got a laptop with pre-installed windows 8. I want to dual-boot Ubuntu on it. The problem is that my laptop has only one drive(no partition). How do i install Ubuntu without losing my pre-installed Windows and all the data stored. Is there any way to make partition without having the risk of losing the windows data.

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?


I am an Indian citizen currently in NZ and I need to travel to India really fast.   The cheapest flight I could find was a China Airlines that will be stopping at Sydney for a refuel. I know that Indian passports need Transit Visa when travelling through  Aus but, do you still need it if you don't have to deboard the plane and it's only stopping for a 2 min refuel?

Indian passport holder. Do I need transit visa in Sydney?


Is it logic operators or logical operators / arithmetic operators or arithmetical operators. I'd expect both cases to be the same (either have the al suffix or not), and I usually check Google when I"m not sure, but in this case I'm not getting consistent results:  logic operators: 77k results logical operators: 343k results arithmetic operators: 434k results arithmetical operators: 10k results

I just came across a course name: Geometric and Theoretical Optics. The mismatched endings bug me. Why do we have both -ical and -ic endings?   Is there any difference in meaning between, say, theoretic and theoretical? I know that acoustic and acoustical mean slightly different things, but is this difference inherent in the words, or is it just usage — we happen to use the former for sound, and the latter for ceilings?


Is there a way I can use \phantom to hide the contents of an environment, such as itemize?  This does not execute:  \phantom{\begin{itemize}           \item Hi!          \end{itemize}}   I'm specifically not looking to just change the text white, because I don't want the contents highlightable in the output.

I am quite new to LaTeX so my question may be trivial, but I haven't found a good solution so far.  I am preparing some lecture notes and I would like to have 2 different versions: one for myself, containing all the info I need during the lecture, and one for the students, with some of the text and/or graphics and/or equations blanked out (with some white space occupying the same space on the page, so the students could fill the gaps). I know of \phantom, but it does not seem very efficient as I would have to prepare 2 versions of the same document. I have also seen the censor package, but it does not seem to play nicely with equations. Any other suggestion on how to do this cleanly and efficiently?


Show that the function $f(z) = xy + iy$ is nowhere analytic.   Attempt:   $u_x = y, v_y = 1 , v_x = 0, u_y = x$  Hence the CR equations hold only for $(0,1)$. Doesn't it mean that the function is differentiable (analytic) at that point? So is the question wrong as it says "nowhere" analytic.

$f(z)=xy+iy$  $f(z)=u(x,y)+iv(x,y)$  $u=xy$, $v=y$  $\frac{\partial u}{\partial x}=y$, $\frac{\partial v}{\partial x}=0$  $\frac{\partial u}{\partial y}=x$, $\frac{\partial v}{\partial y}=1$  We see that $\frac{\partial u}{\partial x} \ne \frac{\partial v}{\partial y}$, except for $y=1$  Also, $\frac{\partial u}{\partial y} \ne -\frac{\partial v}{\partial x}$, except for $x=0$  The Cauchy-Riemann equations are not satisfied anywhere in the z-plane except at the point $x=0$, $y=1$, i.e. $z=i$  $f^{'}(z)=\lim_{\delta z-> 0}\frac{f(z+\delta z)-f(z)}{\delta z}$


In Arcmap 10.6, while using Zonal Statistics as Table tool, some of my feature zone data is being excluded from my output table. Here is the scenario. I'm using a polygon layer of buildings, with a raster layer above it that represents radio coverage.  Each pixel is an integer value representing signal strength at that area.  My intention is to add attributes to the building polygons that represent the amount of signal power in their are. I'm using Zonal Statistics to Table tool to with buildings as my feature zone data and FID as the Zone field.  I'm using radio coverage raster as my Input Value raster.  The output is a table that includes a row for each polygon/building, ( except those that are inexplicably missing  ), and each row has a value for based on the raster signal strength values in that polygon's area.  As an example, the polygon in light blue is one of the polygon/buildings being left out.  It's well within raster coverage as can be seen by the Pixel Inspector tool.  Also the pixels are smaller that the building, 10' x 10'. The surrounding features are being included.  Out of 48400 polygon/buildings, about 80 seemingly randomly located building are being excluded from the output. Can someone please tell me why? Also as a side note. I originally had this problem using 1100' x 1100' pixels.  I read somewhere that the pixels should be smaller than the polygons. Why is that? If a single pixel covers several polygons, shouldn't all the polygons inherit the value of the pixel that's completely covering it?

I'm new to GIS. I want the sum of nighttime lights (DMSP) by district for some country. I'm running this arcpy.gp.ZonalStatisticsAsTable_sa(Limites_distritales, "IDDIST", rc, temp_table, "DATA", "") and then converting to .csv. However, when I check the output some districts (identified by IDDIST) are missing. I've checked all my script and they shouldn't be dropped; my guess is that they are being assigned NoData because they overlap multiple grids (and no single grid is in the polygon) and thus no statistics are being calculated for them.  One of the problematic districts is shown in the picture below.   Is there a workaround for this?


Good day everyone,  today I struggled with my code for more than an hour, just to find out that Python did not give an out of bound error. This is my summarised code:  array = [] n = 0 while n < 5:     array.append(1)     n = n + 1 print array for i in range(0,1):     print i-2     print array[i-2]   Clearly array[i-2] is out of bound, but the code still runs. This is the output:  [1, 1, 1, 1, 1] -2 1   Am I missing something, is it my PC or is it something more in depth on how arrays in Python work?  Greetings

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


I'm new to QGIS and I have to calculate the slope of a DEM (I use srtm-data). I already detected the geoalgorithms toolbox and I also produced a raster layer with the slope using the tool "slope, aspect, curvature" (One can find it in Domain specific algorithms - Terrain analysis and geomorphometry). I used the 2. Degree Polynom (Zevenbergen & Thorne), which is the default. A visual check shows that the general location of slopes seems to fit (I compared it to Google Earth).  Now my problem is: I have no clue about the unit of the output. The pixels at the steepest slopes have values around 0.3.... I have never been to that area, but it is located in Southern Germany, in an area that is usually quite hilly. So I strongly doubt that the slope is only 0.3° in the steepest area. I have the assumption that it is just 30°, but I would like to check somewhere to be absolutely sure how to interpret the result (since it could also be percentage values). I find a lot of information about what the tool does, but never any site where the units of the output are clearly stated.  Does anybody know how I can find out the unit of this output?

I have contour information in the form of line features (see picture below) and I want to do a slope analysis in QGIS. Is it possible?


I wanted to execute a bash command from within python and get the output:  ifconfig | sed '/^$/d' | awk 'NR > 1 { print $2 }'   I already tried:  p =subprocess.Popen(["ifconfig | sed '/^$/d' | awk 'NR > 1 { print $2 }'"], stdout = PIPE.) out = p.communicate()   and dividing the process into smaller ones:     p1 and p2 and pass p1 output to p2 but this is not working   how can I do it?

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


How does one prove the following limit? $$   \lim_{n \to \infty}   \sqrt{1 + 2 \sqrt{1 + 3 \sqrt{1 + \cdots \sqrt{1 + (n - 1) \sqrt{1 + n}}}}} = 3. $$


Let $n$ and $m$ be positive integers. Find all solutions of the equation $n! = \frac{m(m-1)}{2}$.  I found the following solutions: $(1,2)$, $(3,4)$, $(5,16)$,  and tried to find more solutions with a computer,  but there is no other solution with $n$ smaller than $1000$.

I came across a statement online and have been looking for a proof :  It states that 1, 6 and 120 are the only numbers which are both triangular and factorials.  Is there any way I can prove this? This claim looks too 'big' and I've tried to prove it but  I couldn't. Can anyone help me to prove this?


I've created a SPA-website which will serve as my personal blog. I just can't quite decide on a permalink-structure for the blog-posts.  Which of the following three permalink-formats would work better for SEO?  My choices are:  title   category/title   year/month/title

How should a ? What are the factors to consider? What are the pros and cons of the variants?  Factors that makes up a good URI   Stability over time Short Give the user an idea what is linked Easy to type Easy to guess (relevant only for a few links like "/jobs") Search engine friendly URI schema should be consistent over the whole site URI schema should allow future extensions   Any more?  Examples   example.com/articles/3252 example.com/articles/how+to+design+good+uri example.com/articles/3252/how+to+design+good+uri example.com/good-uri-design example.com/articles/good-uri-design example.com/a/good-uri-design


I'm still just getting back into the swing of things in .NET (took a 6 year hiatus) and am running into a problem which I feel I am close to solving, but can't quite get there.   What I'm trying to do is refactor some code I wrote that does some setup various parts of a service. The code is pretty repetitive and I have to do a similar thing in another place so I thought I would make it more generic. Right now I am doing something like:  public void InitConfiguration() {   ...   myservice.AddPart(s =>   {     s.ShouldDoStuff = true;     s.MethodWithGeneric<SomeType>();   }      myservice.AddPart(s =>   {     s.ShouldDoStuff = false;     s.MethodWithGeneric<SomeOtherType>();   }   // do this 5 more times }   So.. my approach was to create a MyConfigCollection class that has a List of IMyConfig objects that have the members I need to do .AddPart() on my service:  interface IMyConfig {     public bool ShouldDoStuff {get; set;}     public Type FooType {get;} }  public class MyConfig<TFooType> : IMyConfig {     public bool ShouldDoStuff {get; set;}     public Type FooType {get {return typeof(TFooType);}} }  public class MyConfigCollection {    public List<IMyConfig> MyConfigs {get; set;} }   It sort of started smelling weird to me when I realized I had to make an interface for a config then implement it with a generic type param in order to have a List of MyConfig with different types. Then when I tried to use it:  public void InitConfiguration(IConfigCollection configurations) {     foreach ( IMyConfig config in configurations)     {         myservice.AddPart(s =>          {             s.ShouldDoStuff = config.ShouldDoStuff;             // I can't do this!!!             s.MethodWithGeneric<config.FooType>();         });     } }   Righhtt I can't do that. I understand generics are intended to be set at compile type so it's a code smell to try and make  them dynamic. The api of myservice is not something I can change (third party) I also am not sure what approach I could take here to achieve my goal.  I feel like this is a solved problem and there exists a best practice for situations like this but my Google-fu has failed me.  Could anyone suggest an approach I could take here? How could I trim down the duplication I am doing(and will have to do again) and make this a bit more flexible? Any advice is appreciated. Thanks!

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


When I was making my terminal i was wondering if I can call a function by array. (This code is not done yet so please code is a bit messy.)  #include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> #include <unistd.h> #include <limits.h> #define true 1 #define false 0 typedef int bool;  /* Static */ static char Input[CHAR_MAX]; static char CurrentDirectory[CHAR_MAX]; static char *Command; static char *Argument; static char *Commands[]={"test","test2"};  /* Functions */ int Check_Command(); int test(); int test2(); /* --------- */  int main(){     printf("#######################\n\tterminal\n\tType \"help\" for the list of commands\n#######################\n");     prompt:     printf(">");     fgets(Input,CHAR_MAX,stdin);     int res=Check_Command();     if(res==0){printf("Unknown Command!\n");}     goto prompt; } /* Check_Command() function returns 0 if doesn't suceed and returns 1 of it suceeds */ int Check_Command(){     //Since input variable is static, no need to send in arguments     Input[strcspn(Input,"\r\n")]=0;     Command=strtok(Input," ");     Argument=strtok(NULL," ");     int x=0;     while(x<sizeof(Commands)){         if(strcmp(Command,Commands[x])==0){             Commands[x](); <----- Can I call a function like this?             return 1;         }         x++;     }     return 0; }  /* Commands */ int test(){     printf("Success!\n");     getchar();     exit(0); }  int test2(){     print("Success [2] \n");     getchar();     exit(0); }   If this possible then this would be lit, Im too lazy to make commands into a executable and using if statements for all commands.  if you are too lazy to read the whole code here is a basic concept (UNTESTED):  static *Commands[]={"test","test2"}; int main(){     char *Command="test";     int x=0;     while(x<sizeof(Commands)){         if(strcmp(Command,Commands)==0){             Commands[x]();         }         x++     } } int test(){    printf("Hi"); } int test2(){     printf("hey"); }   Edit:     static char Commands[]={test,test2};  DOES NOT WORK   This also includes the "possible duplicate" answer. (Im using Mingw, Windows 10)

How should I use array of function pointers in C?  How can I initialize them?


I am trying to get application name by typing a command but it seems like there is no command to get application name from process id. We can only get process name from using process id in command. The command is ps -p <process id> o comm= , which return process name. I want to get application name by using of process id so my query is that: which command I can use to get application name using the process id in Linux?

I'm writing a script which will use the filename of running processes. However, I'm unable to determine the full executable name of some processes.  Initially, I decided to query the Name entry in /proc/PID/status (or the second field in /proc/PID/stat). However, according to the , that field is always truncated to 15 characters, but I need the full name to avoid conflict/confusion.  An answer of  suggests to use /proc/PID/cmdline, but there are problems too. Some programs (e.g. chromium, electron) do stupid/smart things to the value in /proc/PID/cmdline so I can't just split the data there by NULL and directly get the program name as suggested in the manpage - they fill in a lot of things to the original argv[0] field and separate them by space, and I don't think merely splitting by space is a good choice because the path/filename may contain spaces.  This is even more complicated when I find out that some scripts (e.g. python scripts) are in the form /usr/bin/python /path/to/script while some are in the form /path/to/script. Though this is much easier to deal with as long as I have that field (without jams as above) and manually check and split.  Any ideas how to get the full program name/filename? It doesn't matter if the name contains the full path or not because that can be easily dealt with (as far as I can see now).


In February 2018, I applied for a UK settlement visa to get married to my partner of 4 years. It was refused because, when we applied, our savings account did not have sufficient funds. I did not understand that we needed £62,500 to be in his bank account for 6 months and we only had £18,000 at the moment of application, It was refused, obviously, after 3 long months of waiting for a response.   Since it had been so many months wsince I had seen my partner, I decided to apply for a visitor visa right after my refusal. I planned to spend 6 weeks with him, while we waited to get the money needed and have it there for 6 months.  This visa was also refused, stating that my intentions might have not changed. They also pointed out that I said that the previous application was for a fiance visa but it was actually for a settlement visa .   How can I apply for a visitor without it being refused again? I want to see my partner and me going there is the only way, since he's very busy with work.

Over the course of time here on TSE, I have observed individuals whose pattern of visa applications is best described as ''...     serial refusals - Two or more consecutive visa refusals issued by the same regime to the same person. Commonly for the same, or nearly the same, reasons. In some visa regimes Serial refusals can have a cumulative effect wherein the applicant's credibility is increasingly eroded, especially when the application pattern suggests a secondary agenda.   A common thread appears to be the need to visit the destination country (especially Schengen, the USA, or the UK) with a special sense of urgency. Also common in these cases are the following types of questions...   Should I just reapply once again? What are my chances? What can I do to improve my odds in the future? Can I somehow address the previous refusals to avoid them being a burden on all future applications? How can I break the pattern?      NB: This question is intended as a canonical about serial refusals. I have never been personally denied a visa.


Given:  var x = function () {  };   x.prototype = { abc: 25 };   Can someone explain to me what this means. Could this be done all inside a function without the .prototype?  var x = function () {   // something here ? };

I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this ".prototype" property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot.


                    <title></title>                  `<div id="sample" >`
Line1

Line2

Line3

      <input type="button" id="print" value="print" />
Miranda v. Arizona in Context

Miranda v. Arizona in Context
                From this have to remove url, page count, Date from Header and footer   Thanks in Advance

I got an HTML with the <body onload="window.print()">.   The question I'm trying to ask is:   Is there any way to remove the strings that the web browsers add to the printed page? Such as:   Web site from where the page was printed Page count Title of the web page Date of printing


I came up with a Complex "Proof" idly at work today that seemed to be rather simple, but proved counterintuitive on paper. Year 12 Student looking into pure mathematics, so all feedback is cool and interesting.  $-i = -1 \times {(-1)}^{1/2}$  $-i = i^2 \times {(-1)}^{1/2}$  $-i = {(i^4)}^{1/2} \times {(-1)}^{1/2}$  Since:       $a^n \times b^n = {(ab)}^n$  $-i = (i^4 \times -1)^{1/2}$  And: $i^4 = 1$  $-i = {(-1)}^{1/2}$  $-i = i$  $\therefore -1 = 1$  Awesome.  I expect to use stackexchange religiously in the upcoming years, so I'll debut with this dumb loophole and hopefully come back again with some serious dilemmas.

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


I am having trouble with this problem: $f\colon \mathbb N\times \mathbb N \rightarrow \mathbb N$ is defined by   $f(i,j)=\dfrac{(i+j-1)(i+j-2)}{2}+i$.   How do you prove that $f$ is a bijection from $\mathbb N\times \mathbb N$ to $\mathbb N$?  Work: I tried to set $f(i,j)=f(a,b)$. Assuming that $f(i,j)\neq f(a,b)$, then I assume $f(i,j)< f(a,b)$and that $i+j=m$ and $a+b=m+r$ for some remainder $r$. I replaced these into my equation and try to obtain a contradiction thus proving that $i=a, j=b$. However, I get stuck after this part and I do not know of a better way of doing this.   Please help.

I am stuck on this problem:  Define $f: N\times N \rightarrow N$ by   $f(i,j)=\frac{(i+j-1)(i+j-2)}{2}+i$.   How do you prove that $f$ is a bijection thus $N\times N$ and $N$ are numerically equivalent?  Work: First I tried to prove that $f$ is injective by setting $f(i,j)=f(x,y)$. However, from here I am stuck and I cannot reduce it properly. My work really does not get anywhere significant and its really messy.


I want to use Reflection to fill my Checkboxes dynamically.  I found an helping answer    And used it in my Code:      public static List<System.Type> getModuleList()     {         // fill with all Classes in Timestamp.View.UserControls.ModuleView per Reflection           List<System.Type> theList = Assembly.GetExecutingAssembly().GetTypes()                               .Where(t => t.Namespace == "Timestamp.View.UserControls.ModuleView")                               .ToList();           return theList;     }   I filled my Checkboxes like:      foreach (System.Type type in ModuleController.getModuleList())         {             cbModule1.Items.Add(type);             cbModule2.Items.Add(type);             cbModule3.Items.Add(type);             cbModule4.Items.Add(type);         }    Now i want to create a new Instance of the SelectedType    private void CbModule4_SelectionChanged(object sender, SelectionChangedEventArgs e) {     ucModul4.Content = //new Instance of Selected Item }    I could use Reflection to create a new Instance, but I dont know how.   I want to give every Class a String which will be shown as Item in the Checkbox. Is this possible, or do I need a Method to find a Class by its String?    EDIT: I need to argue why my question differs from   So first of all this question could only solve one of my Problems, but i found it earlier and it didn't helped me. I don't know how to get the type of the list and how i can give the class an alias.

One may not always know the Type of an object at compile-time, but may need to create an instance of the Type.    How do you get a new object instance from a Type?


I've just installed Ubuntu 15.04 on a new 240GB SSD, and immediately noticed that /dev/ubuntu-vg/swap_1 on the resulting installation is 137GB.  That seems excessive, even counter-productive, but perhaps the Ubuntu installer chose that since the machine has 128GB of RAM.  Does anyone have a strong sense of whether it is useful to have ~140GB of swap, and if not, what a suitable size for the swap should be?  I do run I/O heavy binaries.  Though it may not be relevant I will note that the machine is dual CPU Xeon (E5).  Having consulted the link suggested below by Terrance, I am tempted to reduce the automatic ~140GB of swap to ~4GB, as it is taking up more than half of the 240GB SSD on which Ubuntu is installed!

I'm going to install 64 bit 14.04 on a new machine with something like 1 to maybe 128GB RAM and even more RAM later. How much space should I allocate to the swap partition?   And especially: WHY those recommendations for these numbers?    (None of the existing answers  and  explain any of the why and are a bit dated if we look at 1GB or RAM and up)


I had applied for a visit visa (business) to appear for my PLAB 2 exam on 21 June 2019. I had to attend practice classes from an academy in Manchester for which I had attached the invitation letter; my duration was 15 days to prepare my exam in a better way. I had mentioned the cost of my trip to be £1500 and my brother sponsoring me for £3000 (my entire trip).  My rejection letter stated that I was going with my mother, when I had nowhere in my form or cover letter mentioned that I am going with my mother, because I was going alone. I had shown that my brother is my financial sponsor as I didn't have enough funds in my account. I had attested all the documents of my brother but somewhere in my form I made a mistake where I wrote the total money I have is £3000, but I had only £1200 in my account. I thought we had to write the total amount, so I put my brother's sponsor money, which was supposed to be £3000; he hadn't transferred it into my account, it was in his account only.  I made one more mistake in the form where they asked how much is the cost of travel to you personally. I wrote £1500 but I think I had to write nil there. I don't know how to proceed now. Should I transfer £3000 into my account from my brother's account and get a bank statement proving the source of income? I don't have enough money in my account despite being employed since Nov 2018 with a salary of £700 per month( currently having around 700£ in my account which is less than before)as I had to make some big transactions such as booking my PLAB 2 exam (£830£), etc.  I have already booked the exam for and I don't have much time left.

I had applied for a visit visa (business) to appear for my PLAB 2 exam on 21 June 2019. I had to attend practice classes from an academy in Manchester for which I had attached the invitation letter; my duration was 15 days to prepare my exam in a better way. I had mentioned the cost of my trip to be £1500 and my brother sponsoring me for £3000 (my entire trip).   My rejection letter stated that I was going with my mother, when I had nowhere in my form or cover letter mentioned that I am going with my mother, because I was going alone. I had shown that my brother is my financial sponsor as I didnt have enough funds in my account. I had attested all the documents of my brother but somewhere in my form I made a mistake where I wrote the total money I have is £3000, but I had only £1200 in my account. I thought we had to write the total amount, so I put my brother's sponsor money, which was supposed to be £3000; he hadn't transferred it into my account, it was in his account only.  I made one more mistake in the form where they asked how much is the cost of travel to you personally. I wrote £1500 but I think I had to write nil there.   I don't know how to proceed now. Should I transfer £3000 into my account from my brother's account and get a bank statement proving the source of income? I don't have enough money in my account despite bring employed since Nov 2018 with a salary of £700 per month, as I had to make some big transactions such as booking my PLAB 2 exam (£830£), etc.  I have already booked the exam for £830 and I don't have much time left.


Prove that $e^x \ge x^e$ for $x \gt 0$  I applied the natural logarithm to simplify the function and I get $$\frac{x}{\ln x}\ge e$$  How to solve these types of problems?

How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ?


Which one would be correct: I haven't moved in awhile or for awhile when referring to traffic- i need a clearer explanation for- for awhile and in awhile

I recently got a message that says      Haven't heard anything from you in a while.   I always thought that the right way to say this would be to use for insdead of in. Are both versions correct? Would there be a difference in meaning?


After instantiating a micro server I created an elastic IP and associated my micro instance with it. In my micro instance settings panel in AWS, I see "Public IP" address and an "Elastic IP" address, which as far as I can understand, means the association was successful. However, I am able to ping the Public IP but not the Elastic IP. Am I missing a step here

I get a new elastic IP, I attach it to an instance, but it doesn't work? I can't ping the IP from my local computer either? Am I missing something here?   How do I use Amazon Elastic IP? When is a new IP assign to an instance? When I turn it off and reboot?


I have a data set consisting of $n$ elements with $d$ features for each element ($x_{i,f}$ means the value for the f-th feature of the i-th element). I would like to cluster this data set into $k$ clusters.  One problem I have is that one feature is a nominal one and another is a discrete ordinal one. As an example consider elements which have the following features:   $x_{i,1}$ : the height of a person $x_{i,2}$ : the weight of a person $x_{i,3}$ : country where the person lives $x_{i,4}$ : nr. of friends the person has   Is it ok to use a simple k-means algorithm with an euclidian distance measure?  I would introduce a indicator variable $\delta$ with the following meaning for feature $x_{i,3}$: $$\delta(i,j) = \begin{cases}   0,  & \text{if }x_{i,3} = y_{j,3}\text{,}\\    1, & \text{else.}\end{cases}$$ So two objects $i$ and $j$ have no distance for their third feature if this feature is the same (same country) and 1 otherwise.  Or do you know a better way to do a cluster analysis in this case?

I need to use binary variables (values 0 & 1) in k-means. But k-means only works with continuous variables. I know some people still use these binary variables in k-means ignoring the fact that k-means is only designed for continuous variables. This is unacceptable to me.  Questions:     So what is the statistically / mathematically correct way of using binary variables in k-means / hierarchical clustering? How to implement the solution in SAS / R?


Does the Big Bang theory directly imply that there is a much larger structure in which our universe is embedded? If this is not true then where did the Big Bang happen? Where did the material before the Bang exist?

TV documentaries invariably show the Big Bang as an exploding ball of fire expanding outwards. Did the Big Bang really explode outwards from a point like this? If not, what did happen?


I wonder if this problem:   is caused by the fact that the parent page is on a different "query page" than its children, and WP reverts to a flat list.    To test this hypothesis, can you let me know if the number of items to show per page in Custom Post Type > View All can be controlled via a hook?

Running WP 3.9.1  I've got lots of pages and sub pages.  When I get to create menu lots of sub pages doesn't display on the right level, but some do?    The pages metabox should display something more like this    EDIT  Number in screenshot are a bit screwed sorry about that.   The problem is after the first few all the pages are displayed on the same level but they shouldn't.  It should look like this       Page 1                      SubPage A of Page 1             SubPage B of Page 1                                      SubPage 1 of SubPage B                     SubPage 2 of SubPage B                     SubPage 3 of SubPage B                                                 Page 2                      SubPage A of Page 2                                      SubPage 1 of SubPage A                     SubPage 2 of SubPage A                                           SubPage B of Page 2                                      SubPage 1 of SubPage B                     SubPage 2 of SubPage B                                               ...    Any idea what cause this or how to fix it, so i can manage my menu?


How can I list the current directory or any directory path contents without using ls command? Can we do it using echo command?

I tried to use the ls command and got an error:  bash: /bin/ls: cannot execute binary file   What can I use instead of this command?


I have a String object:   NSString* name = @"John Smith";   and another String object:  NSString* intro =@"Hello this is ";   I want to be able to change the name from the UI make it within the introduction, so I tried:   _introduction = (@"Hello this is, %@", _name);   However, only the name is getting printed when I do:  NSlog(@"%@",_introduction);   I want both sentences to be printed by printing the intro object.

Are there any shortcuts to (stringByAppendingString:) string concatenation in Objective-C, or shortcuts for working with NSString in general?  For example, I'd like to make:  NSString *myString = @"This"; NSString *test = [myString stringByAppendingString:@" is just a test"];   something more like:  string myString = "This"; string test = myString + " is just a test";


I am a novice LaTeX user and trying to create a table similar to this one:    I need circles where horizontal and vertical lines intersect but could not figure out how to do it. Will you please suggest me a way forward?  Thank you. Here is my code  \documentclass{beamer} \usetheme{Berlin} \usecolortheme{beaver} \setbeamertemplate{footline}[frame number] \setbeamertemplate{itemize item}[circle] \setbeamertemplate{enumerate item}[circle]  \setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline}[frame number] \usepackage{multicol}  \begin{document} \begin{frame}{Literature} \label{specific literature} \begin{tabular}{ r r | c l }      Eren et al., (2019) &  & & \\      \cline{2-2}     & & &  \\     Berrill et al., (2018) & & & \\      & & & \\     Lee et al., (2014) & & & Empirical Studies \\      & & & \\     Ayyagari and Kosová (2010) & & & \\      & & & \\     De Backer and Sleuwaegen (2003)& & & \\      & & & \\      & & &  \\     Markusen and Venables (1999) & & & \\      & & & \\     Rodrìguez-Clare (1996)  & & & Theoretical Studies  \\      & & & \\     Grossman (1984) & & & \small    \hyperlink{literature}{\beamerskipbutton{Literature}} \\  \end{tabular} \end{frame} \end{document}

I'd like to have a timeline as similar as possible to this with the addition of being able to add a logo at the left of each textbullet, but I've got no clue at all:    Thanks very much in advance for any help :)  p.s. I've stumbled upon this answer () but I don't how to modify it to get what I want!


I made a terrible mistake. I realized it right after I did it, but now it is too late.  I ran this command:  sudo chown -R $USER /usr/lib   and I tried to fix it with:  sudo chown -R root /usr/lib   but I get this error:  sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy" sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 sudo: fatal error, unable to load plugins   I tried to log in as root with:  su   but authentication failed every time. I'm 99% sure I have my password right.  I figured I owned the files now, so I also tried:  chown -R root /usr/lib   But the operation fails. I get what appears to be a long list of an the same error for changing the permission of every file. Each line looks like this:  chown: changing ownership of 'lib': Operation not permitted   Is there anything I can do to save myself?

After running this command - sudo chown -R $(whoami) usr/{lib/node_modules,bin,share} I am not able to run sudo anymore: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set. How do I fixed that?  I read  but I am not sure what advice to follow and if it's applicable to my case.


I have over 600 JPG images, and I need to apply the same action to all of them and then have them saved to a new folder. I tried batch, but after each image it brings up the JPG options dialog asking me to choose compression and what not. I want it to just save it automatically. How can I do this?  Note: I already tried "Override Save As Commands" and after it's done the destination folder is always empty.

If I had the time, I would go through each and every photo to make sure that the dimensions and quality are pixel perfect. However, I'm in a time crunch, and need to make the couple hundred photos that are 4320 x 3240 into 950x630.   now I could- 1. Upload them into WordPress, uses native image reducing components and J query go from there. 2. Go through each and every photo, reduce file size, and proportion and bring it to Yahoo's PNG processing script.  However, maybe I'm missing a choice or alternative workflow that would allow for processing all of these photos in a clear manner without losing quality or perspectives. Any workflow suggestions?


So I think I have a solution to this problem but I'm not certain if it works or not.     Problem Statement:    Let a, b, d be non-zero integers. If d|a and d|b, show that d|gcd(a,b).     Attempted Proof   Let $\gcd(a,b) = k$ for some $k$ in integers.  By Bezout's Identity, we can write this as $ax + by = k$ for some $x, y$ in integers.  We know $d|a$ and $d|b$; this implies that $d|ax$ and $d|by$  Since this means d divides all terms on the left side, it divides the entire left side:$ d|ax + by$  This implies $d|k$ which implies $d|\gcd(a,b)$.  Could someone please verify if my solution is valid or not?

Context: I was looking at . I didn't know the result referred to in Brian M. Scott's answer is hard enough to require a separate proof   ― .  ― .  (1)  ― What's the intuition? Is Bezout Identity supposed to be intuitive?  (2) — Why doesn't this try work? Let $c$ be any common divisor of $a, b$. Therefore $c\mid a, c\mid b \iff cj_1 = a, cj_2 = b$ for some integers $j_1, j_2$.     Call $g = \gcd$. By definition $\gcd(a,b)\mid a$ and $\gcd(a,b)\mid b$ and $c \le \gcd(a,b)$. Therefore $g\mid a, g\mid b \iff gk_1 = a, gk_2 = b$ for some integers $k_1, k_2$.   The two paragraphs together precipitate $cj_1 = a = gk_1,  cj_2 = b = gk_2$ but this only proves $c\mid gk_1, c\mid gk_2$?    Origin - Elementary Number Theory, Jones,  p9, Exercise 1.8


I am a graduated Master's student from Asia and really want to take a PhD position in Canada, America or Germany. My English language skills are good but I don't have an IELTS degree. Some of my friends say that if I talk to a professor who I want to work with, I do not need a high grade in English exams like IELTS and I do not have any reaserch or projects or paper because it is unusual in master of pure math(which I studied) to have any of them(because it is so hard to do). On the other hand, I wrote the following email but I am so nervous of the whole structure and its content. Would you please guide me for sending a better email for a PhD position? Thank you in advance.  Dear professor “ “: My name is Dal.OL. This year, I graduated from Shahid Beheshti University with a master's degree in geometry with GPA 3.69. My interesting field for researching is dynamical systems in geometry and my master’s dissertation was in hyperbolic dynamical systems which was really exciting for me and made me Curious about the hole concepts used around it, therefore I am deciding to continue studying in this field of Geometry. I am seeking admission to the PhD studies in related with my master’s dissertation and I also like to work on the manifold concepts and their extension in dynamical systems. In the other hand I reviewed your profile and thought that it would be wonderful if you would be willing to take me as your PhD student. I look forward to hearing from you. Thanking you for your consideration. Sincerely,

When needing to ask a professor about something important and potentially delicate, what is an appropriate way to phrase the question or write the email?  Examples include:   Requesting a recommendation letter Asking for exceptions to policy (e.g., ignoring a course prerequisite, rescheduling an exam) Asking if you can do research with them, join a group, get into a program Scheduling a meeting, exam, or defense Letting them know about a change of plans Letting them know about a life event affecting your work or studies (e.g., wedding, funeral, sickness, vacation)


I have a subsection named \subsection{$Rp_{\widehat{Y},*}(\mathcal{P})$ has property bla and bla}. I would like to keep this as title of my subsection, but it creates problems.  My code is the following.  \documentclass[a4paper,12pt,oneside]{article}  \usepackage{amsthm} \usepackage{amssymb} \usepackage{amsmath,amscd} \usepackage[english,italian]{babel} \usepackage{latexsym} \usepackage{graphicx,subfigure} \usepackage[a4paper,top=30mm,bottom=30mm,left=30mm,right=30mm]{geometry} \usepackage{tikz} \usetikzlibrary{matrix,arrows,decorations.pathmorphing} \usepackage{hyperref} \usepackage{accents}  \usepackage[babel]{csquotes} \usepackage[maxnames=99,style=alphabetic,backend=bibtex]{biblatex}  \begin{document}  \subsection{$Rp_{\widehat{Y},*}(\mathcal{P})$ has property bla and bla}  \end{document}   If I keep it like this, it compiles giving multiple warnings about "Token not allowed in a PDF string". In this case the main problem is that the sidebar index of sections of the outcome PDF carries "RpY"0362Y,*P bla and bla" instead of the correct title with the math.  Furthermore, if I replace \widehat by \hat, it gives the error "Tex capacity exceeded", and it does not compile.  If I replace \subsection{$Rp_{\widehat{Y},*}(\mathcal{P})$ has property bla and bla} (or the version with \hat) with \subsection[just text]{$Rp_{\widehat{Y},*}(\mathcal{P})$ has property bla and bla} then I get no error. On the other hand, I still don't get what I want in the sidebar, since I would really like the math to be there as well.  How can I have the PDF compiling correctly and carrying the right math on the sidebar as well?

Possible Duplicate:          The following code:  \subsection{The classes $\mathcal{L}(\gamma)$}   generates the errors:  Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `math shift' on input line 1938.   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `\gamma' on input line 1938.   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `math shift' on input line 1938.   What do I have to do to keep \gamma in the subsection, so that it is also listed in the table of contents?


I've started learning sequences and I'm having a hard time calculating the following:  $$\lim_{n\to ∞}{\sqrt[n]{3^n + 7^n}}$$  Using Heine’s Lemma I'm trying to solve it analogous to the corresponding limit definitions for functions, but I get stuck every direction I go.  Any help is appreciated.

Calculate the limit: $$\lim_{x\to\infty} \sqrt[x]{3^x+7^x}$$  I'm pretty much clueless on how to approach this. I've tried using the identity of $c^x = e^{x \cdot \ln(c)}$ but that led me to nothing. Also I've tried replacing $x$ with $t=\frac{1}{x}$ such that I would end up with $\lim_{t\to 0} (3^{1/t} + 7^{1/t})^{1/t}$ however I've reached yet again a dead end.  Any suggestions or even hints on what should I do next?


How do I get this working because the swap is not working as intended? I believe that my scope of my local variables is incorrect and I am having trouble where to place them. My code outputs 4, 5 but it's supposed to output 5, 4. I also can't add a print statement in the swap method.      public class SwapTest {             public static void main(String[] args) {                 int num1 = 4;                 int num2 = 5;                 swap(num1, num2);                 System.out.println(num1 + " " + num2);       }       //a method that swaps the values of two int variables.       public static void swap(int num1, int num2){               int num3;               num3 = num1;            num1 = num2;               num2 = num3;        }  }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I have all of my graphs working, so now I am trying to scale my plots down to a relatively small size (3x3in). I added the figure command and the graph goes blank. Right size, just blank. I'm obviously missing something basic but it's beating me.  When I comment it out, it shows fine ( if a bit big). When I include it, it blanks the image.   What am I doing incorrectly ?   plt.setp(line[lindex], linewidth=1.0) plt.setp(line[lindex+1], linewidth=2.0) plt.xlabel("Months") plt.ylabel("Score") plt.title(CurrAppName + "- by month") plt.legend() # plt.figure(figsize=(3,3)) plt.show()

How do you change the size of figure drawn with Matplotlib?


I'm trying to set a textview to a editText text. When I do that I have this error:      Process: com.example.game, PID: 9829     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference         at com.example.game.MainActivity.onClick(MainActivity.java:79)         at android.view.View.performClick(View.java:5637)         at android.view.View$PerformClick.run(View.java:22429)         at android.os.Handler.handleCallback(Handler.java:751)         at android.os.Handler.dispatchMessage(Handler.java:95)         at android.os.Looper.loop(Looper.java:154)         at android.app.ActivityThread.main(ActivityThread.java:6119)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)   It's strange because when I do system.out.println with the text I get   I/System.out: Player1   Can someone help me ? My code:          System.out.println(p1.getText().toString());         System.out.println(p1.getEditableText().toString());         j1.setText(p1.getEditableText().toString());         j2.setText(p2.getEditableText().toString());   p1 and p2 are editText and j1 and j2 are TextView. I don't know if it's the problem but they are in different resource layout.

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?


There is an idea that (from ):     If upgrade items of the same type are placed adjacent to each other, they may provide different bonuses. If a bonus is awarded, the player will be notified of this effect with a colored light linking the relevant upgrades.   So:   How does it work? / What is mechanics behind it? Do the bonuses stack up? E.g., whether two in one place and two in another give the similar bonus than four next to each other? Should the updates be placed next to its related tool? E.g., “Beam Focuses” next to “Mining Beam”. Will it give the greater bonus? How to update Jetpack if it is in the corner? “Jetpack Boosters” next to each other are highlighted with yellow.

So I recently discovered via  that upgrades should be adjacent to the thing they're upgrading (or other upgrades to it). You can see in the image below that the UI will color the border of adjacent upgrades but not ones sitting by themselves:    The post itself is a little unclear how much that helps, and suggests it gives them some sort of bonus, but has no details and is not 100% reliable. Are we sure it gives a bonus, or does the upgrade maybe just not work in the first place if it's not adjacent?  Recently I'd upgraded my jetpack, and while I didn't have a stopwatch out to time it, I wasn't noticing much difference. Then I looked at the text more carefully:    Is this implying that the upgrade won't work unless it's actually adjacent to the jetpack? If so, this seems problematic since when the game starts your jetpack already has things surrounding it and can't be dismantled or moved.   Overall I'm left very unclear on if upgrades must be adjacent to work, and if not, what kind of bonus they get when adjacent.


I'm trying to have two layers of indirection, though let me know if I'm a victim of the  Boiled Down Explanation of What I'd Like to Achieve > test1=\$test2 > test2="string to print" > echo $test2 string to print > echo $test1 $test2  This all makes sense, but what I want is to perform a command using $test1 and print out string to print.  My gut reaction was that this should work > echo $(echo $test1) $test2  Bollocks.  Does anyone else know if this is possible? More Detailed Explanation of Why I Wish to Accomplish This I want to create a text file template containing $variables which can be re-used to generate many text files.  My thinking is: set environment variables, process the template file and output to another file. Example: > #set vars > cat template.txt | magic_var_expansion_cmd > out1.txt > #set vars > cat template.txt | magic_var_expansion_cmd > out2.txt > #set vars > cat template.txt | magic_var_expansion_cmd > out3.txt  This could obviously be used in a script, and in more sophisticated ways but this is the  in my mind's eye.

I have to regularly create 100+ text files from templates. I currently use an overly complicated shell script. I think there is a smarter way to handle this, but I don't know how.  I have a "database" :  # outputfile      template            data1   data2    data3 first.txt         $template_main      $text1  abcd     1234 second.txt        $template_main      $text2  efgh     5678 third.txt         $template_other     $text1  ij       90   And a configuration file :  template_main=main.txt template_other=other.txt text1=whatever text2=blah   The templates are text files with placeholders like %%data2%% (the placeholder form can be changed).  Does someone know a tool to automate this better than with a complicated shell script ?


Prove that among any three distinct integers we can find two, say $a$ and $b$, such that the number $a^3b − ab^3$ is divisible by $10$.  Can anyone help me solve this?

Prove that if three distinct integers are chosen at random then there will exists two among them, say $a$ and $b$ such that $30|(a^3 b-ab^3)$


I am trying to enable ipv6 support to my linux system. Im trying to modify /proc/sys/net/ipv6/conf/all/disable_ipv6 this file but system is not allowing to do so.

Ubuntu provides some good information on how to enable UFW and on how to enable IPv6 with miredo:       But what is missing is information on how to properly configure UFW to let Miredo work, as as soon as I enable UFW IPv6 stops working:  $ ufw disable $ ping6 ipv6.google.com PING ipv6.google.com(2a00:1450:8004::93) 56 data bytes 64 bytes from 2a00:1450:8004::93: icmp_seq=1 ttl=56 time=1886 ms $ ufw enable $ ping6 ipv6.google.com PING ipv6.google.com(2a00:1450:8004::6a) 56 data bytes ping: sendmsg: Operation not permitted   So how do I properly configure both Miredo and UFW together that basic IPv6 is working, but with all other incoming traffic being blocked?


I know it's not anything but I just want to know how I lost that.  So what happened was I had 932. But now I have 930. I checked my reputation log for today but there wasn't anything on downvotes. I checked for answers but there was only 1 deleted answer and that had 0 score.

This all started from the day before yesterday. I logged into my account and found out 2 reputation was gone. I checked my reputation changes, but didn't find any record. The same thing occurred yesterday and today.  What is wrong?


I was compiling a document containing the following lines (132 to 135):  \begin{equation}  \label{shiperfina1}  H_{sh}=\sum \limits_{j=o}^{n} \vec{S}\cdot\textbf{a_j}\vec{I_j}  \end{equation}   In the 135 line the following errors show up: missing $ inserted and missing } inserted. Furthermore, this errors apears several times in the log (26 times to be exact).  In the previous lines it's everything correct.  What do I do?   Thanks.

I'm getting errors in a matrix equation. When I compile it looks fine, but I'd like to fix them so I don't have to press return for every error at compile time. The code for the equation is:  \begin{equation*}  \begin{bmatrix} U(1,t)  & \cdots & U(n,t) \\  \vdots & \ddots & \vdots \\ O_{n1} & \cdots & O_{nn}  \end{bmatrix} \times \begin{bmatrix} W(1,1)  & \cdots & W(1,n) \\  \vdots & \ddots & \vdots \\  W(n,1) & \cdots & W(n,n)  \end{bmatrix} = \begin{bmatrix}  D(1,t)  & \cdots & D(n,t) \\ \vdots & \ddots & \vdots \\ I_{n1} & \cdots & I_{nn} \end{bmatrix}  \end{equation*}   The errors I'm getting are related to missing $'s inserted.


W: Failed to fetch http://ppa.launchpad.net/merlwiz79/cinnamon-ppa/ubuntu/dists/quantal/main/binary-amd64/Packages  404  Not Found  W: Failed to fetch http://ppa.launchpad.net/merlwiz79/cinnamon-ppa/ubuntu/dists/quantal/main/binary-i386/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead. ashley@ashley-SVE15113FDW:/etc/apt$ sudo apt-get install cinnamon Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help resolve the situation:  The following packages have unmet dependencies: cinnamon : Depends: cinnamon-common (= 2.0.14-20131203040047-quantal) but 2.0.14-20131203040103-precise is to be installed         Recommends: cinnamon-screensaver but it is not going to be installed         Recommends: gir1.2-cjsdbus-1.0 but it is not installable         Recommends: cinnamon-bluetooth but it is not going to be installed E: Unable to correct problems, you have held broken packages. ashley@ashley-SVE15113FDW:/etc/apt$

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Is there a way to do this without using another plugin and without modifying WP core code:  I want to give the custom plugin I am writing a settings page.  So I will need to add plugin capabilities to the role that uses my plugin.  However, I do not want those users to see or be able to change settings for any other plugins that might be installed.  Just my plugin.  I was hoping there was something like $role_object->add_cap('update_settings_myPlugin'), similar to the way capabilities can be mapped to roles for custom post types.

I wish to create a custom capability for accessing the interface of my plugin.    Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress manage adding the capability to all administrators of sub blogs and super administrators in multisite installations, or does that function need to be handled by the plugin?


I have a problem with my bathroom. I recently had someone come and switch the door from the kitchen side to the other side while redoing my kitchen. He did a great job and the kitchen looks great. That being said he used new studs to re-frame the wall and those studs are smaller than the 2x4's used 100 years ago on the original bathroom. I do not know how to correct this issue while dry-walling.... Any suggestions would be great! Thank you i have provided a picture.

I need to hang some drywall; my ceiling has a couple spots of uneven-ness. There's a few spots that are about 1/4" out of whack and another spot where joists+hanger are a little less than 1/2" down.  It's a normal sized room and the spots that are either bulging or sunken are all located in the same area. I am wondering if that warrants furring out the ceiling or will the drywall flex enough where there's a half an inch level difference?


According to  in the recently-necromanced "Jon Skeet Facts" thread:     Jon Skeet once fixed a production problem in his pajamas.   That page links to a citation - what used to be a picture of Jon Skeet in his pajamas. This was the page:    However, that page seems to be gone, which is a net loss for SO because it is referenced by other pages. There are over a thousand pages on the internet which reference that link, including the aforementioned "Jon Skeet Facts" page. Which is now gone.  May we please have this page back? Maybe transfer it to meta?  I mean, that thread has been around since the very beginning, and I was basically here in the very beginning, so I feel like a part of my upbringing has died.  How about this: since I have been a long-time SO contributor, may I please have the ability to view questions deleted by arm chair moderators? Or can you set it up so that if the referer is "google" then the page magically un-deletes so that we don't break google's search results? I hate it when google 404s.

Motivated by the deletion of     On one hand, I disagree with these closures, because:  These questions were (and still are) very popular They have some good information in them (or at least the first one does) and it feels like bad sportsmanship to remove good information from the internet, particularly when it was contributed by your fellow users  Number 2 in particular bothers me. A lot. On the other hand, I do agree that:  The community of 10k users should be able to decide which closed questions they wish to delete on their own without me intervening These questions should definitely remain closed, because they either have an absurd # of answers, or are duplicates (though some duplicates ). Which means they are eligible for deletion … forever. These questions wouldn't survive more than 10 minutes if asked today on Stack Overflow, so in some ways they are artifacts from the past, like dinosaurs in an era of mammals.  There is some related discussion in:   While I normally favor code solutions here, I am not sure I like the idea that once a question gets 400 upvotes it should become extremely difficult to delete. It feels like mob rule. Official policy on the blog:


Context: Image Viewer (the default viewer in Xubuntu) does not show images with extension .cr2 (the raw image of Canon version 2). If I try, the program opens but no images are displayed. And NO errors are prompt. Questions:  Is there a way to enable the feature? Maybe some extension of the Image Viewer? If not, are there other alternatives?

Is there any plugin for GIMP to edit RAW photo files? I tried ufraw which is quite popular, but its GUI sucks to the degree of being unusable. Moreover, I want to edit my files in GIMP, using GIMP tools that I am used to, not in ufraw-like plugin. Any ideas? I am not interested in stand-alone applications like Raw Therappe. My goal is to edit RAW files in GIMP the same way as any other image file.


I see here a lot and lot of comments that now some things are one click further away than they used to be. And at the same time I see there will be no rolling back. And I don't really care who is right, but I think I might have an idea for small compromise:  Could you maybe make a top bar auto-expand it's goodies on mouse over? I mean, when someone holds a mouse over inbox icon, why not to show that inbox, without additional click? That way things will suddenly be one click closer, as many users seem to want, without any changes to top bar's look.  Of course they should auto-hide when mouse is taken away, unless they were clicked to open - then they should stay. And auto-expand should be suspended if other piece is click-expanded. And if user clicks hover-opened icon, it should not close, it should count as click-opened now. In other words, click-open should continue to work, and should take precedence over hover. That way clicking would continue to work as it works now, and tablet users will see no difference.  The delay before displaying elements should be as short as conveniently possible. Probably like the one used to . But it should also work OK with no delay at all. That's not the point of this request.

Simple request, when I click on the Inbox, for example, and move my mouse to the right, I'd like the Achievements to open automatically instead of needing a reclick.


Is there any way at all to use the mouse cursor to move the cursor in terminal, like click where you want it and press a key to move it there?  This is one of the most annoying things I've ever found using the terminal  I know Ctrl+A will move to the beginning of the line but sometimes these commands are so long

I work on a terminal most of the time.   Is there an application / plugin over iTerm or any other terminal like application using which I can control the cursor location of my terminal using a mouse ?


Essentially, when is $\dfrac{x^2 +y^2+1}{xy}$ a positive integer?    I've tried many approaches such as considering the above equation as a quadratic in $x$ or $y$ but I haven't had much success. The only solutions I could find were $x=1$, $y=1$ and $z=3$.  A similar problem: I know that the only solutions to $\dfrac{x^2+y^2}{xy}$ to equal a positive integer is for $x$ and $y$ to both be one. This is pretty much considering when a number, not necessarily an integer, and it's inverse sum to make a positive whole number. However, the problem is a slight variation, it asks when a number $\frac{p}{q}$ summed with it's inverse $\frac{q}{p}$ plus $\frac{1}{pq}$ is a whole number.

Let $x$ and $y$ be positive integers such that $xy \mid  x^2+y^2+1$. Show that $$ \frac{x^2+y^2+1}{xy}= 3 \;.$$ I have been solving this for a week and I do not know how to prove the statement. I saw this in a book and I am greatly challenged. Can anyone give me a hint on how to attack the problem? thanks


For example say I have this sentence:     The following sentence uses ________:   You can find the program in [DOWNLOAD_DIRECTORY] where   [DOWNLOAD_DIRECTORY] is your default download directory.   What is is called when I used something like [DOWNLOAD_DIRECTORY]?   What would I put in the blank?  Normally I would say a Macro, but is this correct?

If I have a template (say a generic letter) that is filled in with various pieces of data (say, the name of the addressee), what is a general term for those pieces of data?  For example:  Dear {firstname}, This is just a friendly reminder that the book {booktitle} will be due on {duedate}. Thank you.   What would I refer to {firstname}, {booktitle} and {duedate} as?


Please check the following code snippet from button's onClick event handler.  The if statement does not execute even though its TRUE (because of relational operators == and && maybe)... but works fine when string method( .contains() ) used as shown at the end.  EditText uname = (EditText)findViewById(2); EditText pwd = (EditText)findViewById(3); TextView msg = (TextView)findViewById(4);  String a = uname.getText().toString(); String b = pwd.getText().toString();  if(a==("afnan")&& b==("secret")){      msg.setText("abc");  }else {       msg.setText("xyz " + a + b); // concatenated a and b to see their values and they are same as in IF statement so why does ELSE always get executed but not IF?    }   Replacing relational operators with the following works fine but if statement gets true for "afnanaaaaa" since it does contain "afnan" but not EXACLTY contain "afnan":   if(a.contains("afnan")&& b.contains("secret")){                     msg.setText("Welcome !!!");      }else if (a!= "afnan" && b!= "secret"){                 msg.setText("xyz ");       }   HELP PLEASE !!!!!!!!!!

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


I know that we can copy things from one directory to another using the command:  cp -Ri /path/one/* /path/two/*   Here:  R = recursive i = interactive  My questions:   Does this command copy everything? (Hidden folders & files, system folder & files, etc.) If not, then what is the command? Or are there other softwares available for the job?

I am trying to copy the contents of a folder to another folder in a different directory using terminal.  Would somebody be able to provide me an example of the command line syntax required to achieve this?