How can I run multiple instances of Telegram? I am new to Linux and Ubuntu.  I need to run multiple instances of desktop Telegram. I saw the answers in   I do not understand how can I use the answer.   I extracted tsetup.1.1.23.tar.xz. and then opened the terminal and cd to that directory.   Also I created another administrator user named atk2 with no password.  I tried running telegram as another user like this:  sudo -u user2 ./Telegram   but it does not work. I get  No protocol specified QXcbConnection: Could not connect to display :0 ./Telegram(_ZN14SignalHandlers8internal7HandlerEiP7siginfoPv+0x175)[0xe52725] ./Telegram(_ZN14SignalHandlers8internal12DumpCallbackERKN15google_breakpad18MinidumpDescriptorEPvb+0x2e)[0xe52f7e] ./Telegram(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x3d4)[0x10b83e4] ./Telegram(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP7siginfoPv+0x97)[0x10b86f7] /lib/x86_64-linux-gnu/libpthread.so.0(+0x13150)[0x7f6673f36150] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f667360d0bb] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16d)[0x7f667360ef5d] ./Telegram[0x1d6007e] ./Telegram(_ZN14QXcbConnectionC2EP19QXcbNativeInterfacebjPKc+0x97c)[0x1495bfc] ./Telegram(_ZN15QXcbIntegrationC1ERK11QStringListRiPPc+0x31e)[0x146971e] ./Telegram[0x14683bd] ./Telegram[0x1c3cb5d] ./Telegram[0x19810e5] ./Telegram[0x1981eb5] ./Telegram[0x1f1b63c] ./Telegram[0x198358c] ./Telegram[0x1657ad9] ./Telegram(_ZN11ApplicationC2ERiPPc+0x1e)[0xe5f13e] ./Telegram(main+0x8a)[0x8c94ea] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f66735f71c1] ./Telegram[0x8e6b1d] Aborted   I also tried  mkdir ~/.telegram2ndprofile Telegram -many -workdir ~/.telegram2ndprofile   but I get this error in using telegram command.   # telegram -many -workdir ~/.telegram2ndprofile usage: telegram [-ynsr] user [ttyname] [message...]   What should I do to run multiple telegram instances?
How can I use multiple accounts with Telegram? Is there a way to have two copies of  app in Ubuntu each with a different account?  It seems copying the app in another folder does not work.
Phrase for a situation where a problem disappears when you are about to fix it, but reappears later For example, the car mechanic can't replicate the problem you are having every day, but when you drive it off the service dept, there it is again. Or, when seeing the dentist, the tooth ache goes away, and comes back when you leave. What would be the value of $\sum\limits_{n=0}^\infty \frac{1}{an^2+bn+c}$ I would like to evaluate the sum  $$\sum_{n=0}^\infty \frac{1}{an^2+bn+c}$$  Here is my attempt:    Letting    $$f(z)=\frac{1}{az^2+bz+c}$$  The poles of $f(z)$ are located at   $$z_0 = \frac{-b+\sqrt{b^2-4ac}}{2a}$$  and  $$z_1 = \frac{-b-\sqrt{b^2-4ac}}{2a}$$  Then  $$ b_0=\operatorname*{Res}_{z=z_0}\,\pi \cot (\pi z)f(z)= \lim_{z \to z_0} \frac{(z-z_0)\pi\cot (\pi z)}{az^2+bz+c}= \lim_{z \to z_0} \frac{\pi\cot (\pi z)+(z_0-z)\pi^2\csc^2 (\pi z)}{2az+b} $$  Using L'Hopital's rule. Continuing, we have the limit is  $$ \lim_{z \to z_0} \frac{\pi\cot (\pi z)+(z_0-z)\pi^2\csc^2 (\pi z)}{2az+b}= \frac{\pi\cot (\pi z_0)}{2az_0+b} $$  For $z_0 \ne 0$  Similarly, we find  $$b_1=\operatorname*{Res}_{z=z_1}\,\pi \cot (\pi z)f(z)=\frac{\pi\cot (\pi z_1)}{2az_1+b}$$  Then   $$\sum_{n=-\infty}^\infty \frac{1}{an^2+bn+c} = -(b_0+b_1)=\\ -\pi\left( \frac{\cot (\pi z_0)}{2az_0+b} + \frac{\cot (\pi z_1)}{2az_1+b}\right)=  -\pi\left( \frac{\cot (\pi z_0)}{\sqrt{b^2-4ac}} + \frac{\cot (\pi z_1)}{-\sqrt{b^2-4ac}}\right)= \frac{-\pi(\cot (\pi z_0)-\cot (\pi z_1))}{\sqrt{b^2-4ac}}= \frac{\pi(\cot (\pi z_1)-\cot (\pi z_0))}{\sqrt{b^2-4ac}} $$  Then we have  $$\sum_{n=0}^\infty \frac{1}{an^2+bn+c} = \frac{\pi(\cot (\pi z_1)-\cot (\pi z_0))}{2\sqrt{b^2-4ac}}$$    Is this correct?  I feel like I made a mistake somewhere.  Could someone correct me?  Is there an easier way to evaluate this sum? Where did newtonian size setting go in 2.79a Check for column name in a SqlDataReader object How do I check to see if a column exists in a SqlDataReader object?  In my data access layer, I have create a method that builds the same object for multiple stored procedures calls.  One of the stored procedures has an additional column that is not used by the other stored procedures.  I want to modified the method to accommodate for every scenario.  My application is written in C#. How to get a tool that can only break specific blocks and has a name? So, right now I'm using this:  /give @p minecraft:diamond_pickaxe 1 0 {CanDestroy:[minecraft:stone]}   But I need one that also has the Name value. Anyone know this one? Theorem. Let $X$ and $Y$ be sets with $X$ nonempty. Then (P) there exists an injection $f:X\rightarrow Y$ if and only if (Q) there exists a surjection $g:Y\rightarrow X$.  For the P $\implies$ Q part, I know you can get a surjection $Y\to X$ by mapping $y$ to $x$ if $y=f(x)$ for some $x\in X$ and mapping $y$ to some arbitrary $\alpha\in X$ if $y\in Y\setminus f(X)$. But I don't know about the Q $\implies$ P part.  Could someone give an elementary proof of the theorem? Short version: In what circumstances is dd safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write?  Long version — preamble: dd is often used to copy data, especially from or to a device (). It's sometimes attributed mystical properties of being able to access devices at a lower level than other tools (when in fact it's the device file that's doing the magic) — yet dd if=/dev/sda is the same thing as cat /dev/sda. dd is sometimes thought to be faster, but . Nonetheless, .  Problem: dd if=foo of=bar is not, in fact, the same as cat &lt;foo &gt;bar. On most unices¹, dd makes a single call to . (I find  fuzzy on what constitutes “reading an input block” in dd.) If read() returns a partial result (which, according to POSIX and other reference documents, it's allowed to unless the implementation documentation says otherwise), a partial block is copied. Exactly the same issue exists for write().  Observations: In practice, I've found that dd can cope with block devices and regular files, but that may just be that I haven't exercised it much. When it comes to pipes, it's not difficult to put dd at fault; for example try :  yes | dd of=out bs=1024k count=10   and check the size of the out file (it's likely to be well under 10MB).  Question: In what circumstances is dd safe to use for copying data? In other words, what conditions on the block sizes, on the implementation, on the file types, etc, can ensure that dd will copy all the data?  ( has a fullblock flag to tell it to call read() or write() in a loop so as to transfer a full block. So dd iflag=fullblock is always safe. My question is about the case when these flags (which don't exist on other implementations) are not used.)  ¹  I've checked on OpenBSD, GNU coreutils and BusyBox. Mutable vs immutable objects I'm trying to get my head around mutable vs immutable objects. Using mutable objects gets a lot of bad press (e.g. returning an array of strings from a method) but I'm having trouble understanding what the negative impacts are of this. What are the best practices around using mutable objects? Should you avoid them whenever possible? I'm used to doing all my coding in one C file. However, I'm working on a project large enough that it becomes impractical to do so. I've been #including them together but I've run into cases where I'm #including some files multiple times, etc. I've heard of .h files, but I'm not sure what their function is (or why having 2 files is better than 1).  What strategies should I use for organizing my code? Is it possible to separate "public" functions from "private" ones for a particular file?   question precipitated my inquiry. The tea.h file makes no reference to the tea.c file. Does the compiler "know" that every .h file has a corresponding .c file? I'm downloading Sentinel-2 tiles from  but they dont seem to be 100 % aligned. Right image is band 08 Sentinel-2 added to ArcGis Desktop (i have done nothing more than adding the 08.jp2 to the map), left esri basemap photo. The offset in Sentinel is about 35-40 meters. How do i correct them?    . Level-1C, Sentinel-2:   SOLUTION:  From HDunn's answer i did this:  Using a road vector layer i added five point pairs and calculated difference in x and y coordinates. The mean differences i used as xvalue and y value in Shift tool. Result: Can't run a shell script So I have this script:  #!/bin/bash # Flips the screen (hopefully)  syntax_error=0 orientation=0  current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" case $current_orientation in         normal)                 current_orientation=0         ;;         left)                 current_orientation=1         ;;         inverted)                 current_orientation=2         ;;         right)                 current_orientation=3         ;; esac  if [ $current_orientation -eq 0 ]; then         orientation=2 fi  if [ $current_orientation -eq 2 ]; then         orientation=0 fi method=evdev  # LENOVO S10-3t CHANGE ==&gt; Hard Coded my device number to 11!!!!!!!!  device=11  swap=0 invert_x=0 invert_y=0 real_topx=0 real_topy=0 real_bottomx=4020 real_bottomy=4020  case $orientation in         0)                 swap=0                 invert_x=0                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         1)                 swap=1                 invert_x=1                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;;         2 )                 swap=0                 invert_x=1                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         3 )                 swap=1                 invert_x=0                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;; esac  if [ $method = "evdev" ]; then         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axis Inversion" $invert_x $invert_y         xinput set-prop "$device" "Evdev Axis Calibration" $topx $bottomx $topy $bottomy         if [ $orientation = 2 ]; then                            xrandr -o inverted         fi         if [ $orientation = 0 ]; then                 xrandr -o normal         fi fi  #   It's for flipping screen in my Lenovo S10-3t. I copied it from the netbook's wiki page, and added the #!/bin/bash at the top. The filename is flipscreen.sh. How can I make it work? Confused about the possibility of different differentiable structures. In Loring Tu's "An Introduction to Manifolds" an atlas on a manifold is a collection of coordinate charts that are pairwise compatible and cover the manifold. A smooth manifold is defined to be a topological manifold together with a maximal atlas or differentiable structure. The maximal atlas is constructed by taking an atlas and appending all coordinate charts that are compatible with the atlas and using this he shows that any atlas on a locally Euclidean space is contained in a unique maximal atlas.  He also later shows that for any chart on a manifold, the coordinate map is a diffeomorphism onto it's image.   My question arises when Tu mentions in an aside that every compact topological manifold in dimension four or higher has a finite number of differentiable structures. What I don't understand is how it is possible for a smooth manifold to have more than one differentiable structure. Doesn't the fact that for any chart the coordinate map being a diffeomorphism coupled with the fact that composition of smooth functions is smooth mean that any two coordinate charts on a manifold are compatible and thus they must all belong to one maximal atlas? How is it possible to have another? Am I not understanding the word "maximal" or atlas or some other concept? Add new user and add meta at once Expanding code in etoolbox's \ifblank I am trying to use the etoolbox \ifblank (and its cousin \notblank), but I want to expand any macros in its test statement.  For example:  \documentclass{article} \usepackage{etoolbox}  \begin{document}  \newtoggle{longformt} \newcommand{\longform}{\toggletrue{longformt}} \newcommand{\iflong}[2]{\iftoggle{longformt}{#1}{#2}}  \newcommand{\quoteifnotblank}[1]{%     \notblank{#1}{``#1''}{}% }  % Try commenting this line. \longform  This should be completely blank if the form is short: \quoteifnotblank{\iflong{Some long quoted text}{}}  \end{document}   The problem here is that \notblank sees its argument of \iflong{Some long quoted text}{} as a string, not as code to be expanded, so the quotes always appear.  How do I expand arguments before they are passed to \notblank? What special characters must be escaped in regular expressions? I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps? Create an instance of a class from a string Is there a way to create an instance of a class based on the fact I know the name of the class at runtime. Basically I would have the name of the class in a string. How to check if a string "StartsWith" another string? I'll preface this by saying I'm very new to Blender - I'm trying to put a bevel on an edge, looks something like this:    As you can see, the vertical side is much longer than the horizontal side.  When I apply to bevel to the edge there, the bevel stretches proportionally - so there's 'more' bevel on the longer side.  I want to bevel without any 'ratio' like that - just a 45-degree bevel, if that makes any sense.  Do I have to put in a loop cut to make the side lengths equal?  I tried using a sub-surf modifier, but it applies on a bunch of nearby edges, when I just want to round this one corner. (How) Can I use existing stapled electrical wire to fish new wire? I nicked an electrical cable while doing a plumbing repair and so need to fix it. I previously  about repairing the damage in place, but there are receptacles 6-10 feet away on either side of the damaged wire, so it may not be too difficult to just pull new wire. Most of the wire is run horizontally through the studs, which is great, but it will at least be stapled at both boxes (and possibly more). The horizontal run is ~18" up from the floor, while the receptacles are ~6". There is also an inside corner the wire is run through. Wire is 12/2.  Is it possible to use the existing wire to fish the new wire, even though the existing wire is stapled? Would I need to open up the wall to remove the staples?  I found a , but that pertains to telephone wires which sometimes use different staples than electrical wires. Why there is a delay between when a key is pressed and when it is accepted? This is one of the wackiest and weirdest problems I have ever encountered. My keyboard was working absolutely fine untill yesterday on Ubuntu 13.04. However, when I boot to Ubuntu today, I suddenly find that all the keys work, but I have to press and keep on holding them for about a second for them to work.   This behavior is true for all the keys except for Num Lock, Caps Lock and Scroll Lock keys, the indicator for them on my keyboard lights up as soon as I press those keys. The keyboard works fine at the login screen where I put my password.  The keyboard also works normally if I use the Guest session instead of my normal user account. I have not done any key-remappings and using the standard English (US) keyboard layout.  I have fiddled around with the settings for Keyboard in System Settings, but to no avail. I have Windows 7 as dual-boot and the keyboard works perfectly well on it.   Why am I facing such a behavior and how to normalize this?  PS: Using Logitech Classic Keyboard K100 (USB Model).