I am trying to write an application that communicates with a server via Sockets on windows. I need a reliable way of telling if the connection is interrupted, for example by internet connectivity issues etc. I do not mean the return of connect(), but while the socket has already been esablished.So far the only one that was supposed to work was to send a message to the server with      int issocketclosed = send(socketFd," \b",3,0);   My integer however does not change when the connection gets killed. On the server side i am using "netcat -k -lv PORT" to listen for the connection and to simulate interruption i am CTRL-C -ing netcat .  My Socket code looks something like this:  WSADATA wsa; WSAStartup(MAKEWORD(2,2),&wsa); HANDLE s = socket(AF_INET,SOCK_STREAM,0); struct sockaddr_in connect_info; connect_info.sin_family = AF_INET; connect_info.sin_port = htons( port ); connect_info.sin_addr.s_addr = inet_addr(ipaddr); connect(s,(struct sockaddr*)&connect_info,sizeof(connect_info)); while(1){    Sleep(5000); //Do Stuff with socket    int issocketclosed = send(socketFd," \b",3,0); //Check for connectin error   if(issocketclosed == -1){     connect(s,(struct sockaddr*)&connect_info,sizeof(connect_info)); // Reconnect   } }   I know this is not the first time this question has been asked but i have tried the other ones such as getsocketopt() without success. Any help is appreciated!

As a follow up to a , I wonder why it is impossible in Java, without attempting reading/writing on a TCP socket, to detect that the socket has been gracefully closed by the peer? This seems to be the case regardless of whether one uses the pre-NIO Socket or the NIO SocketChannel.  When a peer gracefully closes a TCP connection, the TCP stacks on both sides of the connection know about the fact. The server-side (the one that initiates the shutdown) ends up in state FIN_WAIT2, whereas the client-side (the one that does not explicitly respond to the shutdown) ends up in state CLOSE_WAIT. Why isn't there a method in Socket or SocketChannel that can query the TCP stack to see whether the underlying TCP connection has been terminated? Is it that the TCP stack doesn't provide such status information? Or is it a design decision to avoid a costly call into the kernel?  With the help of the users who have already posted some answers to this question, I think I see where the issue might be coming from. The side that doesn't explicitly close the connection ends up in TCP state CLOSE_WAIT meaning that the connection is in the process of shutting down and waits for the side to issue its own CLOSE operation. I suppose it's fair enough that isConnected returns true and isClosed returns false, but why isn't there something like isClosing?  Below are the test classes that use pre-NIO sockets. But identical results are obtained using NIO.  import java.net.ServerSocket; import java.net.Socket;  public class MyServer {   public static void main(String[] args) throws Exception {     final ServerSocket ss = new ServerSocket(12345);     final Socket cs = ss.accept();     System.out.println("Accepted connection");     Thread.sleep(5000);     cs.close();     System.out.println("Closed connection");     ss.close();     Thread.sleep(100000);   } }   import java.net.Socket;  public class MyClient {   public static void main(String[] args) throws Exception {     final Socket s = new Socket("localhost", 12345);     for (int i = 0; i < 10; i++) {       System.out.println("connected: " + s.isConnected() +          ", closed: " + s.isClosed());       Thread.sleep(1000);     }     Thread.sleep(100000);   } }   When the test client connects to the test server the output remains unchanged even after the server initiates the shutdown of the connection:  connected: true, closed: false connected: true, closed: false ...


in my old version of ASP.NET MVC 5 I have a custom filter that manage HTTPs connections. My filter forces a secured (HTTPS) request to be resent over HTTP  This is my filter:  /// <summary>     /// Forces a secured (HTTPS) request to be resent over HTTP     /// </summary>     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]     public class RequireHttpAttribute : FilterAttribute, IAuthorizationFilter     {         public virtual void OnAuthorization(AuthorizationContext filterContext)         {             if (filterContext == null)             {                 throw new ArgumentNullException("filterContext");             }              if (filterContext.HttpContext.Request.IsLocal)             {                 return;             }              if (string.Equals(filterContext.HttpContext.Request.Headers["X-Forwarded-Proto"],                 "https",                 StringComparison.InvariantCultureIgnoreCase))             {                 HandleHttpsRequest(filterContext);             }              return;          }          protected virtual void HandleHttpsRequest(AuthorizationContext filterContext)         {             if (!string.Equals(filterContext.HttpContext.Request.HttpMethod, "GET", StringComparison.OrdinalIgnoreCase))             {                 // Only redirect GET requests                 return;             }              string url = "http://" + filterContext.HttpContext.Request.Url.Host + filterContext.HttpContext.Request.RawUrl;             filterContext.Result = new RedirectResult(url);         }     }   How can I do that in ASP.NET 5?  Thanks.

I want to use HTTPS in my ASP.NET web application, but only for the Login.aspx page.   How can this be accomplished?


I have created a new account on my PS4 but I want my main account Playstation plus to share with the new one, can someone tell me how I looked at a similar question but didn't tell me how.

I just purchased a new ps4 and found out that PlayStation Plus is required for online gameplay. My ps4 is shared with someone else at home so I want to ask if one PlayStation Plus subscription can be shared between multiple psn accounts on the same machine?


So, I have Ubuntu Studio ver. 19.10. I'm trying to install Wine so I can run Windows VSTs (Toneforge, Odin II Guitar, Mjolnir Drums). However, whenever I type  sudo apt install --install-recommends wine-stable   I get the error  E: Malformed entry 58 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read E: Malformed entry 58 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read   I also have the source, but I can't figure out how to build it. Can anyone help?

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


A minute or so ago Shog  a post, and his considerable bronze badge count shoved through the side of the gray bar:  Same , where Jon's hefty reputation sum exacerbated the problem:

The user card in the revision list, for example , shows the exact amount of reputation:  This is not consistent with how the flair works on (all?) other places in the site, e.g. under a post. There, the amount is displayed in units of thousands (k):  (or, in , millions (m).) It used to be consistent, see e.g. :


Dears, I have written below inner join query to get the data from my database tables. But output of this data is coming up with almost 3k lines. Output is below. I need data in only unique recent "TimeSampled" rows    select DISTINCT DisplayName, ObjectName, CounterName, InstanceName, SampleValue, max(TimeSampled) as TimeSampled from PerformanceDataAllView pdv with (NOLOCK) inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId where ObjectName = 'Processor' AND TimeSampled >= DATEADD(MINUTE,-5,GETDATE()) AND DisplayName Like '%' group by  [PATH], [DisplayName], [ObjectName], [CounterName], [InstanceName], [SampleValue]   How I can retrieve results with only last Time Sampled rows with respect to DisplayName. I have almost 5k servers (DisplayName) like this to retrieve the data.  Request to need to a help to achieve this.

I have written below inner join query to get the data from my database tables. But  output of this data is coming up with almost 140+ lines. Output is below. I need data in only one row with the most recent value by "TimeSampled"    select DisplayName, ObjectName, CounterName, InstanceName, SampleValue, max(TimeSampled) as TimeSampled from PerformanceDataAllView pdv with (NOLOCK) inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId where ObjectName = 'Processor'  AND TimeSampled >= DATEADD(MINUTE,-5,GETDATE()) AND DisplayName Like 'BLRW1ETST01.jcp.com' AND CounterName = '% Processor Time' GROUP BY DisplayName, ObjectName, CounterName, InstanceName, SampleValue ORDER BY  TimeSampled desc   How I can retrive results with only last Time Sampled row with respect to DisplayName. I have multiple servers (DisplayName) like this to retrieve the data.  Thanks, Ramu Chittiprolu


I insert a figure in to my document using code like below, right after 2 tables in a page.  \begin{figure}[htbp] \centering \includegraphics[with=350mm, bb=0 0 1350 743]{path/to/figure.png} \caption{Caption for it} \label{label for it} \end{figure}   This surely inserts the figure into the document in a new page, but is placed at the bottom of the page, and I am trying to put it on the top or at least the center of the page, since it would be the last page of a chapter. But the [htbp] settings are not working at all. What should I do to deal with this figure?  Update: I made a minimal working example and paste it here. I am not using the package of float actually because it is not working for me, but I put it in this example.  \documentclass[a4paper,12pt]{report}  \usepackage{graphicx} \usepackage{float} \usepackage{amsmath,amssymb} \usepackage{bm} \usepackage{layout} \begin{document} \tableofcontents \newpage \chapter{EXPERIMENTS} In this chapter the results for the tests and experiments are presented.  ...for words before this figure.  \begin{figure}[H] \centering \includegraphics[bb=0 0 1166 693, width=30cm]{figs/result3.png} \caption{Result for Matrix Multiplications: Time for Multiplication and Data Transfer} \label{result3} \end{figure}  \end{document}   And the figure result3.png is 1166 by 693 with 19.4KB.  Is there anyone can tell me why this figure keeps staying at the bottom of the page please?

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


For some products (product_description) in my job website, I have set romanian chars. Collation of MySQL tables are utf8_general_ci and it displays perfectly on the frontend of the site.  Problem starts when I try to save them. I tried from both MYSQL-Front, an app that connects to the database and with which you can work on the tables, and also with phpMyAdmin, but no chance.  I tried exporting with UTF-8 and few ISO encodings but still I get funny chars.  How can I go about this and save my eastern europe chars right (so when say I get in trouble and need to import my .CSVs or .SQLs, the chars are saved back the right way.  thanks,

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I set up the ubuntu 20.10 system perfectly for myself and installed some software. And can I keep the system I’m using right now to reinstall or give it to someone else? is it possible. can I reinstall Ubuntu 20.10 with all settings, apps and themes?

I have to format my entire disk and reinstall Ubuntu.  I have installed a lot of software on my current system. And I will have to reinstall all those updates, drivers and applications too.  Is there any way I can make an .iso image of my installed Ubuntu along with all the software, preferences, drivers etc in it ?  Is there any way I can back up my whole OS along with all its software, drives, updates and all ?


For example, if I type "this" into LyX file, the output PDF will show “this”, the quotes change to a set of curly quotes. But I want it looks like "this".  Especially in LyX, there are six quotes styles:        “this”   ”this”   „this“   „this”   «this»   »this«      But none of them is the normal type, "this".  Moreover, if I paste the quotes, “”, into another TeX file, the output characters may become garbled code, e.g., âĂĲâĂİ.  It really puzzled me.  How can I obtain the quotes as " when input "?  Thanks very much!  P.S.  Add a statement by @JimOldfieldJi about the difference between this question and  :     Reason why not a duplicate: LyX escapes characters / turns them into   commands automatically e.g. typing – will output \textendash{} in the   LaTeX. So this question is not about which command to use, but just   how to enter a literal plain old quote character into LyX.

How do I get straight quotation marks, i.e., " and ' in TeX?  (No, \verb changes the font and this is unacceptable.)  [Edit]  I forgot to mention that I’m using XeLaTeX, and fontspec is a necessity.  The first two proposed answers did work, without fontspec.


If $p-1 | k \Rightarrow k = (p-1) n$, for some $n \in \mathbb{N}$. Then we $ 1^{(p-1)^n} + 2 ^{(p-1)^n} + \cdots + (p-1)^{(p-1)^n} = \underbrace{1 + 1 + \cdots + 1}_{p-1}  = p-1 \equiv -1 \mod p.$ The second part of the question did not come out. Induction: $k=1$, which is true because we $1 + 2 + \cdots + (p-1)= \frac{(p-1)(p)}{2} \equiv 0 \mod p$. Suppose true for $k = n$, then $1^n + 2^n + \cdots + (p-1)^n \equiv 0 \mod p$. How to finish? Thank you.

Calculate for every positive integer $n$ and for every prime $p$ the expression  $$1^n +2^n + \cdots +(p-1)^n \mod p$$    I need your help for this. I don't know what to do, but I'll show you what I know.   Wilson's theorem The identity $X^p-X = \prod_{a \in \mathbb{F}_p-1}(X-a)$ $\exists a \in \mathbb{Z}, \ a^2 \equiv -1 \mod p \qquad \iff \qquad p \equiv 1 \mod 4$   Now can you please provide me a hint?


I have a file containing IP address of 10 servers. e.g host.txt  I want to tar a directory and on 10 differents server from 1 server.   How can I run ssh parallel to those server which can reduce my exceution time  I have tried below code, but no luck.  cat host.txt |  while read i  do      ssh -qn $i 'tar -cvf /tmp/TC.tar.gz /etc' &  done   Expectation:  Want to parallel SSH the 10server, so that the tar command will execute parallelly on server without using PSSH.

There is a list of IP addresses in a .txt file, ex.:  1.1.1.1 2.2.2.2 3.3.3.3   Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is in the known_hosts list (on my PC, Ubuntu 10.04 LTS/bash).  How can I run commands on these servers, and collect the output?  Ideally, I'd like to run the commands in parallel on all the servers.  I'll be using public key authentication on all the servers.  Here are some potential pitfalls:   The ssh prompts me to put the given servers ssh key to my known_hosts file. The given commands might return a nonzero exit code, indicating that the output is potentially invalid. I need to recognize that. A connection might fail to be established to a given server, for example because of a network error. There should be a timeout, in case the command runs for longer than expected or the server goes down while running the command.   The servers are AIX/ksh (but I think that doesn't really matter.


In one of my papers I reference an ISO standard using the , e.g.:  @STANDARD{GML2007,   title = {ISO 19136 (GML 3.2.1)},   organization = {International Organization for Standardization, Geneva, Switzerland},   year = {2007},   timestamp = {2016.02.17} }   However, biblatex complains about this entry:  Package biblatex Warning: No driver for entry type 'standard'.   How can I load a standard entry in biblatex?

I want to cite an ISO standard using BibLaTeX. All guidelines I found for BibTeX suggested using misc and replacing the author and editor fields by a number field which was then the full string denoting the ISO standard ("ISO 9241-210:2010" say). BibLaTeX won't display the number though. I found this  where it was suggested to copy the misc BibliographyDriver to a new standard type (as suggested by the section "2.1.3 Unsupported Types" of the ) and replace  \usebibmacro{author/editor+others/translator+others}    by  \usebibmacro{series+number}   The result is a complete adapted copy of the standard.bbx file, renamed to din.bbx though. Is this the only/best solution? Can't I just change what I need and insert it somehow?    This link is not TeX-related but might be useful:


I'm to solve an exercise which supposes that $ f: U \rightarrow \mathbb{C}$ is holomorphic on an open subset U $\subset \mathbb{C}$ and that $f'(a) \neq 0$ for some $a \in U$.  I'm asked to show that $f$ is injective on some disk around $a$, and then having done so that it's inverse $g$ on such a disk is given by  $$ g(w) = \frac{1}{2 \pi i}\int_{\gamma} \frac{zf'(z)}{f(z) -w}dz$$  where $\gamma (t) = a + re^{it}$, $t\in [0, 2\pi]$ is the path around the boundary of that disk.  I've managed to show that it's injective in the disk, but I have no idea how to show the inverse is of that form.  The section of the textbook I'm using this is in has covered the argument principle, Rouche's theorem, the open mapping theorem, and the inverse function theorem, but I can't see any obvious way to apply any of them to show $f$ is injective on some disk.  I thought of using the inverse function theorem now that I've established $f$ is injective, but this just tells me that $g'(w) = \frac{1}{f'(g(w))}$, and I can't see how to make that of the desired form.   I'd really appreciate any help you could offer, thanks in advance.

I am asked to prove this theorem:  If $f:U \rightarrow C$ is holomorphic in $U$ and invertible, $P\in U$ and if $D(P,r)$ is a sufficently small disc about P, then   $$f^{-1}(w) = \frac{1}{2\pi i} \oint_{\partial D(P,r)}{\frac{sf'(s)}{f(s)-w}}ds$$     The book says to "imitate the proof of the argument principle" but I am not seeing the connection.


I am running fish (Friendly Interactive Shell) as my standard shell in Ubuntu 14.04, rather than bash.  I noticed the following behaviour and don't know, if any of these are the preferred one to gain root access.  I can type the command sudo su or sudo fish and it will both give me super user rights. (The prompt is displayed as root@ubuntu ~#) Is there any difference in the behaviour of these commands?  The only thing I could understand is, that sudo su uses the fish configuration located in /root/.config/fish/ and sudo fish uses the fish configuration in my home directory /home/uloco/.config/fish.  Is there a possibility to crypt my system by using sudo fish? Will there be any owner changes made to files in my home directory if I use this?

I already read it from manual but I can't see difference..  su - change user ID or become superuser  sudo -s [command]   The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5).  If a                    command is specified, it is passed to the shell for execution.  Otherwise, an interactive shell is executed.  sudo -i disappear description in manual


public List<Video> filtra_data(string date)             {                 List<Video> lista_filtrata = new List<Video>();                 for (int i = 0; i < listavideo.Count; i++)                 {                     if (listavideo[i].Data.Contains(date) == true)                         lista_filtrata.Add(listavideo[i]);                 }                 return lista_filtrata;             }   i made this method to filter a list of movies using the date as parameter but when, on the form, i put the input in the textbox and i press the button it raises an exception on the for: object reference not set to an instance of an object, any ideas? thank you everyone

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?


the process accountsd is using more than 300 % of my CPU. The error messages in the console that appear are:  AMSAccountStoreCache: [AF547297] An ACAccountStore has no associated media type. Returning the default media type for the current process. accountStore = AMSAccountStoreCache | defaultMediaType = com.apple.AppleMediaServices.accountmediatype.itunes "Cannot check access to a private account type: com.apple.account.AppleAccount"  What I already tried from other questions:  Remove Mail accounts Remove calendar accounts Stop Spotlight from indexing your HDD Kill AppleSpell and delete Spelling folder  Still the same error. Any ideas? Thanks!

Why are the accountsd and securityd processes using so much CPU on OS X 10.10.3? I am on a Early 2011 Macbook Pro.  What are these processes for? Is it safe to kill them? The machine has only been up 4 hours so has been rebooted recently.


We are a same sex married couple, my husband has a Singaporean passport and I have an EU/UK passport... Can he join me in the EU line at immigration when we visit in September ? The last time we visited the UK it took 4 hours for him to go through and we do not want the same thing to happen again

I'll be arriving at Heathrow in June 2015 with my current girlfriend for a holiday in the UK. I've been trying to find out which immigration queue to join at Heathrow Passport Control without much luck. I have a British passport, my girlfriend has a non-EU passport.     Should I join the EU queue and she the non-EU queue or should we both queue together (and if so, which of the queues should we join)?


MWE:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node (x) {X}; \node[above right=1mm and 2mm of x] (y) {Y};  \draw[double,double distance=2mm] (x) -- (y); \end{tikzpicture} \end{document}     How to remove the thin lines?

Building on the answer  by wrtlprnft, I have the following code     \documentclass[tikz,margin=1cm]{standalone}    \usetikzlibrary{decorations.markings}    \begin{document}    \begin{tikzpicture}         \tikzstyle{arrowed double line}=[             dashed, double distance between line centers=3pt,             postaction=decorate,             decoration={                 markings,                 mark=between positions 10pt and -10pt step 20pt with {                     \arrow[thin,yshift= 1.5pt,xshift=.8pt]{>}                     \arrow[thin,yshift=-1.5pt,xshift=.8pt]{<}                 },             },         ]         \draw[arrowed double line] (0,0) --  (1,2);     \end{tikzpicture} \end{document}   which produces this:    I am unhappy with the faint transverse lines between the dashes. I don't even know why tikz decides to draw them.  Is there a way to get rid of them?  Thanks in advance to all replies.  PS the same thing occurs at the caps of double solid lines


A user uses a VPN for tons of reasons, Privacy, Evading blockades, or using apps/programs that are blocked on a network, a great example would be a school network!  IRC's default port is blocked, solution? a VPN!  I've obtained a VPN with the name of , that provides 500mb free traffic, each month.  IRC doesn't use that much, but then again, I need my browser, Skype, and other applications to have internet too, 500mb wouldn't be quite enough, not enough to last a day!  When activating the VPN, ALL traffic is routed trough the VPN, with no option to disable certain programs.  That's where the question comes in, How do I make sure, that only my IRC client uses the VPN (a windows network card), but NO OTHER program can?  SideNote: I use a Windows 8.1 Laptop, with both Wired and Wireless internet options, which means there is a "Network Bridge" build into, to prevent cockups when using both connections at the same time.

I have access to a VPN and want to use it only for some applications, not all.  For example: If I connect to a VPN I want only the applications Opera and Newsbin to use that VPN connection. All other applications, like f.e. Outlook, should use the normal internet connection (while the VPN is connected/open).  Afaik this isn't possible, but I'm not totally sure. So therefore my question: is it doable?


I am under the impression that to review frrom mobile one can only go to the full site theme and review from it. Am I right? If so, is there any reason why there is no way of doing this from the app or mobile site? And if I'm wrong and there is such a way, which is it?

I'm using the official Stack Exchange mobile app for iOS or Android, and  My app crashed! It doesn't look good on my new smartphone. It won't run after I updated my device. I noticed another bug. I have an idea for a new feature which is currently not in the app.  How do I report bugs with or request features for the iOS and Android apps? Also:  I've used the built-in functionality of the app to report a bug or submit a feature request. Did I do the right thing? The app prompted me to post on Meta after an error occurred. Should I post about it here? I'm wondering why the latest version is from 2017. I've heard rumors that the apps are no longer supported; is that true? I can't find the app on my device's app store anymore! Where did it go?     We get a lot of bug reports from users about the mobile apps, which are unsupported, and at the moment, there is no centralized Q&A pair for those to be closed as duplicates of (the relevant answers are spread across multiple unrelated questions). This question is an FAQ proposal, to serve as a directly-related duplicate target for those questions.


Someone in my profession is referring to themselves as Dr. so and so (ABD). It is my understanding that they are not a Dr. since they have not completed the dissertation process. Doesn't it seem fraudulent to refer to yourself as Dr. without completing a doctoral program?

Can one call oneself a PhD ABD (All But Dissertation) after completing all of the course work and working on the dissertation?


I keep reading everywhere that a time series is non-stationary (e.g.  or ) if there's a unit-root. But isn't a larger-than-one root also means the series is non-stationary? Why don't people say that roots larger than unit imply non-stationarity instead?   is a much more general question and indeed the top answer has one sentence in the long essay addresses this question. For those who's only interested in the answer to my question and did not want to read the whole thing (which is epic by the way): "Economists are perhaps the greatest analysts of time series and employers of the AR process technology. Their series of data typically do not accelerate out of sight. They are concerned, therefore, only whether there is a characteristic direction whose value may be as large as 1 in size: a "unit root."

How would you explain intuitively what is a unit root, in the context of the unit root test?   I'm thinking in ways of explaining much like I've founded in .  The case with unit root is that I know (little, by the way) that the unit root test is used to test for stationarity in a time series, but it's just it.   How would you go to explain it to the layperson, or to a person who has studied a very basic probability and statistics course?  UPDATE  I accepted whuber's answer as it is what most reflect what I asked here. But I urge everybody that came here to read Patrick's and Michael's answers also, as they are the natural "next step" in understanding the Unit Root. They use mathematics, but in a very intuitive way.


Right now I have a Nikon D3100, a Sigma 50mm f1.4 (older version). Right now I have almost 1300$. What do you think I should buy? I'm hesitating between the Nikon D7100 or buying a Sigma 35mm f1.4 Art+ a flash and some other accessories. (I'm really into portrait photography)

I am primarily an amateur photographer but I do take small jobs from time to time.  I'm looking to upgrade my equipment but I'm not sure if I should be spending money on my body, glass, or both.  I have two common issues that I'd like to improve.   I shoot a lot at ice rinks and find that even in servo mode I get a lot of shots that are slightly out of focus.  I try to keep the AF target on face masks but many shots will come out focused an inch or two off (ears, hands, etc).  I'm shooting F/1.8-F/2.8 to get action stopping shutter speeds so you can really tell when the focus is even a hair off.  I don't know if this is a limitation of my camera, lens, or the human operator. Most of my paid work is indoors shooting candids where a flash is inappropriate.  I feel like I need to use a higher F-number to get more subject in focus but I usually can't do it without upping to ISO 3200 unless I'm using a flash.  By the time I clean up the high ISO noise in Camera Raw I end up with an image lacking detail.  So far this hasn't been a big problem because the photos are typically used in magazine prints only an inch or two wide but it's still driving me nuts.   Here is the equipment currently in my bag:   Canon Rebel T2i Canon EF-S 18-55mm f/3.5-5.6 II (no IS)   Collecting dust, came with my old Rebel XTi.  Canon EF-S 18-135mm f/3.5-5.6 IS   Purchased with my T2i.  This is my workhorse lens but I'm disappointed with the soft images it produces at higher focal lengths.  Stopping down makes the images acceptable but that's not always an option.  My eyes want more contrast and color but considering how inexpensive this lens is I can't really complain.  Canon EF 70-300mm f/4-5.6 IS USM   This was purchased with an older camera and doesn't get used much anymore.  The images are too soft beyond 200mm and the AF seems sluggish.  Canon EF 50mm f/1.4 USM   I am extremely happy with the images I get from this lens.  I use it indoors all the time and also paired with extension tubes for some macro work.  Some of my best ice hockey images have been from this lens even though I didn't have sports in mind for this lens.    My initial plan was to upgrade to a 60D or 7D body but after doing some reading it occurred to me that I might invest in better glass first.  I'm unsure of what will help improve focusing, image quality, high ISO shooting, etc.  Maybe it's a new camera, new glass, photography lessons, or a little of everything?  I'm looking to keep my next round of purchases under $3,000 and am willing to trade in some of my used equipment to offset costs.  Would anyone care to make a recommendation?  I'm looking at the EOS 60D and 7D bodies.  Not sure if the 7D is overkill for my needs.  I'm also looking at the EF 24-70mm f/2.8L USM lens to be my new workhorse but I'm concerned that it may not be wide enough on an APS-C body and the lack of IS might be an issue.  There's also the EF 70-200mm f/2.8L IS II USM but I'm thinking it wouldn't be wise to spend all my budget on that lens right now (or maybe not?).


I am new to ruby, and while learning it I didn't understand the concept of lambdas or procs. I know lambda and  proc are the blocks of code that have been bound to a set of local variables. But I don't understand their use.  So  what advantage does a programmer get from it?  I had asked this question in past and got marked as duplicate and was given a link that had totally unrelated answered so please before marking it as duplicate or scolding me please view the answers of other links by yourself first.

In Ruby 1.8, there are subtle differences between proc/lambda on the one hand, and Proc.new on the other.    What are those differences? Can you give guidelines on how to decide which one to choose? In Ruby 1.9, proc and lambda are different. What's the deal?


Let's say an object of mass 10 kg is fired from a cart of mass 90 kg. The object and the cart, of total mass 100 kg were initially moving together with a speed of 10 m/s. Then, the object is fired by some means from the cart such that it's velocity increases to 15 m/s (w.r.t ground), in the same direction. Finding the change in kinetic energy from ground and cart frame yields different values. Calculating the kinetic energy difference in ground and cart frame of reference, From Ground frame: $$m_1  = 10 kg, \ m_2 = 90 kg,\  u_1 = 10 m/s , \ u_2 = 10 m/s, v_1 = 15 m/s, v_2 = ?$$ Applying momentum conservation, $$ v_2 = 85/9 \ \ m/s$$ $$  \bigtriangleup KE = 1/2 ( \ 10 \times 15^2 + 90 \times (85/9)^2 - 100 \times 10^2 )$$ $$ = 1250/9 J \ = 138.888 J $$ From Cart frame (non-inertial): $$m_1  = 10 kg, \ m_2 = 90 kg,\  u_1 = 10 m/s , \ u_2 = 0 m/s, v_1 = (15 - 85/9) m/s = 50/9 m/s, v_2 = 0 m/s$$ $$ \bigtriangleup KE = 1/2 \times 10 \times (50/9)^2 $$ $$ = 154.321 J $$ There is a discrepancy of change in kinetic energy calculated from inertial and non-inertial frame. If one takes an inertial frame going with 10 m/s in the direction of the cart, the calculation from the frame will same change in kinetic energy as that given from the ground frame. What correction does the calculation from non-inertial frame need? (Note: This problem deals with actual calculation of kinetic energy changes in a non-inertial frame. Here the pseudo-force is not constant/tractable, only impulse is.) The question in  is about calculating KE in different inertial frames. That question was resolved by saying that kinetic energy may be different for different inertial frames, but work energy theorem (related to change in kinetic energy) still holds. In this question,  We have gone a step ahead and actually applied the work-energy theorem, rather than just calculate kinetic energy from different frames. The query here is about how to apply the work energy theorem for a non-inertial frame, to account for the change in kinetic energy.

I'm having problems understanding the following situation. Suppose two 1-tonne cars are going with the same orientations but opposite senses, each 50 km/h with respect to the road. Then the total energy is   $$\begin{eqnarray}E=E_1+E_2&=&\frac{1\mathrm t\times(50\mathrm{km}/\mathrm h)^2}2+\frac{1\mathrm t\times(50\mathrm{km}/\mathrm h)^2}2\\&=&1\mathrm t\times(50\mathrm{km}/\mathrm h)^2\\&=&2500\frac{\mathrm t\times\mathrm{km}^2}{\mathrm h^2}.\end{eqnarray}$$  Now if we look at it from the point of view of one of the cars, then the total energy is   $$\begin{eqnarray}E=E_1+E_2&=&\frac{1\mathrm t\times(0\mathrm{km}/\mathrm h)^2}2+\frac{1\mathrm t\times(100\mathrm{km}/\mathrm h)^2}2\\&=&\frac{1\mathrm t\times(100\mathrm{km}/\mathrm h)^2}2\\&=&5000\frac{\mathrm t\times\mathrm{km}^2}{\mathrm h^2}.\end{eqnarray}.$$  I know that kinetic energy is supposed to change when I change the frame of reference. But I understand that then there must be some other kind of energy to make up for it so that the energy in the system stays unchanged. But I don't see any other kind of energy here. I only see two total energies of the same system that seem to be different. Could you explain this to me?  Please note that while I don't understand any physics, I do understand college level mathematics, so if necessary please use it. (I doubt anything more than high school maths should be needed here, but I want to say this just in case.)


For example the data looks like this:  Name: A Number: 1 Type: X Name: B Number: 2 Type: Y Name: C Number: 3 Type: Z   And I want to convert it into this format:  Name     Number     Type A         1          X B         2          Y C         3          Z

How do I transpose data in columns to rows?    If the data is:  Joe   some city   some state   Bob   no city   no state     and I use Paste Special » Transpose, I get    Joe some city some state Bob no city no state     What I want is:    Joe some city some state   Bob no city no state     I do not know VBA.


Let $p > 2$ be a prime number with the property that $ q:= \frac{p-1}{2} $ is also prime.  Let $a$ $ \in \mathbb{Z} $ with  $$a \not\equiv 0,-1( \text{ mod  }p )$$  How can I show that if   $$ a^{\frac{p-1}{2}} \not\equiv 1 ( \text{ mod } p ),$$ then $a $ is a primitive root modulo p ?  I don't get the right Idea to prove it..maybe you can help!  Thank you very much in advance!

Let $p$ be an odd prime and let $q=\frac{p-1}{2}$. If $g^q=-1\pmod p$ and $q$ is a prime, show that $g$ is a primitive root mod $p$.  I want to show $\{g,g^1,...,g^{p-1}\}=\{1,2,...p-1\}$. I argue by contradiction that if there're $x,y\in \{1,2,...p-1\},x<y,g^x=g^y\pmod p$. Then $g^{y-x}=1\pmod p$. I don't know how to use the fact that $q$ is prime to lead to a contradiction.


Is that true that if $\{E_k\}_1^\infty$ is a decreasing countable colection of sets and $m^*(E_1)<\infty$, then $$m^*\left(\displaystyle\cap_{k=1}^{\infty}E_k\right)=\lim_{k\to\infty}[m^*(E_k)]?$$ I think it's not true, because we don't have that each $E_k$ is measurable. Does someone know some prove or some counterexample? PS: m*(A) is the Lebesgue outer measure of A.

Does there exist a decreasing sequence  of sets ($A_{n+1}\subseteq A_n$) ; $\{A_n\}$ of real numbers such that   $m^*(A_n)<\infty , \forall n \in \mathbb N$ and $m^*(\cap_{n\in \mathbb N} A_n) < \lim_{n\to \infty} m^*(A_n)$ ? Here $m^*$ is the Lebesgue outer measure on real line


As per title, bit also what do different numbers mean?  I don't know what the name is of that number - feel free to improve the title.

If I enter for example "block 59.164.0.0/20" as a firewall rule.  Does that mean it blocks the IPs 59.164.0.0 to 59.164.0.20 or does it mean something else ?


What is light in terms of physics? Whenever looking for definition on the internet getting explanation or translation of my language, a common definition/explanation for light was      Light is light. We get it from the Sun, when we flip on the switch, or   turn on the flashlight. We see it! But that explanation doesn't really   explain anything   This was explanation or it just was an example of light. Can anyone define what exactly light is? Is it motion? Is it energy? Or vice versa?

We know a sound wave is a disturbance that moves through a medium when particles of the medium set neighboring particles in motion. And using the pressure variations we can plot a  pressure/time graph which looks like a 'wave'in the drawing sense.  What do we mean when we say light is a wave and particles? using the above system, can we  say that light is the disturbance that moves through a medium of photons( forgive me that makes no sense). When we draw a light 'wave', what does it mean? a photon goes up and down?  Please keep the answer as 'not complicated math' as possible.


I'm having select script inside left outer join witch I'm using for getting values  SELECT discount, osp_id, sero_id, estpt_id, max(festpae_id) festpae_id    FROM database1 data1   JOIN database2 data2 ON data2.id = data1.attr_id  WHERE data1.interest_rate = 1     AND data1.ordet_id = data2.id    AND data1.objt_attr_id = data2.objt_attr_id   GROUP BY osp_id, sero_id, estpt_id;   From this select i'm getting this output  DISCOUNT     OSP_ID    SERO_ID   ESTPT_ID FESTPAE_ID ---------- ---------- ---------- ---------- ----------       50     619356    3931831       2144    2000743       40     619356    3931831       2144    2000744   This is not correct for me, because i need to get only 1 output, which means I'm looking for highest FESTPAE_ID, so the correct output of the script should be this    DISCOUNT     OSP_ID    SERO_ID   ESTPT_ID FESTPAE_ID ---------- ---------- ---------- ---------- ----------         40     619356    3931831       2144    2000744   I know, that if I will use MAX() on dicount row, then he will return me only 1 record with FESTPAE_ID = 2000743, which is not my goal.  What do I need to adjust to make it work as i want? So he would return only  1 record based on higest FESTPAE_ID and do not care other values like discount.  P.S This script is used in view table as LEFT OUTER JOIN, so if i order it by festpae_id and then set rownum = 1 it doesn't work properly in view table(but it works if run separately from whole view table select(as left outer join)), that's why i'm asking your help how to do it with MAX(). Or there is any better way?

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


My problem is exactly the same as asked in  with a change in the notation of the two order statistics. Reframing the question:  If $\left(X_1,X_2,…,X_n\right)$ are a random sample from Uniform(0,1) distribution, find the correlation between the order statistics $X_{i:n}$ and $X_{j:n}$, $i<j$.  My approach was exactly similar to what the author of the linked question did:  I have used the formula for correlation coefficient as: $$\rho=\frac{E[X_{(i)}X_{(j)}]-E[X_{(i)}]E[X_{(j)}]}{\sqrt{Var(X_{(i)}) Var(X_{(j)})}}$$  And I arrived at the exact same dead-end: I'm unable to compute $E\left[X_{(i)}X_{(j)}\right]$. What I have tried till now: The joint pdf of $X_{i:n}$ and $X_{j:n}$ is given by $$f_{i,j:n}\left(x,y\right)=\frac{n!}{(i-1)!(j-i-1)!(n-j)!}x^{i-1}(y-x)^{j-i-1}(1-y)^{n-j}$$ where $0<x<y<1$. Let $Z=X_{i:n}X_{j:n}$ and $W=X_{j:n}$. Thus, the joint pdf of $Z,W$ is given by $$\begin{align}f_{Z,W}\left(z,w\right)&=f_{i,j:n}\left(\frac{z}{w},w\right)\left|w^{-1}\right|\\ &=\frac{n!}{(i-1)!(j-i-1)!(n-j)!}\left(\frac{z}{w}\right)^{i-1}\left(w-\frac{z}{w}\right)^{j-i-1}\left(1-w\right)^{n-j}\frac{1}{w} \end{align}$$ Finally, we can get the pdf of $Z=XY$ as $$\begin{align}f_Z(z)&=\frac{n!}{(i-1)!(j-i-1)!(n-j)!}\int_0^1\left(\frac{z}{w}\right)^{i-1}\left(w-\frac{z}{w}\right)^{j-i-1}\left(1-w\right)^{n-j}\frac{1}{w}\cdot dw\\ &=z^{i-1}\frac{n!}{(i-1)!(j-i-1)!(n-j)!}\int_0^1\left(\frac{1}{w}\right)^{i-2}\left(w-\frac{z}{w}\right)^{j-i-1}\left(1-w\right)^{n-j}\cdot dw\end{align} $$ But I cannot proceed further from here. I cannot use a computer to do this.  provided a wonderful solution to the linked question and  question also. But those were done using the software. Any help/suggestion to how I can proceed from here would be very much appreciated.

Let $X_1, \ldots, X_n$ be uniformly distributed on $[0,1]$ and $X_{(1)}, ..., X_{(n)}$ the corresponding order statistic. I want to calculate $Cov(X_{(j)}, X_{(k)})$ for $j, k \in \{1, \ldots, n\}$.  The problem is of course to calculate $\mathbb{E}[X_{(j)}X_{(k)}]$.  The joint density of $X_{(j)}$ and $X_{(k)}$ is given by $$f_{X_{(j)}, X_{(k)}}=\binom{n}{k}\binom{k}{j-1}x^{j-1}(y-x)^{k-1-j}(1-y)^{n-k}$$ where $0\leq x\leq y\leq 1$. (I used the general formula .)  Sadly, I see no other way to calculate $\mathbb{E}[X_{(j)}X_{(k)}]$ than by $$\mathbb{E}[X_{(j)}X_{(k)}]=\binom{n}{k}\binom{k}{j-1}\int_0^1\int_0^yxyx^{j-1}(y-x)^{k-1-j}(1-y)^{n-k}\,dx\,dy.$$  But this integral is too much for me. I tried integration by parts, but got lost along the way.  Is there a trick to do it? Did I even get the limits of integration right?  Apart from that, I wonder if there's a smart approach to solve the whole problem more elegantly.


I want to see if there is any elementary way to prove the following assertion about matrices over division rings (such as not using Wedderburn's theory or tensoring techniques).  If an $n\times n$ matrix over a division ring has left inverse, then it also has right inverse.  The assertion has elementary proof for matrices over fields, but I am considering over division rings.   One can give some hints also.

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


I have a for-loop which contains some local variables n that is declared inside the loop. So I expected the value of n to be destroyed once the program goes out of the loop.   However, it appears that the value of n is still available outside of the for-loop. Why is that? Also, when should I expect the value of n (also the value k if uncommented) to be destroyed?  const delayHelper = require('./delayExecutor')  async function main() {   let promises = [];   let records = [1, 2, 3, 4];    for(let i = 0; i < records.length; i++) {     let n = 1000 + records[i];     // let k = 123;     promises.push(delayHelper.delayResolve(() => records[i], 1000).then(data => data + n))   }    console.log(await Promise.all(promises));   //print: [ 1002, 1004, 1006, 1008 ] }  main()   //delayExecutor.js  let delayedResolve = (fun, ms) => {   return new Promise((y, n) => {     setTimeout(() => {       y(fun());     }, ms);   }); };  exports.delayResolve = delayedResolve;

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


Imagine a set of words ($plaintext$) each are encrypted using AES-ECB mode and due to some leakage in the system an attacker could gain access to some pairs of $plaintext$ and $ciphertext$. But once the attacker got bunch of such pairs he cannot further ask the oracle for any other pairs. So in reality how many such pairs of $plaintext$ and $ciphertext$ are needed to crack the $key$.   Here each input $|plaintext| < 128$ bits.

I have a file, which was encrypted with AES-128 in ECB mode. I know the format of the original file and know that all files in this format have the same headers. So, I have an encrypted block and the original block.  Can I get the encryption key, using this information?


Suppose that $\{T(t)\}$ is a strongly continuous semi-group of operators. If $w-\lim_{t\to0^+} t^{-1} [T(t)x-x] = y$, prove that $$\lim_{t\to0^+} t^{-1} [T(t)x-x] = y.$$

Let $\{T(t):t\geq 0\}$ be a strongly continuous semi-group on $\mathscr{X}$, suppose $x\in \mathbb{X}$, $w\text{-}\lim_{t\to 0^{+}}\frac{1}{t}(T(t)-I)x=y$, show that $x\in D(A)$ and $y=Ax$.   Considering $f\in \mathbb{X}^{*}$, I try to use $e^{-\lambda t}f(T(t)x)$ has right derivate, but I do not know why it is $e^{-\lambda t}f\Big(T(t)(y-\lambda x)\Big)$. And how to complete the proof?  Thanks for any answer!


Minecraft has not been letting me log in since yesterday. I have no idea why. When I logged off of a server I was gonna get back on but I closed minecraft. When I went back on it wanted me to log in. I had no idea why so I put my account in and it said "could not log in as -Minecraft name-, please try again" I had no idea why. Today it still isn't working. I tried getting on MineChat too and that didn't work. Please help.  Btw this is what its doing when I try to change it

We just got a new laptop (ASUS) though we did have a mac.  We are trying to log onto Mojang to download Minecraft and it keeps saying, "The username and password are not recognized."   We have done all the usual procedures; we have reset the password, we are using the email, not the username to sign in, and it looks like the minecraft login servers are working etc. etc.  We quit Minecraft on the old computer and shut off that computer thinking that was the issue.   Still, we can't get onto Mojang.  We are accessing mincraft through firefox and trying to download it to the new computer but we can't get into the account to do that!  What in the world could be the issue?


I purchased a 2008 Mac from a friend. It's now formatted and internet recovery option is not working for a fresh install. I want to create a bootable USB drive in a Windows machine. I am unable to download El Capitan without the Mac App Store. How do I install a fresh copy?

I was going to install a new copy of El Capitan via my USB drive, but it turns out it's dead, it's been corrupted. I erased everything before that, so I'm stuck with the installation screen.  How can I download a new copy of El Capitan? As you know, Safari comes preinstalled. I also have a Windows computer, so I'm open to suggestions.  Here's my Macbook Air Model: MacBook Air "Core i5" 1.4 13" (Early 2014)


As written in the Title: How do I group layers in QGIS? I have tried dragging them on top of each other and looked in the layers setting but could not find anything.

I am working on a project regarding Fish species and fishing methods with many layers.  This creates confusion.   I would like to create layer sub sections (groups) like the following:   Fish Species   species 1 species 2 species 3   Fishing Methods   method 1 method 2 method 3    and so on.   Possibly even a 2nd level sub section (layer group).   I have no idea how to tackle this.  I'm using QGIS 2.4.  To clarify an image of the project is below.


Let $n\in\mathbb{Z}_{>0}$. Prove that there exist $x,y,z\in\mathbb{Z}_2$ (2-adic integers) such that $x^2+y^2+z^2=n$ if and only if $n$ is not of the form $4^m(8k+1)$ with $k,m\in\mathbb{Z}_{>0}$.  I suppose this problem has to do with the Hasse principle. However, in class we only saw results for quadratic equations in two variables. Does there exist an efficient way to solve this type of problem?

I have to prove that the equation $x^2+y^2+z^2 = n$ only has a solution in the 2-adic integers $\mathbb{Z}_2$ if and only if $n \neq 4^m(8k+7)$, with $k,m \in \mathbb{Z}_{>0}$. In the previous exercises, I already showed that this equation has a solution in $\mathbb{Z}_p$ for all odd primes by using the multivariate Hensel-Rychlik lemma but I have no clue how I could solve this problem.


I have a three way toggle that I want to create and when the user clicks on option, I want to show which option they have selected (and move the selector div to show this)  So therefore, each choice has an event listener:   document.getElementById("option1").addEventListener("mouseover", UIController.changeSelection("option1")); document.getElementById("option2").addEventListener("mouseover", UIController.changeSelection("option2")); document.getElementById("option3").addEventListener("mouseover", UIController.changeSelection("option3"));   Which will then call the changeSelection function:    changeSelection: (function(choice) {         var option1 = document.getElementById("option1");         var option2 = document.getElementById("option2");         var option3 = document.getElementById("option3");         var selector = document.getElementById("selector");         if (choice === "option1") {             selector.style.left = 0;             selector.style.width = option1.clientWidth + "px";             selector.style.backgroundColor = "#777777";             selector.innerHTML = "Option 1";         } else if (choice === "option2") {             selector.style.left = option1.clientWidth + "px";             selector.style.width = option2.clientWidth + "px";             selector.innerHTML = "Option 2";             selector.style.backgroundColor = "#418d92";         } else {             selector.style.left = option1.clientWidth + option2.clientWidth + 1 + "px";             selector.style.width = option2.clientWidth + "px";             selector.innerHTML = "Option 3";             selector.style.backgroundColor = "#4d7ea9";         }     })   However by adding the ()'s to my event listener, it fires the function straight away and then doesn't work again afterwards.   How can I pass the function a parameter when using an EventListener?  Thanks guys!

The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.


Hello I am new here and I have been trying to install wine:  $ sudo apt-get install wine1.7 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 to resolve the situation:  The following packages have unmet dependencies:  wine1.7 : Depends: wine1.7-i386 (= 1.7.4-0ubuntu4) but it is not installable E: Unable to correct problems, you have held broken packages.   what should I do ?

When trying to install WINE (sudo apt-get install wine) I get the following error:  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:  wine : Depends: wine1.5 but it is not going to be installed E: Unable to correct problems, you have held broken packages.   Google does tell me that apparently this has something to to with ia32-libs, but I cannot find out how to do to fix the dependencies or if I need to (manually?) install something else.  I have added ppa:ubuntu-wine/ppa to my repositories.  sudo apt-get install wine1.5gives me  The following packages have unmet dependencies:  wine1.5 : Depends: wine1.5-i386 (= 1.5.4-0ubuntu1~ppa1~precise1+pulse17)   sudo apt-get install wine1.5-i386gives me  The following packages have unmet dependencies:  wine1.5-i386:i386 : Depends: libgphoto2-2:i386 (>= 2.4.10.1) but it is not going to be installed                      Depends: libgphoto2-port0:i386 (>= 2.4.10.1) but it is not going to be installed                      Recommends: gettext:i386 but it is not going to be installed                      Recommends: libsane:i386 but it is not going to be installed   Any help would be appreciated. Thanks.


There is a retroreflector on the moon, placed there, I believe, by astronauts in the 1970s. I think there is at least one station (in France?) that continuously beams a laser at it to measure the distance to the moon. I assume it measures the distance by measuring the amount of time it takes the laser light to travel to the moon and back again.  Is it possible for amateur to use the reflector? How powerful a laser would be needed, and how sensitive a detector? What would be the basic setup?

Questions first, then my rough estimations:   Is it possible to perform moon laser ranging with amateur motorized 114 mm telescope? My calculations suggest that for 1 mJ laser it should receive ~2 photons per source 1 mJ laser pulse.  Given that we already talking about individual photons, how it was possible to perform moon laser ranging BEFORE retro-reflectors were deployed to the moon? Retroreflector sends back light in ~1 arcsecond angle, while bare lunar surface - in ~6 archours, which means we supposed to receive signal $\sim(6\times 60 \times 60)^2 = 4.5 \times 10^8$ weaker, i.e. even with 2.5 meter telescopes we are talking 1 photon per 250 pulses of 1 J each.   My rough estimations: Given that atmosphere turbulence limits telescope resolution to ~1 arcsecond (adaptive optics was not available when laser ranging experiments started, nor it is available now for amateurs), if we use telescope with diameter larger than ~150 mm (so that we are limited by atmosphere, not diffraction) to expand the laser beam we will get ~1939×1939 meter illuminated area on the moon surface ($\tan(1\:\mathrm{arcsec}) \times 400,000\:\mathrm{km}$). Which means only 1/(1939×1939) part of our energy will reach reflector.   Retroreflector is ~1×1 meter in size. It will reflect the light with same beam divergence - 1 arcsecond. Too sad, as diffraction limit for retro-reflector of such size is ~0.2 arcsecond.  So, if our receiving telescope has area of ~1 $\rm m^2$, we will receive again 1/(1939*1939) part of what reached the moon, so total attenuation is ~$1.4\times 10^{13}$.   If we use 532 nm pulse laser with 1 mJ pulse energy, it will emit 2.67*10^15 photons, which means we are going to receive ~190 photons per pulse. Sounds realistic.   These calculations suggests that 114 mm amateur telescope should be able to detect 2 photon per pulse - again should be detectable statistically.


I'm triying to write an equation on Latex with overleaf with the following code :  \begin{equation}  \dfrac{1}{n}\sum_{i = 1}^ {n}x_{i} ^{2} + \widehat{x}_{i} ^{2} + y_{i} ^{2} + \widehat{y}_{i} ^{2} = \: <|E_{x}| ^{2}> + <|E_{y}| ^{2}>  \end{equation}   However when I do, I got 9 warnings mostly about missing $ and the numbering is behind my equation instead of being next to it.  I don't understand the source of the warnings does anyone know ?

Why blank lines between equation makes error? there are a lot of commands in latex and almost for all of them these blank lines are not important,  but why in this case is important and is there any similar function?


Which is correct:   Here is our students. Here are our students.   Thanks.

Here is the documents needed.     Here are the documents needed.       Which is grammatically correct and why? My guess would be the second one because of the plural form.


I'm quite new in C++ and I would like to learn good practices from the beginning, so my question explained with an example is:  Having:  class A {     int mNumber; };   If I need to use class A inside class B, what is better?to include an object?  class B {     A * mpA;     int mColor; };   Or inherit from Class A?  class B : public A {     int mColor; };   Is there any good habit talking in a generally way to do this?

Why prefer composition over inheritance?  What trade-offs are there for each approach?  When should you choose inheritance over composition?


Is $y=\frac{x^2}{x^3+3}$ has a horizontal asymptote? Since the graph passes through $(0,0)$, hence $y=0$ is not a horizontal asymptote. Can a rational function may not have a horizontal asymptote?

I was reviewing a problem on an old math contest and it had a problem asking for horizontal, vertical, and slant asymptotes.  The equation was this:  $y=\frac{x^{2}-3x-4}{x^{3}-x^{2}-30x+72}$  Here's a graph:    It said that $y=0$ was a horizontal asymptote. However, the graph shows that it crosses $y=0$, which led to my question: What's the definition of a horizontal asymptote?  Here's something taken from www.freemathhelp.com: "A horizontal asymptote is a y-value on a graph which a function approaches but does not actually reach. Here is a simple graphical example where the graphed function approaches, but never quite reaches, y=0."  The example never said anything about one part of the graph approaching it, but another part intersecting it. That confused me. Thanks in advance.


I am a very beginner in JavaScript and recently I am studying it on a book. I am trying to modify  a script from this book that passes a number which is the number of letters in a word, and output the number of combinations of words you would get by scrambling the letters. While the original script lets you pass the number I want to modify it and allow the user to input a word, take it and return the number of words by scrambling the letters.  My issue is that, when I run the code, I keep getting this error:   Uncaught TypeError: Cannot read property 'length' of undefined     at thingamajig   Why is this happening?  var word = prompt('Word here.');  function thingamajig(word) {     var facky = 1;     clunkCounter = 0; //reset the clunkcounter     if (word.length == 0) {         display("clank");     } else if (word.length == 1) {         display("thunk");     } else {         while (word.length > 1) {             facky = facky * word.length; //multiply facky with size until size is 0. Basically it is caulculating a factorial             word.length = word.length - 1;         }         clunk(facky);     } }  function clunk(times) {     var num = times;     while (num > 0) {         display("clunk"); //keep calling display f until it is = 0         num = num - 1;     } }  function display(output) {     console.log(output);     clunkCounter = clunkCounter + 1; //How many times the clunck f called the display f? }  thingamajig(); console.log(clunkCounter);

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


What are the advantages and disadvantages of using logistic regression to represent the probability of a binary dependent variable Y, given that the independent variables x1, x2, ..., xn are also binary?

Is it appropriate to do a logistic regression where both the dependent and independent variables are binary? for example the dependent variable is 0 and 1 and the predictors are contrast coded variables -1 and 1 ?


I have a code below in an Entity Class. It throws exception in the Entity.Designer.vb saying the value Amount in Table Patient is DbNull.      If _patientDetails.ID > 0 Then         If _patientDetails.Amount = EntityEnums.Patient.Existing             Then                                          _patientDetails.SetAmountNull()         End If     Catch ex As Exception         _patientDetails.SetAmountNull()     End Try  End If   It goes to the "Return" line as below and throws exception.  Public Property Amount() As Integer     Get         Try              Return CType(Me(Me.tablePatient.AmountIDColumn),Integer)         Catch e As Global.System.InvalidCastException             Throw New Global.System.Data.StrongTypingException("The value for column 'AmountIDColumn' in table 'Patient' is D"& _                      "BNull.", e)         End Try     End Get     Set         Me(Me.tablePatient.AmountIDColumn) = value     End Set End Property   Exception Details are   A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll  Additional information: Conversion from type 'DBNull' to type 'Integer' is not valid.

I want to generate some formatted output of data retrieved from an MS-Access database and stored in a DataTable object/variable, myDataTable. However, some of the fields in myDataTable cotain dbNull data. So, the following VB.net code snippet will give errors if the value of any of the fields lastname, intials, or sID is dbNull.     dim myDataTable as DataTable    dim tmpStr as String    dim sID as Integer = 1     ...    myDataTable = myTableAdapter.GetData() ' Reads the data from MS-Access table    ...     For Each myItem As DataRow In myDataTable.Rows      tmpStr = nameItem("lastname") + " " + nameItem("initials")      If myItem("sID")=sID Then         ' Do something     End If      ' print tmpStr     Next   So, how do i get the above code to work when the fields may contain dbNull without having to check each time if the data is dbNull as in ?


I cannot INSERT Vietnamese strings into the database that expects char utf8. There is an error with the font.    Ex:       title: Lê Việt Hải Dương   info: Dương IT 911   Here is my code:  $title =  $_POST['title']; $info =  $_POST['title']; $query = "INSERT INTO `nick` ( `title`,  `info`) VALUES ('$title','$info')"; $insert_count = $db->exec($query);   This is what appears in the database:  For title:      Lê Vi?t H?i D??ng   For info:      D??ng IT 911

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


My teacher told me that sun is a black body but after reading at various sites whre they say that sun is not a black body but has black body radiations because it cannot absorb all radiations.

As far as I know, a black body is an ideal emitter. So how can it be that a non-ideal emitter emits more radiation than a black body?  This happens only in a very limited area at around 500nm, but it still happens: it looks like at the maximum it is around 15% above black body.  This seems impossibile for my understand of a black body. Especially because just for that there is the emissivity value ε, or better ε(λ)      Quantitatively, emissivity is the ratio of the thermal radiation from a surface to the radiation from an ideal black surface at the same temperature. The ratio varies from 0 to 1    Means 0 ≤ ε(λ) ≤ 1    What is the right interpretation? What is the sun doing there, seems like ε(500nm)=1.15?


Is it possible to remove the device name in my shell commands to "save space"?    My-MacBook-Pro:~ username$   to  ~ username$

How can I hide username and computer in terminal command prompt?   In Terminal it says  Last login: Mon Jan 13 00:00:14 on ttys000 Whatever:~ UserName$    Is it possible to show just the current folder and $ sign?


Determine exactly $\int_{0}^{\pi/2}\dfrac{x\cos x}{1+\sin^2 x} dx$.   I think this integral might involve the natural logarithm, but I don't think there's a clean method to simplify it. A lot of integration techniques don't seem to work (e.g. integration by parts, u-substitution, etc.). I don't think this integral can be solved using normal calculus.


I am using the glossaries package together with hyperref, but I realize that I don't need the table of acronyms. Rather, I would prefer that on clicking an acronym, I want to reach the first instance of \gls{myacronym}. Is there anyway to do that.  Thank you  Edit: Added sample code  \documentclass[11pt]{article} \usepackage[a4paper, total={6.5 in, 9.5in}]{geometry} \usepackage{hyperref} \usepackage[acronym]{glossaries}  \newacronym{acr}{myacr}{My Acronym}  \makeglossaries \begin{document} \section{Introduction}  I refer to the acronym here \acrfull{acr}. Since, I don't have a list of acryonyms, on clicking the acronym link I want to go to the section where the acronym is explained.  \pagebreak  \section{Chapter on My Acronym} \gls{acr} is explained here in detail. On clicking an occurrence, the reader should be directed here. \end{document}    Edit 2: Some users have marked this question as a duplicate, but it's not. My question is that any occurrence of an acronym should link to it's first occurrence, rather than the list of acronyms. In contrast, the "other" question asks about linking the first occurrence with the list of acronyms.

Is it possible to direct the hyperlink created by \gls{term} to the first use of the term in the main text instead of the glossary list?  I'm writing a thesis that uses a lot of abbreviations, but I don't want to include a glossary list in the document.  Rather, I'd like to define each abbreviation on first use but provide a hyperlink to the first use during all subsequent uses of the abbreviation.  Is this possible?  The following is an example of the code I'm currently using to set-up the glossaries and hyperref packages and define a term:  \documentclass{report} \usepackage[acronym,hyperfirst=false,nonumberlist,nowarn]{glossaries} \usepackage[hidelinks]{hyperref} ... \newacronym{FEA}{FEA}{Finite Element Analysis} ... \begin{document}     ...this includes a \gls{FEA} tool to...    % first use of term     ...the \gls{FEA} tool...                   % subsequent uses of term, want to hyperlink to first use above within PDF \end{document}


For example,  $$2\mid12,3\mid12,6\mid12$$ But, $$4\mid12,6\mid12,24 \nmid 12$$ When does it work?

Let $a,b,c\in \mathbb{Z}$, such that $a$ and $b$ are relatively prime, and both $a$ and $b$ divide $c$. Prove that in this case $ab$ divides $c$. Find all numbers such that $a$ and $b$ divide $c$ but $ab$ does not.  I proved the first part easily. For the second part, is the answer that any two $a,b\in \mathbb{Z}$ which are not relatively prime, their product will not divide $c$?


Due to limited linguistic and technical knowledge, I do not know (and can not find) the name for the 4 pin (or perhaps 3?) plugs that are used inside PC cases to deliver electricity.  My questions:   What's the name of these cables? (they are used for connecting fans etc.) What's the difference between them and "Molex" cables? Is there a converter to attach to small 12V DC adapters' round end so that I can connect / run a fan externally?

How would I go about identifying a port, card or connector on my system which I am unfamiliar with?  Where would I find information on what these parts are? What would be the steps I would take in identifying a unknown port or cable?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


The following code draws 10 nodes, labelled from 0 to 9.  \documentclass[a4paper,10pt,landscape]{article} \usepackage{tikz} \begin{document}     \begin{tikzpicture}         \foreach \i in {0,...,9}{             \node (i) at (\i, \i) {\i} ;         }     \end{tikzpicture} \end{document}   Instead, I would like the nodes to be labelled from a to j.  Is there a function which, given an integer n, returns the n-th letter of the alphabet? I would like my loop to be as follows:  \foreach \i in {0,...,9}{     \node (i) at (\i, \i) {\someMagicalFunction{\i}} ; }

I have a register \count0=<some-value> and need to get the letter of the alphabet on the index of \count0. That is, if it is 1, I need an A, if 2, a B, etc.  Is this possible?  I'm reluctant sharing an MWE as it seems to overcomplicate things a bit:  \begin{tikzpicture} \node[regular polygon, regular polygon sides=7, minimum size=5cm] (A) {}; \foreach \i in {1,...,7}{     \count0=8     \advance\count0 by -\i     \node[circle, label=above:\scriptsize\the\count0, fill=black, minimum size=4pt, inner sep=0pt] (\the\count0) at (A.corner \i) {}; } \end{tikzpicture}   With the tikz package and the shapes.geometric tikz library.  This draws seven nodes labelled 1 .. 7 on a circle. I need to have A .. G instead of 1 .. 7.


I’m downloading Ubuntu from a USB stick and it’s frozen. At the stays bar it says, ‘installing the grub2 package’.  What can I do to move this along?

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


I am using the following query in MySQL and POSTGRESQL.  MySQL SELECT table_name FROM information_schema.tables where table_schema='SmartHome' and table_name like '%House%'  POSTGRESQL. SELECT table_name FROM information_schema.tables where table_schema='public' and table_name like '%House%'.  I want to know equivalent query in Oracle DB.

How do I query an Oracle database to display the names of all tables in it?


I am  trying to find the pdf of $Y=\cos(X)$ where $X$ is a random variable distributed uniformly in $[-\pi/2,\pi/2]$.   I tried to use the change of variable theorem but there is a detail in $[-\pi/2,\pi/2]$ since the cosine it's not monotone, and since $\cos(\pi/2)=0=\cos(\pi/2)$. I don't have a way to see the interval that corresponds to $Y$.  Thank you for helping!

I've run into a practice problem where $Y = \cos(\pi X)$, and $X$ is uniform on $[0, 1]$, and I'm supposed to prove that the PDF of $Y$ is $1/(\pi\sqrt{1 - y^2})$. I know that for derived distributions, you plug in the the equation for $Y$ in terms of $X$ into the PDF of $X$, integrate up to $y$, and then differentiate with respect to $y$. However, when I do this, I get the PDF of $Y = -1/(\pi\sqrt{1 - y^2})$.   I'm sure that the problem here is that there's some property of the cosine and its inverse that I don't know, so if someone could point out how to do this, that would be great, thanks!


$\forall$:n∈${N}$ $\binom{2n}{n}$  $\ge  \frac{4^n}{2n+1}$ I tried with no any success...

How to prove that $\quad\displaystyle\frac{4^{n}}{\sqrt{4n}}<\binom{2n}{n}<\frac{4^{n}}{\sqrt{3n+1}}\quad$ for all $n$ > 1 ?     Does anyone know any better elementary estimates?   Attempt.  We have $$\frac1{2^n}\binom{2n}{n}=\prod_{k=0}^{n-1}\frac{2n-k}{2(n-k)}=\prod_{k=0}^{n-1}\left(1+\frac{k}{2(n-k)}\right).$$ Then we have $$\left(1+\frac{k}{2(n-k)}\right)>\sqrt{1+\frac{k}{n-k}}=\frac{\sqrt{n}}{\sqrt{n-k}}.$$ So maybe, for the lower bound, we have $$\frac{n^{\frac{n}{2}}}{\sqrt{n!}}=\prod_{k=0}^{n-1}\frac{\sqrt{n}}{\sqrt{n-k}}>\frac{2^n}{\sqrt{4n}}.$$ By Stirling, $n!\approx \sqrt{2\pi n}\left(\frac{n}{e}\right)^n$, so the lhs becomes $$\frac{e^{\frac{n}{2}}}{(2\pi n)^{\frac14}},$$ but this isn't $>\frac{2^n}{\sqrt{4n}}$.


Is there a way to search by text in SQL Server Integration Services packages using T-SQL statement (or other language)?  I want to check if certain table is used in any package as I am going to drop it - if the table is used I need to edit the package.  Could you advice?

I have a number of SSIS packages, how can I search them to find the use of specific tables? I need to make tables changes and I am trying to assess the impact of these.


I am using apalike biblographystile in latex. I would like to quote each article title.  Currently, my latex file looks like:   \documentclass[12pt]{article}  \usepackage{apalike}  \usepackage{natbib}  \begin{document}   Here is my text followed by citation in bracket \citep{myCitation}.  \bibliographystyle{apalike}   \bibliography{myRef.bib}  \end{document}   Then my reference looks like:      Zhao, Y., Petkau, A. J., Traboulsee, A., Riddehough, A., and Li, D. K. B. (2010). Does   MRI lesion activity regress in secondary progressive multiple sclerosis? Multiple   Sclerosis, 16:434-442.    However, I want the article title to be:     Zhao, Y., Petkau, A. J., Traboulsee, A., Riddehough, A., and Li, D. K. B. (2010). "Does   MRI lesion activity regress in secondary progressive multiple sclerosis?" Multiple   Sclerosis, 16:434-442.   Is there an easy fix for this?

My advisor wants me to cause all titles for papers, books, and articles in " for my thesis in my bibliography.  I am using natbib and the plainnat bibliography style and am unsure how to do this. I am NOT asking how to do  or displaying a quote in the title, I want to make the title show " around it with capitalization being saved. I could go through and manually modify the .bib file I suppose...  Here is a working example:  \begin{filecontents}{mybib.bib}                  @Article{Hart, author = {P.E. Hart, N.J. Nilsson, B. Raphael}, title = {Correction to a Formal Basis for the Heuristic Determination of Minimum Cost Paths }, journal = {SIGART Newsletter 37}, year = {1972}, pages = {28-29} }        @Article{Hart2, author = {P.E. Hart, N.J. Nilsson, B. Raphael}, title = { {``Correction to a Formal Basis for the Heuristic Determination of Minimum Cost Paths''}  }, journal = {SIGART Newsletter 37}, year = {1972}, pages = {28-29} } \end{filecontents}    \documentclass{report} \usepackage[numbers,square]{natbib} \begin{document} \bibliographystyle{plainnat}      I don't want it to look like this reference \cite{Hart}      I want it to look like this \cite{Hart2}  \bibliography{mybib}   \end{document}   Is there a way to easily do this? I can always hack this by doing what I did for the second reference if not.  From reading  nothing stands out to me as doing this?


When I try to run for example a simple print("Hello World") My terminal comes up with the error Illegal Instruction And it's causing issues.

I have an old iMac running High Sierra and I use the Anaconda distribution of python 3.7. I've been using Anaconda for over 2 years and it has worked fine. I have a test code I've run over 100 times to be sure my python still works after doing something stupid on my computer.  About a week ago I was trying to get a python script to run and input some bad parameters into the code. This appeared to lock up my computer and without thinking I manually restarted my computer.  Now I can't seem to get python to work no matter what I do. Before this I had run python scripts using Atom and VSCode. Both worked fine and I checked both out with my test code many times. I would also run Python from the command line and it worked fine as well. Now when I try to run a script in Atom or VSCode it doesn't work. Sometimes it gives me an "Illegal instruction: 4" message.  And other times I get "No module named vpython found. Even though I installed vpython on my machine using conda install vpython.  When I run my test code from the terminal I get an immediate return which says "Illegal instruction: 4". My test code doesn't use vpython.   I have deleted and reinstalled the Anaconda Python twice. I do not have time machine working on my computer so I'd like to fix this issue. Does anyone know why I keep getting the illegal instruction 4 when I run from the command line?  Details:   macOS 10.13.6 Python:  which python3 /Users/myname/opt/anaconda3/bin/python3    I just wrote a simple script and it ran fine in the terminal. The script read in a number and printed it back out and also printed version of python it was using. The source code is:  num = int(input("Enter a number: "))     print(num) import sys  print(sys.version)   Adding any one of these three lines to the above script causes the illegal instruction 4 output.  import numpy as np from scipy.optimize import curve_fit import matplotlib.pyplot as plt   So it seems to be something due to these import commands. Although import system works fine!


I am new to programming and need help with a bit of code I wrote.  This is what I have so far:  import java.util.Scanner; public class Main {     public static void main(String[] args) {         // TODO Auto-generated method stub         Scanner Scan = new Scanner(System.in);         System.out.println("The program is starting, please be patient...");         System.out.println("Do you want to start the program? (y/n):");         String input = Scan.nextLine();         if (input == "y") {             System.out.println("Hello World!");         }         else {             System.out.println("Error");             System.out.println(input + " not recognized!");         }     } }   When I run this, there are no errors, but when I type "y" it runs the else section instead of saying "Hello World!". How can I make it so when I type in "y" it says "Hello World!"?

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 installed Ubuntu on my PC, updated everything and it seemed everything will be fine.  But WiFi keeps disconnecting. When PC is just turned on everything is fine, signal is strong and everything works as should.   But then it just disconnects, at random times.  Sometimes after 3 minutes, sometimes after 10.  That little drop down menu you get when clicking on WiFi signal also sometimes gets mostly grayed out, you can't select "connect to hidden WiFi" for example.  Other times it's not grayed out, it's just constantly trying to reconnect without success. Rebooting is the only option.  I don't know anything about Ubuntu, or Linux in general. I tried googling, but every solution starts with terminal and a lot of commands which I'm not comfortable trying out since I have no idea what they do. I might mess up things even more.  Like I was saying, I did see that you guys usually ask for several commands and results, so I did that and here they are listed. I hope this can be solved.  Link to results:   Link to script results from :   Thanks in advance!

I've used Ubuntu before, but I'm still very new. I just installed 16.10 on a new computer yesterday, and the Wi-Fi has been considerably slower than my Windows laptop. I put the computer together mainly to play Dota 2, and I experience decent ping but constant 5%-10% packet loss while playing. Occasionally, after the computer has been left on for a while, the Wi-Fi connection will drop completely- I can still see networks in the drop down menu, including my home network, but my computer will not reconnect without a reboot. I've looked all over for a solution, but my inexperience has prevented me from getting anything to work. My Wi-Fi card is a Ralink RT2561/RT61, here's some info  The output of sudo lshw -C network   *-network                          description: Wireless interface         product: RT2561/RT61 802.11g PCI         vendor: Ralink corp.         physical id: 6         bus info: pci@0000:01:06.0         logical name: wlp1s6         version: 00         serial: 00:0e:2e:de:df:c0         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=rt61pci driverversion=4.8.0-22-generic firmware=0.8 ip=192.168.1.107  latency=64 link=yes multicast=yes wireless=IEEE 802.11         resources: irq:17 memory:dfef8000-dfefffff   Here is the output of sudo iwconfig:   *-network                          description: Wireless interface         product: RT2561/RT61 802.11g PCI         vendor: Ralink corp.         physical id: 6         bus info: pci@0000:01:06.0         logical name: wlp1s6         version: 00         serial: 00:0e:2e:de:df:c0         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=rt61pci driverversion=4.8.0-22-generic firmware=0.8 ip=192.168.1.107  latency=64 link=yes multicast=yes wireless=IEEE 802.11         resources: irq:17 memory:dfef8000-dfefffff   I'm at a loss, I'm very bad at this. If any additional info is needed I can provide it


Let $0<U_n<1$ be a sequence of decreasing numbers that converges to $0$. Let us consider $V_n$: $$V_n = \prod_{k=0}^{n} (1-U_k)$$  Since $V_n$ is decreasing and lower bounded by $0$, we can conclude that it converges as $n$ tends to $\infty$. Let us write this limit $V_\infty$. What would be a simple/minimal condition on $U_n$ to guarantee that $V_\infty > 0$ ?  For instance, I already know that, if $U_n$ is upper bounded by a geometric sequence with ratio $r<1$ and initial value $a<1$, then: $$ V_n \geq \prod_{k=0}^{n} (1-ar^n) = (a;r)_n,$$ with $(a;r)_n$ denoting the $q$-Pochhammer symbol. But I'm not even sure on the condition on $a$ and $r$ such that $(a;r)_\infty > 0$. It seems to me that it is always the case, but after some google search I've not found the information anywhere.

General condition: $(P_n)_{n\in\mathbb{N}}$ is a sequence of non-zero real numbers. If $\prod_{n=0}^\infty P_n$ exists in reals and is non-zero, then call this infinite product convergent. Otherwise divergent.  I have proven that:  If all $(P_n)_{n\in\mathbb{N}}$ are positive, then its convergence is equivalent to convergence of $\sum_{n = 0}^\infty \log(P_n)$.  If further $(P_n)_{n\in\mathbb{N}}$ are further greater or equal to 1, then the convergence of the product is equivalent to the convergence of $\sum_{n = 0}^\infty (P_n-1)$  Now I am looking for two examples where a)  $(P_n)_{n\in\mathbb{N}}$ are reals. $\sum_{n = 0}^\infty (P_n-1)$ converges but $\prod_{n=0}^\infty P_n$ diverges b) $(P_n)_{n\in\mathbb{N}}$ are reals. $\prod_{n=0}^\infty P_n$ converges but $\sum_{n = 0}^\infty (P_n-1)$ diverges   I have spent a long time on this but failed to find any. I guess it requires complex analysis technique? (Which I don't know) Please help me out. Thank you.


Im using Ubuntu 13.0.4 and have tried getting updates via the command line ..no joy Latest issue is trying to install Root  sudo apt-get install root-system-bin Getting message Reading package lists ... Error! E: Could not open file /var/lib/dpkg/status-open (2: No such file or directory) E:The package lists or status file could not be parsed or opened.   I have tried  sudo rm /var/lib/apt/lists/* -vf sudo apt-get clean sudo apt-get update sudo apt-get upgrade   From   But when I get to second line I get:-  E: Could not open lock file /var/cache/apt/archives/lock-open (2: No such file or directory) E: Unable to lock the download directory

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


Well, obviously billions of years if it is the moon. Or not very long if it is only 100km above the Earth, due to atmospheric drag. Also, how long it stays up would depend on density ie how much energy it has to dissipate in order to lose speed to drag due to mass/cross sectional area.  However, somewhere in the middle we have satellites that will stay up for... how long? How long will geo-sync satellites remain in orbit? What forces are exerted on them that will affect their stay eg magnetic field effects, solar wind etc? If we wanted to put a satellite in orbit and keep it there (say) 10,000 years how close could we get to Earth before this became unrealistic?

The orbit of satellites around Earth eventually decays, or so I read. This is typically caused either by atmospheric drag, or by tides. I would assume most satellites have a limited service life in orbit. Hence the question - What is the typical orbital life of a satellite? How long before it's successor must be launched into orbit ?  EDIT: For instance, a weather satellite


The whole story is given in the past. Is the sentence in the middle of the story "But why did she wish to do it now?" grammmatically correct? Is it correct to use the Past Simple tense with the adverb "now" talking about past events?

I wrote this to my friends a few days ago: (1) It used to take 5 seconds for me to reach Youtube, now it only took me 2 seconds to do it.  I used "now" to refer to the moment when I installed a faster connection hardware. I come up with this question, because I think the use of "now" in sentence 1 is informal and it is like a colloquial conversation. I am sorry my friends. Back in those days I was taught (by my English teachers, non-native speaker) that now must use in present tense, so the use of now sometimes confuses me.


I am trying to return the src, width and height of a cetain image:  $img = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');   This is returning the expected array but with incorrect width and height values  $img[0] -> .../wp-content/uploads/2014/11/image-2000x1125.jpg $img[1] -> 640 $img[2] -> 360   The image is actually 2000x1125 but the width and height returned are incorrect. I have tried regenerating sizes with several plugins with no luck. This issue happens only with 'large' size.  Could this be a bug? Is there some other way of returning image sizes (hopefully correct)?

I am using wp_get_attachment_image_src to construct the srcset attribute of an img tag. In that attribute I want to output a comma separated list of image urls along with the image widths.  Using the Media Settings page, I have configured the image sizes to be as follows:   Thumbnail size: 150x150 Medium size: 640x480 Large size: 1024x768 Small size: 278x320   The wp_get_attachment_image_src function returns the correct urls and the correct widths for the image sizes full, medium and small. small is a custom size I added using add_image_size.  If I call wp_get_attachment_image_src( $image_id, 'large' ), the returned array looks like this:  array (     0 => 'http://localhost/wp-content/uploads/2014/10/image-1024x768.jpg',     1 => 640,     2 => 480,     3 => true, )   Checking the image which can be found at that url turns up the image with the correct dimensions.  Currently i am using the php builtin function  to circumvent this problem, but this function call takes significantly longer than simply accessing the index returned by wp_get_attachment_image_src:  Without getimagesize (mtime before and after execution):   '0.83761000 1415195440' '0.83831600 1415195440'   With getimagesize:   '0.34808000 1415195635'  '0.35323900 1415195635'   What can I do to make wp_get_attachment_image_src return the correct dimensions?


In my example code below, is the counter = 0 really required, or is there a better, more Python, way to get access to a loop counter? I saw a few PEPs related to loop counters, but they were either deferred or rejected ( and ).  This is a simplified example of my problem. In my real application this is done with graphics and the whole menu has to be repainted each frame. But this demonstrates it in a simple text way that is easy to reproduce.  Maybe I should also add that I'm using Python 2.5, although I'm still interested if there is a way specific to 2.6 or higher.  # Draw all the options, but highlight the selected index def draw_menu(options, selected_index):     counter = 0     for option in options:         if counter == selected_index:             print " [*] %s" % option         else:             print " [ ] %s" % option         counter += 1   options = ['Option 0', 'Option 1', 'Option 2', 'Option 3']  draw_menu(option, 2) # Draw menu with "Option2" selected   When run, it outputs:   [ ] Option 0  [ ] Option 1  [*] Option 2  [ ] Option 3

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


As the title says I need to decompose 4x4 TRS transformation matrices and extract the proper scale vectors and the proper rotation vectors (or rotation quaternions). I know how to extract those information when the upper 3x3 matrix determinant is not negative. The problem is that those matrices can have that negative determinant and as far as I could understand, this negative determinant indicates a flip or mirrored transformation. What do I have to do to extract the proper values for scale and rotation in those cases?

It is possible to calculate the translation, rotation and scale that were used to build a matrix?  I mean if I have a matrix M can I calculate the rotation, scale, and translation it represents?  Of course I could save each component in the matrix individually, but can I recover this information from just the matrix data?


I'm trying to 7zip and move some files that look like this:  ./[1998] - This year's book.pdf  ##note the brackets, spaces, and apostrophes  My script looks like this:  for file in `ls ./unprocessed/*.pdf`;  do      7z a -mx=0 -pMyPassword $file.7z $file ;     mv $file ./processed  done   (This is actually on Synology's linux, if it makes a difference.)  I've tried adding quotation marks around "$file", but that doesn't help on either of the two main lines.  I'm hoping I can do this without a lot of complicated grep or sed type stuff.  The main error I'm getting is that it's trying to split out the file names due to the spaces, and freaks out because it can't find "[1998]", etc.  I think 7z will be okay with it, once I work out the spaces/funky chars issue(?).  Has anyone else run into this?  Appreciate any advice!

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


Problem :   If $$\lim_{n \to \infty} \sum^n_{k =0} \frac{nC_k}{n^k(k+3)} =ae+b$$  then find the value of a-b.  Please suggest how to solve such problem in whicl summation and limits both are there. Thanks.

Evaluate $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{\binom{n}{k}}{n^k(k+3)}$.   $\bf{My\; Try::}$ Although we can solve it by converting into definite Integration.  But I want to solve it without Using Integration.  So $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{\binom{n}{k}}{n^k(k+3)} = \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{(n-1)(n-2).......(n-k+1)}{k!\cdot n^{k}\cdot (k+3)}$  Now How can i solve after that, Help required, Thanks


My problem:  I took a break to have lunch and when I came back, my computer would not POST or display.  I haven't changed anything recently.  It's about 6 years old.  The CPU led on the motherboard lights up.  Most fans are spinning, except for the GPU fans, which spin very briefly; some years ago, one of the GPU fans stopped spinning unless the temps get very high, at which point it starts spinning.  The motherboard speaker I bought doesn't make any beeps.  Specs:  CPU: AMD FX8350, GPU: Radeon 7950, Motherboard: m5a99fx pro r2.0, PSU: Rosewill Capstone 750 RAM: GSkill Ripjaws 2x4GB 1600 DDR3 (also monitor, mouse, keyboard)  What I've tried:  I've breadboarded the computer, using only the items in the above specs.  I bought a multimeter and tested the voltages from the PSU.  From the 24 pin motherboard connection, to the CPU and GPU connections, everything is within spec.  I've tried booting using combinations of 1 or both RAM sticks, and different slots.  I've tried replacing the CMOS battery and clearing the CMOS by moving that little 2 pin connector over.  I've tried reseating everything, including the CPU, which did not have any bent pins.  What I'm planning:  The PSU seems fine based off the voltages I read.  Unless both RAM sticks failed, I think the RAM is fine, too.  I hear CPUs rarely ever fail, so I doubt it's that.  The monitor turns on and I can switch inputs, brightness, etc., so I doubt it's that either.  Based on how the GPU fans aren't spinning right, I think it's that.  However, it could also be the motherboard.  The only way I can think to narrow it down further, besides buying a GPU or motherboard, is find a GPU I can borrow.  Does anyone know of any troubleshooting methods I missed?

I have a fairly modern desktop computer, an AMD Athlon II X2 based silent PC, that does not work.  When turned on, it will start physically (all fans are rotating, disks start up...) but not give a signal on any of the graphics ports (DVI, VGA, and HDMI, I tried all three). Also, the reset button does not seem to have any effect.  I have stripped the mainboard bare of all SATA connections, extension cards, and the one 2GB RAM chip to eliminate them as the problem source, but to no avail, so I think it's fair to assume it's either the mainboard or the processor that are at fault.  However, I have neither a replacement mainboard, nor a replacement processor handy to identify which one is broken. The cause of the defect is unknown, so for all I know, it could be both. Therefore, I'm reluctant to buy replacement hardware blindly before knowing more.   Is there any way to further diagnose (or at least get some indication) which component is broken without buying replacement hardware?


I wondering if I can remote debug vb6 application like in c#. I want to debug another computer across a network.  I looked at  but it doesn't help me.

Is it possible to remotely debug a process started outside VB6?  The application is a VB6 application with quite a few dll/ocx resources. I am attempting to setup a ClickOnce deployment, using Registration-Free COM, of the VB6 app but have been getting errors when it executes.  My understanding of the way that VB6 redirects COM registerations will probably mean that this is not possible but I thought someone might have a better idea.