Synology NAS's provide a multimedia server backed by a PostgreSQL database. You can connect to that database from an SSH session: sudo su - su - postgres psql mediaserver postgres  Now, I'd love to be able to connect to the database from any computer on my home network, e.g. using pgAdmin, rather than through an SSH terminal. My NAS is not exposed to the Internet and is behind my router's firewall, so I only need to open this to computers on my home network. Can anyone guide me on how to get there? I have no knowledge whatsoever on PostgreSQL, as I'm more experienced with MySQL.
I installed the latest pgAdmin 4 (v2.1) but I found out that (), for the moment, the only way to establish a connection through an SSH tunneling is using another outside process, an  says:  I setup a tunnel as follows: ssh -f dpage(at)hostname(dot)enterprisedb(dot)com -L 5999: hostname.enterprisedb.com:5432 -N  (...) I was running on Mac, but the same procedure should work on Linux. On Windows, there's a tunnelling app in Putty iirc, but I don't know how to use it offhand.  I have found a simple . The connection is established but it seems, when I try to connect through pgAdmin it fails or is refused (using 127.0.0.1:3306 or 127.0.0.1:5432 as the tunnel's destination). Why?
Disable key when program is running How to add appendix in thesis using LyX I want to add an appendix (questionnaire etc.) at the end of my thesis after the references. I use the article class and work with LyX: Document -&gt; Start appendix here. But I am not getting it in the TOC.  \documentclass[12pt,english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \setlength{\parskip}{\smallskipamount} \setlength{\parindent}{0pt} \usepackage{color} \definecolor{document_fontcolor}{rgb}{0, 0, 0} \color{document_fontcolor} \usepackage{babel} \usepackage{float} \usepackage{textcomp} \usepackage{pdfpages} \usepackage{tipa} \usepackage{amsmath} \usepackage{graphicx} \usepackage{setspace} \PassOptionsToPackage{normalem}{ulem} \usepackage{ulem} \usepackage[unicode=true,  bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,  breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]  {hyperref}  \makeatletter  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands. %% Because html converters don't know tabularnewline \providecommand{\tabularnewline}{\\} %% A simple dot to overcome graphicx limitations \newcommand{\lyxdot}{.}   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. \numberwithin{equation}{section}  \@ifundefined{date}{}{\date{}} \@ifundefined{showcaptionsetup}{}{%  \PassOptionsToPackage{caption=false}{subfig}} \usepackage{subfig} \makeatother  \appendix \noindent \begin{center} \textbf{Questionnaire (Case Study 1)} \par\end{center} This is one thing that keeps bugging me, and maybe there's a direct answer. Grammatically, which one is more correct of these two?  Does it make a difference?  I tried not to do that. I tried to not do that. I am trying to find a way with QGIS to get the intersection area of more than 2 layers.  All the tools in QGIS take just the 2 input layers.  For example in the image below, I have 4 layers and I want to retrieve just the black area.   Furthermore, I need to retrieve the count attribute and add it to the intersected area attribute table (in this case 4)    I know there is a tool that does the trick in ArcGIS, but is there a QGIS solution? Here is the problem setup  \begin{equation} \begin{array}{c} \text{min} \hspace{4mm}  \mathbf{b}^{T}_{}\mathbf{A}^{}_{}\mathbf{b}^{}_{} \\ s.t \hspace{5mm} \mathbf{b} \in \mathbb{R}^{N} \\ \hspace{9mm}b_0=1\\ \hspace{62mm}b_i=b_{i-2}b_{i-1} \hspace{5mm} \forall \hspace{5mm} 2&lt;i\leq N-1 \end{array} \end{equation}  where $\mathbf{A}$ is a $N\times N$ positive semi-definite matrix  To handle $b_0=1$ constrain, I know I can introduce Lagrange multiplier in objective function  \begin{equation} \begin{array}{c} \text{min} \hspace{4mm}  \mathbf{b}^{T}_{}\mathbf{A}^{}_{}\mathbf{b}^{}_{} + \lambda(\mathbf{b}^{T}_{}\mathbf{u}^{}_{}-1) \end{array} \end{equation}  where $\mathbf{u}_{}^{}$ is a $N\times 1$ column vector and $u_0=1$ and $u_i=0 \forall 1&lt;i\leq N-1$.  But I dont know how to handle second set of constraints?   EDIT: Example  Let $N=4$. Therefore I am looking for $\mathbf{b}=[b_0 \quad b_1 \quad b_2 \quad b_3]^T = [1 \quad b_1 \quad b_2 \quad b_1b_2]^T$. How do I include $b_3=b_1b_2$ constraint in objective function Is it possible to pagebreak aligned equations? The report I'm writting features a lot of long, multiple lines equations. To reduce visual polution I've been using an aligned environment nested inside equation. This way (unlike just using an align environment) I get only a single label for all the lines.  The problem is that so many long equations often need to be broken into two pages, otherwise I get lots of blank vertical space in the document. However the aligned environment does not allow the \displaybreak command.  Is there an alternative way to achieve a pagebreak inside an aligned equation?  Here's a sample ofthe equations I'm using  \begin{equation}     \begin{aligned}     ...\\     ...\\  %I need to pagebreak here     ...\\ \end{aligned}\end{equation} How can I expand a partition into non adjacent free space using GParted? Calculate the product of distances for a line perpendicular to hyperbola Let us have a hyperbola $\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1$ and assume the normal at P meets the transverse (horizontal) axis $AA'$ in $G$ and the conjugate (vertical) axis $BB'$ in $g$. Assume CF be perpendicular to the normal from the center.   Find $\frac{PF \cdot PG}{CB^2}$ Find $PF \cdot Pg$   How can I solve the question in least amount of steps?  My attempt:  I first formed the equation of the normal and then I found out the points where it cuts the conjugate and transverse axis. After finding these points I used distance formula to find the distance required and convert it in the form that the question asked. But its a long method and took lot of steps datetime.parse and making it work with a specific format Why would spacetime curvature cause gravity? How to import an FBX file into Blender I am trying to import an FBX file from Unity into Blender. Does anybody know how to do that? Category Theory textbook (learning through guided discovery Dummit and Foote) Design a custom Beamer theme from scratch What is a good website to hack around using Selenium? I want to learn Selenium, but I don't know what to code. Sure, I can throw Google some queries, I can fill out some forms, press buttons, find divs and links, etc. But I think this stuff is pretty basic.  What would be more "advanced" ideas to try out? Can you give real-life examples? So I was taught that:  Kinetic Energy (of electron) = Energy (of photon) - Ionization Energy  If E(photon) = IE, then KE=0 of the electron.   What does this physically/theoretically mean?   My current thoughts/interpretation is that enough energy/force is applied to ionize the electron so it is 'sufficiently far' from the atom, and then I guess it just moves with whatever speed it is moving at with natural kinetic laws, since no more energy/force is being applied....?  Any clarifications would be greatly appreciated, thanks in advance. My 1.12 solution can be found . When trying to update command blocks to 1.13, I have the following:  scoreboard objectives add invert dummy   (run at start) then:  scoreboard players set FakePlayer invert 1   (impulse unconditional repeat) chained into:  execute at @e[tag=summoned] run scoreboard players reset FakePlayer invert   (chain unconditional repeat) chained into:  execute if score FakePlayer invert = 1 invert run say "All summoned animals are dead!"   This should reset FakePlayers score continuously until all entities with tag "summoned" are dead, then it should run the final condition. This does not happen, and I can't see why. evaluate the limit as $x$ approaches $0$ of $(\cos x-1)/x$ without l'Hopital's rule I know with l'Hopital's rule it becomes $-\sin(x)$ which has the limit $0$. However, I have been wondering how to evaluate this limit without l'Hopital's rule. Visiting two Schengen countries, coming back home in between, do I apply for single-entry or multiple-entry visa? I am a resident of Turkey and I will go to Austria for 6 days beginning of June and then I will come back to Turkey. After staying 10 days I will go to Italy for 11 days at the end of June. Do I need two single-entry visa, or a multiple-entry visa, and which country do I apply to? (My first destination is Austria but I will stay more in Italy) So basically this proof centers around proving that (S,*) is a group, as it's quite easy to see that it's abelian as both addition and multiplication are commutative. My issue is finding an identity element, other than 0. Because if 0 is the identity element, then this group won't have inverses.  The set explicitly excludes -1, which I found to be its identity element, which makes going about proving that this is a group mighty difficult. How to set a proxy for terminal? I am looking to set a proxy for terminal. What I need is I want to send all terminal communications to the internet through a proxy, say tor.   I tried to set a system wide proxy set up. But Terminal doesn't obey the system wide proxy configuration.  Is there any other way to do this?