After trying to download Dropbox I get an error message in top bar of screen:  "Unknown error ''(E:Malfomed line 56 in source list/etc/apt/sources.list(distparse))' This usually means that your installed packages have unmet dependencies."  It suggested running Package Manager or apt-get in the terminal but that produced nothing very helpful. As a newbie to Ubuntu I'm rather lost!

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.


Currently I am attacked by malware.  I try to use Kaspersky Internet Security + manually delete suspicious folders.  However, Whenever I restart my computer, some suspicious folders reappear and my google chrome and firefox are attacked.  That's, I believe there are some files that Kaspersky Internet Security and my bare eyes cannot detected, which continuously install malware into my computer.  Now, I want to trace back which files installed the suspicious folders.  Please help me to do that. Thank you!

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   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.


I'm using this PHP code to get my sql query which joins 2 tables ... both table have the same "size" field, but the results is not the same in both... code:  mysql_query("SELECT * FROM cart INNER JOIN tbl_product ON tbl_product.product_id = cart.product_id WHERE .......) or die(mysql_error());    The result of this query shows me   Cart_id, member_id, product_id, size, .... and a second  size   1 of the size comes the cart table and 1 from the product table..   then I try to retrieve my data  while($data2 = mysql_fetch_array( $data)) {      $size=  $data2['size'];    But I get the second size in my result and I need the first one.. I need the cart.size ...  how can I do this ?

I have two tables in my database:  NEWS table with columns:   id - the news id  user - the user id of the author)   USERS table with columns:   id - the user id   I want to execute this SQL:   SELECT * FROM news JOIN users ON news.user = user.id    When I get the results in PHP I would like to get associative array and get column names by $row['column-name']. How do I get the news ID and the user ID, having the same column name?


I have a hp laptop and pre installed windows 8 .  I download an iso of ubuntu 14.04 lts.  When i installed it using wobi, it reboot, install and again reboot and it shows two option for boot 1 windows 8 , 2- ubuntu .  I click on ubuntu then ubuntu start and shows an error like this "serious error found while checking drive/. Press i for ignore ,s for skip mounting ,m for manual setup" . Please help me what can i do ?  if i use bootable pendrive for install, it install on a partition of my pc's hard drive .it don't boot ? i am beginer on linux please help me

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


I want to estimate the disk space for 1 million rows.    Currently, I have 8527959 rows, Data Length of 744 MB and Index Length 989.4 MB.  Please let me know if my calculations are correct.  Total Data Length for 1 million rows  Data of 744MB consists of 46500 pages of 16KB blocks (InnoDB page size)  If 46500 pages consist of 8527959 rows, 1 page consists an average of 183 rows.  So, 1 million rows need (1,000,000/183) pages= 5465 pages of 16KB  So, 1 million rows of data need 87.4MB.  Total Index Length for 1 million rows  Indexes of of 989.4MB consists of 61837 pages of 16KB blocks (InnoDB page size)  If 61837 pages consist of 8527959 rows, 1 page consists an average of 138 rows.  So, 1 million rows need (1,000,000/138) pages= 7247 pages of 16KB  So, 1 million rows of data need 115.9MB.  Total disk space (approximate) for 1 million rows  Total data length+Total Index Length = 87.4MB + 115.9 MB = 203.3 MB  Is this correct?


I'm completely confused by uniform convergence, but I put together the following proof just based on my other questions here and examples I read online.    Discussion: Let $\epsilon \gt 0$  We want to find $N$ so that for all $x$ in $[0,1]$ and $n \gt N$, $\left|f_n(x)-f(x)\right|=\left|\frac{x^n}{\sqrt{3n}}-0\right|\lt \epsilon$  $\left|\frac{x^n}{\sqrt{3n}}\right|\le\frac{1}{\sqrt{3n}}\le\frac{1}{\sqrt{3N}}\lt\epsilon$ if $\frac{1}{3\epsilon^2}\lt N$  Proof:  Give $\epsilon \gt 0$, let $N=\frac{1}{3\epsilon^2}$.  Then for all $x$ in $[0,1]$ and $n \gt N$, $\left|f_n(x)-f(x)\right|=\left|\frac{x^n}{\sqrt{3n}}-0\right|\le\frac{1}{\sqrt{3n}}\le\frac{1}{\sqrt{3N}}=\frac{1}{\sqrt{\frac{1}{3\epsilon^2}}}=\epsilon$  I'm completely confused by this entire subject, I've been reading the definition over for the last 3 hours and I just do not understand what is going on.

This is a follow up to my below question:    I'm trying to determine whether $f_n(x)=\frac{x^n}{\sqrt{3n}}$ for $x \in [0,1]$ is uniformly convergent.    I know if it is then it must satisfy $\left|f_n(x)-f(x)\right|\lt \epsilon$  Since I know $f(x)=0$ I know it must be  $\left|f_n(x)-f(x)\right|\lt \epsilon = \left|\frac{x^n}{\sqrt{3n}}-0\right|\lt \epsilon =\left|\frac{x^n}{\sqrt{3n}}\right|\lt \epsilon$  After doing some algebra I get:  $\frac{1}{\epsilon}\lt \frac{\sqrt[n]{3n}}{x}$  Where do I go from here and have I made any mistakes?  Does this means that $f$ is uniformly convergent?


I want to have an area that when my sister and my dad join, they spawn on that exact spot. Are there any commands that allow me to do that?

On my Vanilla Minecraft server I want players to TPed to the center spawn block when they join I know that if you set the world spawn players will spawn within a 20 block radius of that point, I was thinking that if I hook up a command block to tp people within a 20 block radius to the center block I just don't know how to go about it. I need it to be compact because the spawn is a floating airship and I cant have it hanging into the passageway below. Thanks


I've killed wall of flesh like 5 or 6 times I cant find Pwnhammer or the hallow not even underground corruption!   Can you access hardmode on the android version of Terraria?

What items do I need to make my world Hard Mode?


I'm seeing for a long time that the review for Close Votes just raises every hour, is at least 1k per day. This is out of control. I have some old flags that never was reviewed and in this way never will be reviewed.  So, why not raise the maximum number of individual reviews of 40 to 100 for example? I think this is bad for the community stay the way it is.  Someone have some other idea? Already have some ideia to make it better?

We all know       , but it seems the problem is people not reviewing enough. Whenever I had time, I would go through all 40 that I was given, but by then I wanted to do more. Would raising that limit of 40 and not counting Close Votes queue votes towards your daily close vote allowance help?


I am having trouble reducing a specific "shape" of circuits resembling the figure 8 like this one:    I can't figure out what is in parallel and what is in series. I want to reduce the circuit and find an equivalent resistance. I just assigned arbitrary values to the resistors in MultiSim. I'm not looking for an answer to this specific problem, rather I'd love some help as to how I can reduce circuits that look like this one.

How do you find the equivalent resistance here? (I realized it's a Wheatstone bridge, but it's unbalanced, so that doesn't help.) I tried using Kirchhoff's laws, but there is no cell given.


<?php   $conn = mysql_connect("localhost", "root", "") or die ('Error connecting to MySQL!'); mysql_select_db("aspire");   $earnedpoints = false; $account = $_POST['name']; $account = mysql_real_escape_string($account);   if ($account == "") {     echo 'Enter an account name!';     exit(); }   $ip = $_SERVER['REMOTE_ADDR']; $time = time();   $query = mysql_query("SELECT *, SUM(`times`) as amount FROM votingrecords WHERE account='$account' OR ip='$ip'"); $lasttime = mysql_fetch_array($query); $amount = $lasttime['amount']; $insertnew = false;     if ($amount == "") {     $insertnew = true; } $timecalc = $time - $lasttime['date']; if (!$insertnew) {     if ($timecalc < 21600) {           echo ' Hello '. $account .' you have already voted with this account ('. $account .') or IP ('. $ip .') in the last 6 hours!';         echo ' Last voted on: '. date('M d\, h:i:s A', $lasttime['date']) .'';         echo '';         echo '';         echo '<meta HTTP-EQUIV="REFRESH" content="10; url=/">';         echo '';         echo '';         echo '

You will be redirected to the main website in 10 seconds.';         echo '';         echo '';         exit();     } else {                         $update = mysql_query("UPDATE votingrecords SET account='$account', date='$time', times=times+1 WHERE ip='$ip'");             if (!$update) {                 $message  = 'Invalid query: ' . mysql_error() . "\n";                 $message .= 'Whole query: ' . $update;                 die($message);             } else {                 $earnedpoints = true;             }         } } else {     $success = mysql_query("INSERT INTO votingrecords (`account`, `ip`, `date`, `times`) VALUES ('$account', '$ip', '$time', 1)");     if (!$success) {             $message  = 'Invalid query: ' . mysql_error() . "\n";             $message .= 'Whole query: ' . $success;             die($message);     } else {         $earnedpoints = true;     } }         if ($earnedpoints) {     $points = mysql_query("UPDATE accounts SET votepoints = votepoints + 2 WHERE name='$account'");                     if (!$points) {               $message  = 'Invalid query: ' . mysql_error() . "\n";             $message .= 'Whole query: ' . $query;             die($message);     }     mysql_close($conn);     echo '';     echo '';     echo '<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.gtop100.com/in.php?site=80994">';     echo '';     echo ''; } else {     echo 'There was an error processing your request.';     exit(); } ?>     Hey everyone,  I'm very inexperienced with PHP scripting and I've been told that my script is vulnerable to SQL injection? But I'm not sure how I would make it to be SQL injection proof since I'm not much experienced in that field and i'm afraid I might mess up the code.  Could anyone help me with this? I would greatly appreciate it.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I need to write a program that asks the user to enter 3 integers seperated by a comma and a space.  Here's what I've tried:  //start program //Prompt user to enter 3 numbers.   //obtain input marks as string getline(cin, snum1, ','); getline(cin, snum2, ','); getline(cin, snum3);  //convert marks from string to integer num1 = stoi(snum1); num2 = stoi(snum2); num3 = stoi(snum3);   I've tried both atoi and stoi,  1) stoi gives me an error saying: 'stoi' was not declared in this scope, which from what I have read on similar questions is because my compiler doesn't support C++11, which doesn't help me because I'm using the same compiler my teachers will use when I hand in my assignment, and if the code doesn't compile I get 0%.  2) atoi gives me an error saying: cannot convert 'std::string {aka std::basic_string}' to 'const char*' for argument '1' to 'int atoi(const char*)'.  I've searched this second error and all I've found is complicated solutions that I don't understand or don't work.  Is there no simple way of just getting this input into my variables as integers?  All hints much appreciated.  EDIT:  How is this a duplicate of splitting strings? That thread doesn't help.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


I read that when you don't have access to the web server's headers you can turn off the cache using:  <meta http-equiv="Cache-Control" content="no-store" />   But I also read that this doesn't work in some versions of IE.  Are there any set of <meta> tags that will turn off cache in all browsers?

Our investigations have shown us that not all browsers respect the HTTP cache directives in a uniform manner.  For security reasons we do not want certain pages in our application to be cached, ever, by the web browser. This must work for at least the following browsers:   Internet Explorer 6+ Firefox 1.5+ Safari 3+ Opera 9+ Chrome   Our requirement came from a security test. After logging out from our website you could press the back button and view cached pages.


There are people who would never have any criticism of country/city/community or group to which they belong to.   For example: Most people living in a certain city have to use public transport which is extremely overcrowded for daily commute. But they would describe it as adventure. They don't like it when someone criticizes the state of public transport just because they belong to that city and won't hear any criticism of it.   Is there a single word that could describe such people?   The word I am looking for could not be "Patriotism". "Patriotism" is limited to country. It does not apply to city or group or a community. And being patriotic doesn't necessarily mean that one has to be so irrational as to praise everything about it.

I'm looking for a word that is similar to patriotic but does not relate to one's country (or state).  For what it's worth, I'm specifically referring to "overly patriotic" in a negative sense, to describe someone who has a overly sentimental/cultural or otherwise less-than-rational attachment or devotion to something and makes it part of their very identity. A common example might be an extremely zealous football fan.


An issue with addextension from my file path directory, any idea what could have went wrong? ok this the complete exception stack trace. having add issues with chrome extension, it seems java.io.file is not working as expected. i tried run in a separate project folder so just to confirm my suspicion but the issue doesn't seems to go away   FAILED: LaunchBrowserextension java.lang.NoSuchMethodError: 'void org.openqa.selenium.chrome.ChromeOptions.addExtensions(java.io.File[])'     at testpackage.addextension.LaunchBrowserextension(addextension.java:24)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.base/java.lang.reflect.Method.invoke(Method.java:567)     at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)     at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)     at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)     at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)     at org.testng.TestRunner.privateRun(TestRunner.java:648)     at org.testng.TestRunner.run(TestRunner.java:505)     at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)     at org.testng.SuiteRunner.run(SuiteRunner.java:364)     at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)     at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)     at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)     at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)     at org.testng.TestNG.runSuites(TestNG.java:1049)     at org.testng.TestNG.run(TestNG.java:1017)     at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)     at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)     at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)   My full code      import java.io.File;      import org.openqa.selenium.By;     import org.openqa.selenium.WebDriver;     import org.openqa.selenium.chrome.ChromeDriver;     import org.openqa.selenium.chrome.ChromeOptions;     import org.openqa.selenium.remote.DesiredCapabilities;     import org.testng.annotations.BeforeTest;     import org.testng.annotations.Test;       public class addextension {      @Test     public void LaunchBrowserextension() throws InterruptedException         WebDriver driver = new ChromeDriver();         System.setProperty("webdriver.chrome.driver", "C:\\Users\\User\\Desktop\\chromedriver.exe");                 ChromeOptions options = new ChromeOptions();                 options.addExtensions(new File("C:\\Users\\User\\Downloads\\abc\\Chrome.crx"));                  DesiredCapabilities capabilities = new DesiredCapabilities();                 capabilities.setCapability(ChromeOptions.CAPABILITY, options);                 ChromeDriver driver = new ChromeDriver(capabilities);              System.out.println("Opening extension");             driver.get("chrome-extension://mooikfkahbdckldjjndioackbalphokd/index.html");              driver.navigate().refresh();             System.out.println("Refresh successfully");          }     }

I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?


I have a Debian 6.x box that I needed to move to Azure.  Before moving it up, I did make sure that SSH is listening on any port, so is Apache.  My NSG has all of the right ports opened (22, 443 for now). I uploaded the VHD, then used the following PowerShell commands to create the VM based off of the VHD:  $vnet = get-AzureRmVirtualNetwork -Name $VnetName -ResourceGroupName $VnetRG $subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name "$SubnetName" -VirtualNetwork $vnet $pip = Get-AzureRmPublicIpAddress -Name "$pipName" -ResourceGroupName $resourceGroupName $NSG = Get-AzureRmNetworkSecurityGroup -Name "$NSGName" -ResourceGroupName $resourceGroupName $nic = New-AzureRmNetworkInterface -ResourceGroupName $resourceGroupName -Name $nicName -Subnet $subnet -Location $location -PrivateIpAddress $newVMIP -DnsServer $dnsServer1,$dnsServer2 -PublicIpAddress $pip -NetworkSecurityGroup $NSG $newVM = New-AzureRmVMConfig -VMName $newVMName -VMSize $newVMSize | Add-AzureRmVMNetworkInterface -Id $nic.Id | Set-AzureRmVMOSDisk -VhdUri $vhdPath -Name $diskname -CreateOption attach -Linux -Caching ReadWrite New-AzureRMVM -ResourceGroupName $resourceGroupName -Location $location -VM $newVM -DisableBginfoExtension   I can see that the machine is running as I can view the auto-logged-in desktop in boot diagnostics.  However, when I try to SSH or when I try to access the web site over 22 and 443, it's not returning any response.  Telnet times out and it's acting like the port isn't forwarding at all.  I understand that because it's Debian 6.x, waagent isn't supported.  But I shouldn't need waagent for port forwarding, should I?  From what I understand about networking and from what I see in MSDN forums, "The port forwarding should be invisible to your end machine.  As the public hits the public port and your VM receives on the internal port." ()    Did I mis-key or miss something in my PowerShell script?  Any ideas?    I have tried deleting and re-creating the VM and I've tried re-uploading the VHD file.  I did have to convert it from VHDX to VHD, but that shouldn't matter since it's actually booting up and I see the screen in boot diags.  The NSG I used does work for any other newly created machine via portal or PowerShell, just not this uploaded machine, which makes me think I've flubbed something in the script.  Everything does show that it's open for port 22 and 443 though.  Here's a screen grab of the Effective Security Rules blade:

I have a Debian 6.x box that I needed to move to Azure.  Before moving it up, I did make sure that SSH is listening on any port, so is Apache.  My NSG has all of the right ports opened (22, 443 for now). I uploaded the VHD, then used the following PowerShell commands to create the VM based off of the VHD:  $vnet = get-AzureRmVirtualNetwork -Name $VnetName -ResourceGroupName $VnetRG $subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name "$SubnetName" -VirtualNetwork $vnet $pip = Get-AzureRmPublicIpAddress -Name "$pipName" -ResourceGroupName $resourceGroupName $NSG = Get-AzureRmNetworkSecurityGroup -Name "$NSGName" -ResourceGroupName $resourceGroupName $nic = New-AzureRmNetworkInterface -ResourceGroupName $resourceGroupName -Name $nicName -Subnet $subnet -Location $location -PrivateIpAddress $newVMIP -DnsServer $dnsServer1,$dnsServer2 -PublicIpAddress $pip -NetworkSecurityGroup $NSG $newVM = New-AzureRmVMConfig -VMName $newVMName -VMSize $newVMSize | Add-AzureRmVMNetworkInterface -Id $nic.Id | Set-AzureRmVMOSDisk -VhdUri $vhdPath -Name $diskname -CreateOption attach -Linux -Caching ReadWrite New-AzureRMVM -ResourceGroupName $resourceGroupName -Location $location -VM $newVM -DisableBginfoExtension   I can see that the machine is running as I can view the auto-logged-in desktop in boot diagnostics.  However, when I try to SSH or when I try to access the web site over 22 and 443, it's not returning any response.  Telnet times out and it's acting like the port isn't forwarding at all.  I understand that because it's Debian 6.x, waagent isn't supported.  But I shouldn't need waagent for port forwarding, should I?  From what I understand about networking and from what I see in MSDN forums, "The port forwarding should be invisible to your end machine.  As the public hits the public port and your VM receives on the internal port." (https : //social.msdn.microsoft.com/Forums/en-US/bd93f5cb-a674-4b9c-aa5a-9f6e7b364f2c/port-forwarding-still-broken?forum=WAVirtualMachinesforWindows)    Did I mis-key or miss something in my PowerShell script?  Any ideas?    I have tried deleting and re-creating the VM and I've tried re-uploading the VHD file.  I did have to convert it from VHDX to VHD, but that shouldn't matter since it's actually booting up and I see the screen in boot diags.  The NSG I used does work for any other newly created machine via portal or PowerShell, just not this uploaded machine, which makes me think I've flubbed something in the script.  Everything does show that it's open for port 22 and 443 though.  Here's a screen grab of the Effective Security Rules blade:   The iptables on the local machine are empty as shown in .  What's weird is that I can't SSH to it from another machine on the same virtual network either.  I tried going through the steps at https : //docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-debian-create-upload-vhd?toc=%2Fazure%2Fvirtual-machines%2Flinux%2Ftoc.json, but since it's Debian 6, the waagent won't install.  But again, I shouldn't need an agent on the machine for port forwarding to work.  No other virtualization technology requires an agent for NAT to work.  Edit - this was suggested as a duplicate of StackOverflow.  I originally asked the question there, but everyone suggested I post my question here.  So I did that, marking the StackOverflow answer as the answer.


Let me tell you what I've tried so far:   ARC Welder, not compatible with architecture.   – I don't know what year this was developed but I convert the simplest apps with my mobile and they can't run. I'm trying to convert the one that I actually want and it crashes immediately. I'm talking about the second tool.   – I've got snapp installed, it can't find anything literaly.     error: snap "anbox-installer" not found    Got any ideas? How much difficult is it from a programmer/engineer point of view?

Is it possible to run Android apps on Ubuntu? And I don't mean inside an emulator, but natively, as you would with any other application installed using the Ubuntu Software Center.


lim as x tends to infinity of Ln(x) is infinity of course. But let's try another way: lim (ln(x)) =lim x(ln(x)/x) = lim(x) × lim ln(x)/x = lim(x) × lim (1/x)(LHR)= lim(x×1/x) =lim(1)=1 so what's wrong?

▶Let us think following limit   $ R $   which is  a real number which is finite and non-zero in the region  $ 0 < \sigma < 1 $    $$ R=\lim\limits_{  x\to\infty}x^{1-2\sigma}\frac{\frac{\sin(2\sigma)}{x^{1-\sigma}}+1-\left(\frac{x-1}{x}\right)^{1-\sigma}}{\frac{\sin(\sigma)}{x^{\sigma}}+1-\left(\frac{x-1}{x}\right)^{\sigma}}  $$  We can not split the right side as two limits. It means:  $$ \lim\limits_{  x\to\infty}x^{1-2\sigma}\cdot \lim\limits_{  x\to\infty}\frac{\frac{\sin(2\sigma)}{x^{1-\sigma}}+1-\left(\frac{x-1}{x}\right)^{1-\sigma}}{\frac{\sin(\sigma)}{x^{\sigma}}+1-\left(\frac{x-1}{x}\right)^{\sigma}}  $$  Because:   -- The limits in the right side;  if one is going to the zero , the other going to the infinity.  --Also, we can not apply L′Hospital rule to the second limit in the right side. Because we can not see the values of $\sin(2\sigma)$  and  $\sin(\sigma)$  as zero  in the region $0<\sigma<1$.  ▶ The question: Am I right,  we can not split the right side as two limits  ?


I'm looking for the Lollipop OS that I can sideload to my Nexus 7 2012 and supposedly they released Lollipop for Nexus 7 2012 today (Nov 3, 2014).  Is there a site I can go to download the OTA file?  The official version is not  yet.

Android 5.0 (Lollipop) was officially announced on October 15th, 2014.  You can review the high-level changes at the  and the announcement on the official .  Of course, not all devices will get this update right away and others won't get it at all. Each manufacturer and carrier often choose to add their custom modifications which tend to delay the official release.  When will each device get Android 5.0, either officially or unofficially, if ever?  See also:


So space expands due to Hubble Flow.  Some light is observed, which is seen to be red-shifted due to the space expansion.  It is less energetic.  Where did the energy go?

So I have learned in class that light can get red-shifted as it travels through space. As I understand it, space itself expands and stretches out the wavelength of the light. This results in the light having a lower frequency which equates to lowering its energy.  My question is, where does the energy of the light go? Energy must go somewhere!   Does the energy the light had before go into the mechanism that's expanding the space? I'm imagining that light is being stretched out when its being red-shifted. So would this mean that the energy is still there and that it is just spread out over more space?


I have this page , when it was .html file there was no problem with Special Turkish character, everything was displayed correctly,  when I added some php code to it, and made it .php file, the special charcters showed this problem ,there is a part of the file is taken from external xml file is not displaying correctly,  I have added  header('Content-Type: text/html; charset=utf-8');   and I have in the header the following but none of this solved the problem  <?php  header('Content-Type: text/html; charset=utf-8'); ?> <!DOCTYPE html> <html class=" js csstransitions" xmlns="http://www.w3.org/1999/xhtml">   <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type">   you can see this here     Bu site, Do?an Burda Dergi Yay?nc?l?k ve Pazarlama A.?. taraf?ndan   T.C. yasalar?na uygun olarak yay?nlanmaktad?r. Sitenin isim ve yay?n   haklar? Do?an Burda Dergi Yay?nc?l?k ve Pazarlama A.?.?ye aittir.   Sitede yay?nlanan yaz?, foto?raf, harita, illüstrasyon ve konular?n   her hakk? sakl?d?r. ?zinsiz,kaynak gösterilerek dahi al?nt?   yap?lamaz.   it should be displayed correctly as here      Bu site, Doğan Burda Dergi Yayıncılık ve Pazarlama A.Ş. tarafından   T.C. yasalarına uygun olarak yayınlanmaktadır. Sitenin isim ve yayın   hakları Doğan Burda Dergi Yayıncılık ve Pazarlama A.Ş.’ye aittir.   Sitede yayınlanan yazı, fotoğraf, harita, illüstrasyon ve konuların   her hakkı saklıdır. İzinsiz,kaynak gösterilerek dahi alıntı   yapılamaz.   this is the response header for my php page  HTTP/1.1 200 OK  Date: Thu, 01 May 2014 13:19:53 GMT  Server: Apache/2.2.13 (FreeBSD) mod_ssl/2.2.13 OpenSSL/0.9.8e PHP/5.2.11 with Suhosin-Patch  X-Powered-By: PHP/5.2.11  Keep-Alive: timeout=5, max=100  Connection: Keep-Alive  Transfer-Encoding: chunked  Content-Type: text/html; charset=utf-8  Content-Language: tr   how can I display those special characterrs correctly

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.


Let me ask you a question which I've derived from my programming practice:  Let's assume, I have a number of users represented by their names: John, Pete, Stanislaw, Marc, ...  What words should I use to name such collection of names of users: user names, or users names?  Thanks.    To provide more context, here is similar example for programmers:  JSON of objects: [{"id": 1, ...}, {"id": 2, ...}, {"id": 3, ...}, ...]  How should I name a variable representing a collection of identificators (ids) of given objects:  var objectIds; // or var objectsIds;  var objectIdentificators; // or var objectsIdentificators;   ?

Possible Duplicates:             I'm wondering whether or not I should use a plural form noun with a collection name. For example, which one is correct, bookList or booksList (obviously they are variables in a programming language)?


So I'm the only the user of my computer, and I eventually figured out how to enable the "su" user on my account with a password (really quite simple actually), just in case I ever needed to do something where I would keep having to authenticate permission.  I have no fear of hackers because I'm such a discrete/boring internet user, but I was curious if enabling my su would make my computer more vulnerable to cyber attacks, or what your concerns would be if your computer contained more sensitive information or you had more of a reason to be paranoid.  Or do the Ubuntu makers just try to stop you from making a su account just to keep you from screwing up your computer?

I've often come across posts on forums or other websites where you see people joking in such a manner about running/logging in as root as if it's something awful and everyone ought to know about it. However, there isn't much that a search reveals on the matter.   It may be widely known to Linux experts, but I really don't know why. I remember always running as root when I first tried Linux years ago (Redhat and Mandrake) and don't remember running into any problems because of that.   There are actually some distros that have a bright red background with alert signs all over it as wallpaper for the root user (SuSe?). I still use the "Administrator" account for regular use on my Windows installation and haven't ever run into any problems there either.


Let $\Bbb P$ be a probability measure on $\Bbb R$ with $\Bbb P(\{x\}) = 0$ for all $x \in \Bbb R$. I want to show that for all $\alpha \in [0,1]$ there exists a $B_{\alpha} \in \mathcal B(\Bbb R)$ such that $\Bbb P(B_{\alpha}) = \alpha$.  My approach is to take an interval $I_m = [-m,m]$ (let's assume $\Bbb P([-m,m]) > \alpha$) and construct a sequence of subintervals $[-m + q_k, m - q'_k]$ with $(q_k,q'_k) \in \Bbb Q_+^2$ such that $[-m + q_k, m - q'_k] \supseteq [-m + q_{k+1}, m - q'_{k+1}]$ and $\Bbb P ([-m + q_k, m - q'_k]) \ge \alpha $ for all $k \in \Bbb N$. Then my idea was to use the continuity from above of the measure but I'm not sure whether this sequence indeed converges to a set with measure $\alpha$.

Let $\mu$ a probabibility measure in $\mathbb R$ with $\mu\{x\}=0\quad \forall x\in\mathbb R$. Show that for all $\alpha \in [0,1]$ there exists $B_\alpha \in\mathcal B(\mathbb R)$ with $\alpha=\mu (B_\alpha)$.  My thoughts: We have to show that the distribution function $F(y)=\mu(-\infty,y)$ is continous. Then we can apply the intermediate value theorem.  I am not sure how to show that this measure is continous. Some help is welcome!


Luck would have it my key broke off when I was trying to unlock my bike. The lock is U shaped ABUS. I've read people had this before, however biggest problem is that bike is now stuck at the school, locked to a metal grid. Half of the key is inside the lock and there is no way to pull it out. Obviously I can't take it to locksmith and my moves are pretty limited due to position it's locked in. I don't care about the lock. I wish to free my bike without losing the front wheel. Any suggestions?  Edit: Issue solved, by smashing lock few times to dislodge it since key broke very close to open position.

I've been biking for 2 months now with my U-lock still on my bike, it sort of gets in the way of pedaling sometimes and I'm kinda tired of it.  Does anyone know of any ways to get the remnants of the key out from the lock? Or is my only option to send this to the bike shop and have them saw it off?  I can provide pictures if necessary. I've been using a secondary chain in the meantime.


I have been trying many different ways to loop through the arguments, using different ways with for and while loops, yet it doesn't work. My script should take arguments and answer if they are files, directoies etc.  while $1 in "$@" ;do  if [ -f $1 ];then         echo "$1        regular file"  elif [ -d $1 ];then         echo "$1        directory"  elif [ -f $1 ];then         echo "$1        excuteable file"  elif [ -h $1 ];then         echo "$1        symbolic"  else         echo "$1        Does not exist" fi  1=$(( $1 + 1 ))  done   How do I loop though each arguments?

I'm looking for the basic loop like:  for(int i = 0; i < MAX; i++) {   doSomething(i); }   but for bash.


Why do I get   -bash: test: Permission denied   when I run   sudo echo "xyz" > test   The directory permissions are:  drwxr-xr-x 3 root root 4096 2014-08-05 16:26    I have no problem creating a file in the directory using sudo.  But why can't I sudo echo into it?

When you attempt to modify a file without having write permissions on it, you get an error:  > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission denied: /tmp/foo   Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway:  > sudo echo test > /tmp/foo zsh: permission denied: /tmp/foo   Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way?  > sudo su # echo test > /tmp/foo


I have a single page application where some of the category and brand pages are infinite load on the screen (those pages are older now no more available) I want to avoid them. should I use 404 not found page? instead of the loader.

We built our eCommerce web site using Angular as a single page application.  We have implemented a spinner that runs until the page is responding with the expected content. We have some category pages which were crawled and indexed by Google but which are no longer available on the site. What is the best practice for old pages?  Should I create "404 Not Found" pages for them instead of saying "loading" forever? Is setting a no index meta tag enough?


Which would be the correct format for this XML data, are they equivalent or are there trade offs between the two?  1.  <sitemap>   <category name="Animals">
       <page url="/pics/greatdane.jpg" title="Great Dane"/>
   </category> </sitemap>   2.  <sitemap>   <page>     <category>Animals</category>
Dogs
     <title>Great Dane</title>     <url>/pics/greatdane.jpg</url>       </page> </sitemap>   I've implemented the first example with my style sheet and it seems to work fine, but I'm unsure what the correct form should be.

At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the XML file.   The sample I came up with is essentially something like:  <INVENTORY>    <ITEM serialNumber="something" location="something" barcode="something">       <TYPE modelNumber="something" vendor="something"/>     </ITEM> </INVENTORY>   The other team said that this was not industry standard and that attributes should only be used for meta data. They suggested:  <INVENTORY>    <ITEM>       <SERIALNUMBER>something</SERIALNUMBER>       <LOCATION>something</LOCATION>       <BARCODE>something</BARCODE>       <TYPE>          <MODELNUMBER>something</MODELNUMBER>          <VENDOR>something</VENDOR>       </TYPE>    </ITEM> </INVENTORY>   The reason I suggested the first is that the size of the file created is much smaller. There will be roughly 80000 items that will be in the file during transfer. Their suggestion in reality turns out to be three times larger than the one I suggested. I searched for the mysterious "Industry Standard" that was mentioned, but the closest I could find was that XML attributes should only be used for meta data, but said the debate was about what was actually meta data.  After the long winded explanation (sorry) how do you determine what is meta data, and when designing the structure of an XML document how should you decide when to use an attribute or an element?


I am trying to understand the definition of differentiation, I am working on some problems and ran across this one:     If f+g is differentiable at x = a and f is differentiable at x = a,   then g is differentiable at x = a   I think this is true because the addition operation shouldn't change it, but I find it difficult to use the definition to actually prove this. Like it seems like this should just work by properties but I am not sure.

I've been asked to solve the following problem and I believe that I have gone about it correctly but I would appreciate a second look from someone with more experience.  Question: If $f+g$ and $f$ are differentiable at $a$, must $g$ be differentiable at $a$?  Since $f+g$ and $f$ are differentiable at $a$, $f+g$ and $f$ are continuous at $a$.  Observe   \begin{align*}(f+g)^{\prime}(a)-f^{\prime}(a)&=\lim_{x\to a}\frac{(f(x)+g(x))-(f(a)+g(x))}{x-a}-\lim_{x\to a}\frac{f(x)-f(a)}{x-a}\\ &=\lim_{x\to a}\frac{(f(x)+g(x))-(f(a)+g(x))-(f(x)+f(a))}{x-a}\\ &=\lim_{x\to a}\frac{g(x)-g(a)}{x-a}\\ &=g^{\prime}(a). \end{align*}  Thus, if $f+g$ and $f$ are differentiable at $a$, then $g$ must be differentiable at $a$  I feel that I went about this proof correctly, however the move from two limits to a single limit seems like it might have been done incorrectly.


When creating a plot like this one  \documentclass{article}  \usepackage{pgfplots}  \begin{document} \begin{tikzpicture}          \begin{axis}                  \addplot coordinates {                 (0.01,0.01)                 (0.09,0.09)                 };         \end{axis} \end{tikzpicture} \end{document}   pgfplot uses the following xticklabels:    Is there any way to make pgfplots create labels as 0.01,0.02,... without specifying them all manually using xticklabels and yticklabels?

A chart with data in the range of 200,000 and small difference between max and min values, will be assigned a 10^5 multiplier to the entire axis. This results in the ticks becoming meaningless, since all become 2.   Example:-  \begin{tikzpicture} \begin{axis}   \addplot coordinates {   (100,200001)   (200,200003)   (300,200005)   };     \end{axis} \end{tikzpicture}   When this is plotted the y-axis has 5 ticks, all of which are 2. The y-axis has a multiplier of 10^5. This has effectively removed all information from the graph.  I may use the below to set the explicit value of the tick values but this does not implement change in the display "style" of the axis ticks.  ytick = {200000, 200005, 200010}   I have also tried increasing the precision of the tick label to 5. However this only results in the graph showing labels such as 2.00000, 2.00005, 2.00010 with a 10^5 axis multiplier.  yticklabel style={precision = 5,}   My question is "How do I remove/change this 10^5 multiplier, such that the y-axis ticks are displayed in the form 200000, 200005, 200010.


I have a RAID6 array that had been neglected, and just had the third drive fail.  I want to do a ddrescue of the last drive to fail to try to recover the RAID, however I don't know how to identify which drive that was.  To make matters worse, I'm using a 3ware RAID card with JBOD, so trying to identify which drive is mapped to which /dev/sdX device is problematic.  To further make matters more complicated, when I rebooted with the replacement disks, all the device letters changed ...  All three failed disks are visible to the operating system, and partitioned as "Linux raid autodetect".  The filesystem on top was XFS.  Is there any way to query the disk to see when it was last written to?  The failure happened long enough ago that there is no record of it in /var/log/messages*

So, let's say your server had 6 healthy hard drives.  A drive fails (will not mount/detect, drops out of raid with errors) or is failing (SMART getting worse, etc).  You need to swap out the bad drive.  When you open the case you see.. six identical hard drives.  How can you tell which one is no longer healthy/mounting/functioning?  System would be linux, most likely ubuntu server, using at most simple software RAID.  The hard drives would be SATA and connected directly to the motherboard. (no raid controller)   I don't want to randomly disconnect drives until I pick the correct one.  The drives all appear identical to me; I imagine there is some common way to identify which drive is which that I am unaware of.  Does anyone have any pointers/tips/best practices?  Thanks!  EDIT: I had wanted this to be 'generalized' in a hand-wavy sort of way, but it just came off as 'incomplete' and 'horrible'.  My bad!


I read similar questions and have tried their suggestions but I still cannot activate my virtual environment. The hierarchy of directories is:  myproject -- virtualenv -- startvenv.sh   startvenv.sh is:  #!/bin/bash source virtualenv/bin/activate   And, I am running startvenv.sh by:  ./startvenv.sh   No error, but nothing happens. Why? Ideally, I want to open a new terminal and activate my virtual environment there.

Normally we can source ~/.bashrc file using this command  source ~/.bashrc   but if I write this in a shell script and execute it, nothing happens. Why? Is there any way to do this?  My script:  #!/bin/bash chmod a+x ~/.bashrc source ~/.bashrc   Also tried . (dot) instead of source. Same result.


What does this question mean?  Let  $(X,d)$ be a metric space. which of the following is possible? (A) $X$ has exactly $3$ dense subsets (B) $X$ has exactly $4$ dense subsets (C) $X$ has exactly $5$ dense subsets (D) $X$ has exactly $6$ dense subsets

Let $X$ be a metric space ; then which of the following is possible ?  1) $X$ has exactly $3$ dense subsets   2)  $X$ has exactly $4$ dense subsets   3)  $X$ has exactly $5$ dense subsets   4)  $X$ has exactly $6$ dense subsets   I know that if $X$ has a proper dense subset then for some $a \in X$ , we should have $X \setminus \{a\}$ is dense in $X$ and then $\{a\}$ is not open in $X$ ; but I can't relate this to no. of dense subsets except that if $X$ has only finitely many dense subsets then the topology of $X$ cannot be discrete . Please help . Thanks in advance


It happens that some students offer sex for grade.  Just considering the fact that popularity of this strategy can strongly weaken the quality of education, administrators should take some actions to avoid this.  What should a department head do to control this problem in his department?   How to punish? Who to be punished? Student or professor? Or both ?   I am not asking about legal actions or university policies or discipline matters. I just wish to know What should a head/dean do in this regard to preserve the education quality.

One of my students is an escort/stripper and she has offered me (and other faculty in my department) her "services". I am pretty sure my initial reaction of "thanks for letting me know, now can you answer the question about how to calculate the standard deviation", may not have been the best reaction. The offers have continued. My head of school is aware of the issue, and has asked if I want him to do anything.  Is the student doing anything wrong by offering her services to me? For what it is worth, prostitution is legal in the UK. Is this any different then a student telling me she works in a restaurant?  What is the correct response in a situation like this?


few years back people always define function like this way  1) function foo() {}   now i have noticed people define function like this way  2) var foo= function () {}  3) foo: function() {}  4) var GaugeBar = GaugeBar || {};    GaugeBar.generate = function (percentage) {}   so anyone JavaScript expert would tell me why people follow different approach for defining function? each signature has any special significance ?  when we should follow which one?  looking for good explanation. thanks

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


If I say that the universe is finite, how can you say with certain that I am wrong?

I thought the universe was finite, but then I read this:    And they seem to assume it is infinite. So which is it?


For example, if I close a brokerage account and move the monies to an account with a separate company, is there a reason to keep records beyond the tax year, or ?

According to the answer to this question: "", I should hold onto my taxes and supporting documents for 7 years.  Is this the right length of time?  Unfortunately, my taxes tend to be complicated, and 7 years worth of tax returns are a bit of a burden. Is the basis for this number due to statute of limitations or something else?


Is it a good idea seo point of view to give noindex or nofollow  to labels and tags?  I am creating a blog with tagging post. What is the best strategy for tag pages?

I several days ago somewhere read that category and tag pages should be noindexed. But later on somewhere else, I read that, they only increase rank for search term, but overall traffic decreases- said one from his experience.  So, if I just concern about traffic, not about individual search term that much, should I make those category and tag pages as indexed to google? I am confused which is the best to do.  Thanks in advance.  Regards Rana


Let $𝑛$, $𝑎$ and $𝑏$ be positive integers such that $𝑎𝑏 = 𝑛^2$. If $gcd(𝑎, 𝑏) = 1$, prove that there exist positive integers $𝑐$ and $𝑑$ such that $𝑎 = 𝑐^2$ and $𝑏 = 𝑑^2$.    I'm a bit lost. I know that $1 = ac + bd$, and I can simplify $ab = n^2$ to $a = \frac{n^2}{b}$ and $b = \frac{n^2}{a}$, but I don't know where to go from there. I try substituting $a$ and $b$ but cannot figure out how to get that $a = c^2$ and $b = d^2$.

Problem:  If $\gcd(a, b) = 1$ and If $ab = x^2$ ,prove that $a$, $b$ must also be perfect squares; where $a$,$b$,$x$ are in the set of natural numbers  I've come to the conclusion that $a \ne b$ and $a \ne x$ and $b \ne x$ but I guess that won't really help me.. I understand that if the $\gcd$ between two numbers if $1$ then they obviously have no common divisors but where do I go from this point?  Any tips at tackling this would be great. It looks quite easy though I'm still trying to get my hand around these proofs! Any pointers in the right direction would be great.  Thank you in advance,


What's the different between would and will? For example:     How would it be?   How will it be?   When should I use one vs the other?

which one is correct OR what is the difference between the following sentences:  I think the duration of the meeting would be two hours. I think the duration of the meeting will be two hours.


I am trying to do some feature selection in gene expression data with 22215 features. I followed the tutorial .  I initially applied filter method(ttest) to select the features having the best p values. I selected 100 features from them initially. Then I tried to apply sequential feature selection method on them with SVM classifier. However, when I do  [fs1, history] = sequentialfs(@SVM_class_fun, reducedL, yS1, 'cv', c);   it always returned me the 1st feature only. I mean in fs1 every other feature except the first one is 0. If I try to force it to give me 10 features with   [fs1, history] = sequentialfs(@SVM_class_fun, reducedL, yS1, 'cv', c, 'nfeatures', 10);   Here is my SVM_class_fun  function err = SVM_class_fun(xTrain, yTrain, xTest, yTest)   model = svmtrain(xTrain, yTrain, 'Kernel_Function', 'rbf', 'boxconstraint', 10);   err = sum(svmclassify(model, xTest) ~= yTest); end   it will give me the first 10 selected by the filter method having lowest p values.  So this mean using sequentialfs is not helpful in this case.  To let you know I have just 12 examples. So my data matrix is of dimension 12x22215. Might this be the issue?  Can anyone provide some insights?

I am trying to use sequentialfs to do some feature selection in matlab. I have huge dimensional data of 22215 features. When I tried to use sequentialfs with svm as classifier so that it selects the best subset of features, it just keeps on running, probably its because of the huge number of dimensions. However, weka does the same thing very quickly. Weka has wrapper filters and it does it so quickly. What sort of heuristic does it use? Even though I tried with 5000 features in weka since it was not taking 22215 features, it gave me results quickly with wrapper filters. What should I do with sequentialfs in matlab  This is the command I am using in matlab  c = cvpartition(yS1,'k',12); opts = statset('display','iter'); [fs, history] = sequentialfs(@SVM_class_fun, X, yS1,'cv', c, 'options', opts);  SVM_class_fun  function err = SVM_class_fun(xTrain, yTrain, xTest, yTest)   model = svmtrain(xTrain, yTrain);   err = sum(svmclassify(model, xTest) ~= yTest); end   Here the dimension of X is 100x22215 where I have 100 examples each of dimension 22215.


In reference to a , I "think" that no $2$-or-more Pythagoean triples have the same product of $A\times  B\times C$ but I don't know how to prove it.  All primitive triples are unique in their values of ABC. There are an infinite number of these products. None appear to be the same. How do I prove that, for all combinations of $m,n$,  $2m_1n_1(m_1^2-n_1^2)(m_1^2+n_1^2)\ne 2m_2n_2(m_2^2-n_2^2)(m_2^2+n_2^2)?$

I'm writing a program to search for Pythagorean triples, and I want to decrease the search-time as much as possible (obviously).  There's a method that will decrease the search-time drastically, if only it could be proven that no two Pythagorean triples will have the exact product of multiplying their terms.  For example, [3, 4, 5] and [15, 20, 25]. Indeed, 3 x 4 x 5 is not equal to 15 x 20 x 25. But could this be proven for all Pythagorean triples?


I an a total noob in D&D and just started LMoP (the Starter Set adventure).  We are now in a room before Klarg's cave (the Twin Pools, I think). One goblin escaped to tell Klarg that there's an attack coming. The book says Klarg, the Wolf, and the Goblins hide to prepare to ambush the PCs.   Now, my PCs want to suprise Klarg, the wolf, and the goblins since they deduced that there are monsters in this cave.  How does surprising work if two groups are trying to ambush/surprise one another?

Is it possible for both sides of an encounter to be surprised and if so what would happen? This is a hypothetical idea I just came up with but it made me wonder what would happen. Would the surprise for all intents and purposes cancel each other out as nobody can act on their first turn or is there some other way for things to play out. If you can provide an example in your answer so I can better understand it.


I am learning XGBoost from , but there are a few questions in the derivation of it.  In the part of Additive Training of Tree Boosting, they say we take the Taylor expansion of the loss function up to the second order in general case, but I get some questions in derivation from:  $\text{obj}^{(t)}  = \sum_{i=1}^n l(y_i, \hat{y}_i^{(t-1)} + f_t(x_i)) + \Omega(f_t) + \mathrm{constant}$  to:  $\text{obj}^{(t)} = \sum_{i=1}^n [l(y_i, \hat{y}_i^{(t-1)}) + g_i f_t(x_i) + \frac{1}{2} h_i f_t^2(x_i)] + \Omega(f_t) + \mathrm{constant}$  where the $g_i$ and $h_i$ are defined as  $\begin{split}g_i &= \partial_{\hat{y}_i^{(t-1)}} l(y_i, \hat{y}_i^{(t-1)})\\ h_i &= \partial_{\hat{y}_i^{(t-1)}}^2 l(y_i, \hat{y}_i^{(t-1)})\end{split}$   I mean I know how to make the Taylor series expanded to second order:  $f(x) = f(x_k) + (x - x_k)f^{'}(x^{k}) + \frac{1}{2!}(x-x_k)^2f^{''}(x_k) + o^n$  And I assume $f(x) = l(y_i, x)$,  $x = \hat{y}^{(t-1)} + f_t(x_i)$ and $x_k = \hat{y}^{(t-1)}$, then use $\partial\hat{y}^{(t-1)}$  in the Talyor series, so we get the right result as mentioned above.  But I don't know that is a right derivation or not and even if it is right, I still feel it is hard to understand why they choose to expand it in this way.   I would appreciate it if anyone could help me.

This is the objective function for Xgboost.  I have no idea where $g_{i}$ and $h_{i}$ came from  is some one explain how this two terms came form?  or direct me to the related tutorial page then I will search for it


find /home/karl/dev/beer/ -printf "%P\n" | tar --exclude='./.git' -czf beer.tgz --no-recursion -C /home/karl/dev/beer/ -T -   The command still includes the .git directory.

A client uploads files to a development server. When it's time to upload the project to a production server, those files are no longer needed, and we'd like to exclude them from the tar file we'll eventually push to production. However, we still want to keep the directory in tact, it's only the files that are not needed  Using Ubuntu 16 and tar 1.28, we've tried:  tar -vczf archive.tar.gz . --exclude=wp-content/uploads/wpallimport/files/* tar: Cowardly refusing to create an empty archive   We've also tried enclosing exclude= parameter in single and double quotations, no luck.   tar -vczf archive.tar.gz . --exclude='wp-content/uploads/wpallimport/files/*' tar: Cowardly refusing to create an empty archive   The  shows --exclude without equals sign  tar -vczf file.tar.gz --exclude 'directory/*' . and gives the same error.  How is this done?


How can I stop the interval using the same button I used to start the interval?    function slideShow() {    'use strict';     var pics = ['IMG_2135.jpg', 'IMG_2125.jpg', 'IMG_2119.jpg', 'IMG_2118.jpg'];     var output = document.getElementById('output');     output = pics[Math.floor(Math.random() * pics.length)];     document.getElementById('image').src = output; }  button.onclick = function () { setInterval(slideShow, 2000); }

I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event?   I want the user to be able to stop the repeated refresh of data.


Will I have issues re-entering the UK for Christmas, after being on a Tier 2 visa three months prior?   I lived in the UK throughout 2017 with a Tier 2 visa until deciding to ask for a transfer back to NZ with my company. My last day of work was mid-Sept/17 and I left the UK to NZ the next day. I started work the next week. I previously had 2 UK visa before this, never overstayed, never had a visa rejected.   I promised my friend that I'd celebrate Christmas with her and her husband in London so I booked a week-long ticket from 24th to Jan 1st. I heard stories from other Kiwis about being denied at the border so I want to be fully-prepared. These are the documents I'm planning on bringing:   Flight Itinerary + Receipt Invoice (Inbound and Return) Hotel Booking + Receipts Heathrow Train Booking Receipt Letter of Resignation from UK Employer + confirmation that they'll cancel my visa;   Letter of Employment from NZ Employer NZ Bank Statements NZ Rental Application   Nothing left in the UK apart from a bank account - still have my BRP but will leave that home.   I also tried to apply for Standard Visa online but for some reason, I can't do so using my name / date of birth which worries me.

I lived in the UK for 1 year on a student visa, and then for 3 years on a Tier 2 dependent (spouse) visa. That visa expires shortly and I am not planning to stay in UK, although I will have to go back there for a few weeks.   Can I go back as a tourist? I have an Israeli passport and normally would not require a visa. I read that, in such cases, an immigration officer might not let you in.


what's the biggest integer that can not be made up by 6, 9, and 20?  for example, 35 can be expressed as 35 = 20 + 9 + 6 46 can be expressed as 46 = 20 * 2 + 6; 27 can be expressed as 27 = 9 * 3 or 27 = 6 * 3 + 9  so, what's the biggest integer that can not be made up by 6, 9, and 20?

Started with an algorithms problem which says item is sold in 3 different sizes of boxes. These 3 boxes have 6, 9, 20 items each. Input is n, figure out if you can buy exactly n items.   It got me thinking that there is a number m, if n >= m then you always can buy n items. If you generalize number of items in a box into s1 s2 s3 ... sy, number of boxes to buy into k1 k2 k3 ... ky, number of items you want to buy into n.  k1*s1 + k2*s2 + ... + ky*sy = n  How do I find the value m, if n >= m there's always gonna be k1, k2, ..., ky which satisfies above equation. So that the algorithm can say yes you can without doing anything if n is large enough.


here is the following program about increasing d retain count value of a NSString type variable in interface part I have declared  @property (strong,nonatomic)NSString *str1; @property (strong, nonatomic)NSString *str2; -(IBAction)goBtn:(id)sender;   and ind implementation part I have defined following  - (IBAction)goBtn:(id)sender {    self.str1=[[NSString alloc]init];    self.str1=self.str2;    self.str2=[self.str1 retain];    self.str2=[[NSString alloc]init];    self.str2=self.str1;    self.str1=[self.str2 retain];    self.str2=[self.str1 retain];    NSLog(@"retain count is %i", self.str1.retainCount);    NSLog(@"retain count of str2 is %i", self.str2.retainCount); }   but the output is  retain count is 0  retain count of str2 is 0  why is this happening?? is there anything wrong in codes???

I have the following example class:  Test.h:  @interface Test : UIButton {     NSString *value; } - (id)initWithValue:(NSString *)newValue; @property(copy) NSString *value;   Test.m:  @implementation Test @synthesize value; - (id)initWithValue:(NSString *)newValue {     [super init];        NSLog(@"before nil value has retain count of %d", [value retainCount]);     value = nil;     NSLog(@"on nil value has retain count of %d", [value retainCount]);     value = newValue;     NSLog(@"after init value has retain count of %d", [value retainCount]);     return self; }   Which produces the following output:  2008-12-31 09:31:41.755 Concentration[18604:20b] before nil value has retain count of 0 2008-12-31 09:31:41.756 Concentration[18604:20b] on nil value has retain count of 0 2008-12-31 09:31:41.757 Concentration[18604:20b] after init value has retain count of 2147483647   I am calling it like:  Test *test = [[Test alloc] initWithValue:@"some text"];   Shouldn't value have a retain count of 1?  What am I missing?    Thanks for your help.


How can I prove that $\gcd(a, b) = \gcd (a, b + ma)$?  I have tried this:  let $g = \gcd(a, b)$, then $g \mid a$ and $g \mid b$. This means that $g \mid ax+by$.  I don't know what to do next.  Thanks.

I know that $\gcd(a,b)$ divides $a$ and $b$, and must also then divide $(a)(t)$ ($t$ being some integer).  This makes sense to me, but how do I prove it?  It seems that the addition of $(a)(t)$ is a continuation of the linear combination of $\gcd(a,b) = av + bu$ for some $v$, $u$ being elements of $\mathbb{Z}$.    Any help?


I want to upgrade to windows 10 64-bit from windows 7 64-bit, but I saw on the Windows 10 that I require 3:CMPXCHG16b, PrefetchW, and LAHF/SAHF. So I want to know if I have this, and can I upgrade my PC?    My PC:   Intel Core i3-2100 CPU 3.10 GHz   4 GB RAM

I'm currently trying to find out whether or not it would be a good idea to update my slightly dated notebook (Windows 7, 64-bit) to Windows 10. The problem is that Microsoft states in their  that to use the 64-bit version of Windows 10, a processor which supports CMPXCHG16b, PrefetchW and LAHF/SAHF is needed. I know that my processor is 64-bit (Intel Core i5-2430M @ 2.40 GHz) but I don't know how to find out whether it supports CMPXCHG16b, PrefetchW and LAHF/SAHF, and I have no idea what these mean.  I tried using Google and got no results that made sense to me, only some comparison of my i5 and a similar AMD processor. I also checked Intel's ARK website. If somebody could point me to where I can get more info I would be really grateful.


Let $A$ be a commutative ring with an identity element $1$. An element $x$ in an $A$-module $M$ is called cyclic if $Ax=M$. An $A$-module which has a cyclic element is called cyclic $A$-module.  Let $M_{1},M_{2}$ be cyclic $A$-modules and  $I_{1},I_{2}$ annihilators of $M_{1},M_{2}$ respectively: $$ I_{k}=\{ a \in A \mid ax=0\ (\forall x \in M_{k}) \} \ \ \ (k=1,2). $$ Prove that a necessary and sufficient condition for  the direct sum $M_{1} \oplus M_{2}$ to be a cyclic $A$-module is that $I_{1}+I_{2}=A$.  My attempt:  "$\Longrightarrow$": We know that $$M_{1} \oplus M_{2} \simeq M_1\times M_2 \simeq A/I_1 \times A/I_2 \simeq A/(I_1 \cap I_2).$$ Since $A/(I_1 \cap I_2)$ is a cyclic $A$-module with a cyclic element $1+I_1 \cap I_2$, we must have $M_{1} \oplus M_{2}$ is cyclic. But it seems that condition  $I_{1}+I_{2}=A$ is not necessary?  "$\Longleftarrow$": Assume that $M_{1} \oplus M_{2}$ is cyclic then  $$M_{1} \oplus M_{2} \simeq A/\rm{Ann}(M_1 + M_2) \simeq A/(I_1 \cap I_2).$$ I know that if $M_{1} \oplus M_{2} \simeq A/I_1I_2$ then $I_1 \cap I_2 =I_1I_2$ forcing $I_{1}+I_{2}=A$. But how can I prove that?  Any help would be much appreciated.

So as seen on this question , we know that if $(n,m) \neq 1$, then $\mathbb{Z} /mn \mathbb{Z} \ncong \mathbb{Z}/n\mathbb{Z} \times \mathbb{Z}/m\mathbb{Z}$, because the right hand side does not have an element of order $nm$.  But take a more general setting. Let $R$ be a commutative ring, and let $A,B$ be ideals in $R$. $A$ and $B$ are said to be comaximal if $A+B=R$. If $A, B$ are comaximal, then we have: $R/AB \cong R/A \times R/B$. In this setup, is the converse true?      If we have $A, B$ ideals in $R$ such that $R/AB \cong R/A \times R/B$, do we always have that $A$ and $B$ are comaximal?


I have very limited knowledge of any of this (read: none), but have wondered this for a number of years:  What would happen if one were to shoot a single photon at a piece of half transparent / half mirror glass that was angled at a 45 degree angle.  Assuming everything was done in vacume like conditions, the glass was EXACTLY 1/2 transparent, the angle was exactly 45 degrees, etc.  Would the photon pass through or would it be deflected?  I appoligze if this is not 'how things work', but you can see where I am going with this.

Yesterday I read that we can affect the path and the 'form' (particle or wave) of a photon after the fact ().  Part of what is puzzling me is the beam-splitter. Are the individual photons actually being split into two new photons of lesser energy?  This  implies that you cannot split a photon but it seems that beam splitters do exactly that.


I have a sample of 197 responses. 8.6% (17)are from Group A, the remainder from Group B. (The groups are mutually exclusive, and not independent). (If it helps visualize the issue, Group A is under 10's, Group B respondents aged 11+.)  The responses are then sorted in to groups by type. Type 1 is "head injuries", and there are 3 members of this group. 2 are from Group B, 1 is from Group A.  I would expect the results for head injuries to be under 10 (Group A) & head injury: 0.3 Under 10 & no head injury: 16.7 Over 10 (Group B) & head injury: 2.7 Over 10 & no head injury: 179.3  I have asked a few friends how to test if the expected value being so much lower than the observed value is significant. So far responses seem to favour a Z test, or a chi squared test with a correction for very small numbers. I'm innumerate in the extreme, but can manage either well enough -- just not sure what is the appropriate test here?

I have two sample populations, A, and B, which are independent.               A    B Ethnicity_1  1    2 Ethnicity_2  3    0 Ethnicity_4  1    0 Ethnicity_5  3    8 Ethnicity_6  15   12   In order to work out whether there is a statistically significant difference between the makeup of the samples (with a null hypothesis assuming that the two samples are the same), is the correct test to perform a chi-squared contingency table:  scipy.stats.chi2_contingency   Or, given the sizes are small, is a Fisher's exact test more appropriate - as it appears Fisher's exact test in scipy can't support bigger tables than 2x2.


I want to convert string to byte array like below:   If I have a string:  String str = "0x61";   I want it as:  byte[] byteArray = {0x61};   Any idea?

I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array.  I couldn't have phrased it better than the person that posted .  But to keep it original, I'll phrase it my own way: suppose I have a string "00A0BF" that I would like interpreted as the  byte[] {0x00,0xA0,0xBf}   what should I do?  I am a Java novice and ended up using BigInteger and watching out for leading hex zeros. But I think it is ugly and I am sure I am missing something simple.


I am hearing a lot about probabilistic programming.  Turns out its just a way to specify probabilistic graphical models.  Like Tensorflow is to neural networks.  So, why use it? Do you know of any place where it has been useful?

For the past year, I've been hearing a lot about Probabilistic Programming (PP) frameworks like  and , and how great PP is. And today, someone shared this link with me:    However, I don't really follow what is special about it since it feels like whatever you can do in PP you can do in any other general purpose language. I'm sure there are technical aspects about PP that make it attractive (e.g. parallel computing), but this aside, is PP really any different from any other language?  Question: I was wondering if there was a consensus of what PP was and how it differs from other statistical-focused software like R, Matlab, Mathematica. It should be noted that PyMC3 and Stan are focused on more Bayesian analysis.  Doing a little research on Google, I came across the following two definitions. The first more abstract, and the second more about PP's technical characteristics.     1.2. Probabilistic Programming Is      Instead, probabilistic programming is a tool for statistical modeling. The idea is to borrow lessons from the world of programming languages and apply them to the problems of designing and using statistical models. Experts construct statistical models already—by hand, in mathematical notation on paper—but it's an expert-only process that's hard to support with mechanical reasoning. The key insight in PP is that statistical modeling can, when you do it enough, start to feel a lot like programming. If we make the leap and actually use a real language for our modeling, many new tools become feasible. We can start to automate the tasks that used to justify writing a paper for each instance.      Here's a second definition: a probabilistic programming language is an ordinary programming language with rand and a great big pile of related tools that help you understand the program's statistical behavior.      Both of these definitions are accurate. They just emphasize different angles on the same core idea. Which one makes sense to you will depend on what you want to use PP for. But don't get distracted by the fact that PPL programs look a lot like ordinary software implementations, where the goal is to run the program and get some kind of output. The goal in PP is analysis, not execution (added emphasis).   --   I'd like to know if the general statistical community agrees with these two definitions of PP, and if there are any other characteristics this definition may be missing.


When I tried to install Ubuntu by using a flashdrive on windows, I didn't get a dual installation option. I could either replace windows, or click something else. So I clicked something else, and made the partitions. However when I tried restarting the computer wouldn't load Ubuntu. It was just stuck on a black screen. So when I did a hard shutdown and restart, it took me back to the original installations screen. When I ran through all the steps again, I got the option of replacing Ubuntu with Ubuntu. I tried that and got the same results. Came back to the installation screen. I decides to try installing Ubuntu alongside Ubuntu. That didn't work either. Now the only options are too delete everything on the hard drive and install Ubuntu or something else. So now I have two copies of Ubuntu and (hopefully) one copy of windows. How can I get both of them (one of each) to run on the same machine from this point.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I searched many articles to understand the concept of namespace? But I could not understand. Can anyone explain the concept of namespace with simple example? Why do we import namespace?

Where or when would one would use namespace aliasing like  using someOtherName =  System.Timers.Timer;  It seems to me that it would just add more confusion to understanding the language.


I'm attempting to display a dropdown box of available fields based on a supplied content type. I'd like to retrieve these fields programmatically.  I'm able to get a list of available fields based on a node like so  $fields = array_keys($thisnode->getFields());   But I want to be able to get the fields based on a content type not based on a specific node.   I did see that it could be accomplished in Drupal 7 like so   $fields = field_info_instances('node', 'content-type');   based on an answer here   However it seems like field_info_instances is not available in Drupal 8. I attempted using it and it said that the method is unavailable. Is there a method similar to field_info_instances in Drupal 8 that I can use to retrieve the fields of a specified content type?

In Drupal 7, to get all fields used in a content type, I use the following code. $fields = field_info_instances('node', 'article');  What is the equivalent for Drupal 8?


I could not find answer for my question on the net, so that's why I'm here.  I want to print a number with specified number of digits example in java:  Length = 10  1.123456789      ==> 1.123456789  123.123456789    ==> 123.1234567  123456.123456789 ==> 123456.1234

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


With the standard notations, what's $|Z(Sym(n))|$ equal to, in terms of $n$?

Find the center of the symmetry group $S_n$.   Attempt:  By definition, the center is $Z(S_n) = \{ a \in S_n : ag = ga \forall\  g \in S_n\}$. Then we know the identity $e$ is in $S_n$ since there is always the trivial permutation. Suppose $a$ is in $S_n$, but not equal to identity. Now we can imagine the permutation as bijective function that maps from $\{1,2,\dotsc,n\}$ to $\{1,2,\dotsc,n\}$.  So suppose $p$ is a permutation map. Then $p$ maps from a location $i$ to a location $j$. Take $p(i) = j$ where $i\neq j$. Let $k$ be in $\{1,2,\dotsc,n\}$, where $k$, $i$ and $j$ are all different elements. The cycle $r = (jk)$, then we will see if this commutes.  $rp(i) = rj$    Can someone please help me, I am stuck?  Thank you.


A typical confusion matrix from R's caret package might look like this:    > confusionMatrix(pred_gbm, vowel.test$y)    Confusion Matrix and Statistics            Reference Prediction  1  2  3  4  5  6  7  8  9 10 11         1  33  1  0  0  0  0  0  0  0  4  0         2   8 23  3  0  0  0  2  0  1 16  1         3   1 14 31  3  0  0  0  0  0  0  0         4   0  0  2 31  3  1  0  0  0  0  2         5   0  0  0  0 17  7  9  0  0  0  0         6   0  0  6  8 16 23  3  0  0  0  4         7   0  0  0  0  3  0 27  7  5  0  3         8   0  0  0  0  0  0  0 29  5  0  0         9   0  4  0  0  0  0  1  6 24  2 13         10  0  0  0  0  0  0  0  0  2 20  0         11  0  0  0  0  3 11  0  0  5  0 19  Overall Statistics                 Accuracy : 0.5996                            95% CI : (0.5533, 0.6446)     No Information Rate : 0.0909               P-Value [Acc > NIR] : < 2.2e-16                           Kappa : 0.5595            Mcnemar's Test P-Value : NA                 In the above output, we have some statistics that explain the classification accuracy, like a 95% CI and a p-value, etc. How do I interpret the p-value and confidence interval to understand how good the classification is?

In the  in the caret package, the p-value is described as:     a one-sided test to see if the accuracy is better than the "no information   rate," which is taken to be the largest class percentage in the data.   But what precisely is "a one sided test" here? I am assuming some p-value test between the accuracy and NIR. Specifically, what does "better than the NIR" mean?  Moreover, am I correct to assume that "the largest class percentage in the data" could be computed as number of tuples with most common class label / total number of tuples?


I am not sure about this but these are my current thoughts. X.org is an implementation of the X11 protocol and X11 is just a protocol and not a piece of software. My question is that is Wayland a completely new protocol that aims to completely replace X11 or is it supposed to replace X.org and implement X11? I am relatively new to display managers and WMs so I may need to clear some misconceptions!

I was looking for a lightweight X server, but failed to find one. Then I found out about Wayland. I says that it aims to coexist with X, but can run standalone.  When I try to compile it, it needs Mesa, which needs X.  What exactly is Wayland?


I have a requirement where I need to create two triggers inside a managed package. So, when the package is installed, the admin has a choice to either use the default objects available in the package or configure 2 different objects for further process. I have to create two triggers that will work on either case (either the admin chooses to go with default objects or admin chooses two of it's own SObjects). I want my trigger to work either way. How can I achieve this?

I have a requirement to create triggers dynamically after a managed package is installed. I have read that the tooling API can be used to create triggers dynamically however it cannot be used in production. Is it possible to create triggers from a managed package in an org? I want to be able to create the trigger based on some user inputs.


function t() {     var x = 1;     if(true)     {         var x = 2;         alert(x);     }     alert(x); } t();   Anyone knows the reason?

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?


Trying to self teach a bit about autocorrelation.  For a simple sine wave, I am surprised that the acf() function in R outputs a curve that converges to 0.  From my understanding, the autocorrelation function would rebound to 1 for each period of the wave, as in my attempt to manually calculate acf.  Picture and code are below.  My basic question is: How does acf() compute autocorrelation?  This will help me figure out how my interpretation of what autocorrelation is, is wrong!    par(mfrow=c(2,2)) x = seq(0,50,0.01) y = 5*sin(x) plot(x,y,pch=19,main="y = 5*sin(x)") acf(y,lag=length(y),main="R FUNCTION: acf(y)")  #My calculation of ACF y1 = rep(0,length(y)+1) for (i in 0:length(y)){ y1[i+1] = cor(y[1:(length(y)-i)],y[(1+i):length(y)]) } plot(x,y,pch=19,main="y = 5*sin(x)") plot(x[1:5000],y1[1:5000],pch=19,main="My attempt to calculate acf(y)")

acf(c(0,1,2,3,4,5),plot=FALSE) Autocorrelations of series ‘c(0, 1, 2, 3, 4, 5)’, by lag       0      1      2      3      4      5   1.000  0.500  0.057 -0.271 -0.429 -0.357    Why does the ACF output becomes negative as lag increases? My understanding is that no matter what the lag is, the series is in general increasing. Therefore the auto-correlation should be positive. For example, at lag 2, we are calculating the correlation function of the two series [0,1,2,3] and [2,3,4,5], where the positive correlation still holds. Where do I get this wrong?  Update  Here is my intuitive understanding of the acf of an monotonically increasing sequence:  ACF of a sequence is a function $\gamma(k)$ of the lag, k. By definition, this function indeed measures the correlation between $y_t$ and $y_{t-k}$. The misunderstanding comes from the understanding of correlation. A monotonically increasing sequence is not stationary, so the mean is not stable. In another word, the sequence does not exhibit mean reverting behavior. This distorts my usual understanding of correlation (when we think about the mean level at 0). Since the mean increases over time, those observations come earlier are more likely to be lower than the sample mean, thus inducing a negative sample acf when lag is larger.


I left the UK voluntarily last year and have been given notice that I am not allowed to renter the UK for another 2-5 years.   However, nothing is mentioned about Ireland. I have a couple of friends and family in Ireland and I'm hoping to visit them this year, would I be able to seeing as I’m not allowed in the UK?   Additionally,  Would I still be denied entry if I applied for a student or work visa to either Ireland or the UK?  When I signed the documents to leave the UK it was against my will (my parents decision) and so as a result my education is still in complete. Would there be any other way to carry my A levels as per English curriculum seeing as I’m prohibited from entering the UK?

I was issued a 10-year ban by the UK 4 years ago. Unfortunately, I answered no to the question of 'Have you been refused a UK visa before?' . It was a genuine error on my part when I was filling out the online visa form as I have gotten several UK visas even after refusals before.   Is there any likelihood of getting a UK visitor visa if I reapply? Or what can I do to overturn the ban? Can the UK ban affect my getting an Irish tourist visa in any way?


I am a little bit confused which Ubuntu to install on my pc. I used 16.04 before and I was satisfied, but now I checked the Ubuntu page and there were 2 versions available there, Ubuntu 16.04.3 LTS and Ubuntu 17.10.1? Which one do you guys suggest?

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


I'm creating a shell script that will allow a back functionality on my shell. What would be a good way to change the terminal's directory in the script.  Just running something like this in my back.sh file doesn't work:  cd /   Even when I run the file like  source ./back.sh   A sample file that is not working properly:  #!/bin/bash  cd ~/Movies/   when I run source ./back.sh or source back.sh

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


I received an e-visa for a two-month period from a UAE company but I could not travel because I had an ECR passport. I now have an ENCR passport, which has a new number.  Does the company need to change the visa since it shows the old passport number?

I need a visa to travel to UAE. My passport will expire soon (June), so today I applied for a new passport and it will be delivered to me on March 17. I need to travel to Dubai on March 18. clearly not enough time to get a visa for the new passport.  Can I send a scan of my old passport to the agency who's getting the visa for me, get a visa with the old passport number on it and then travel with both passports to Dubai? My new passport to satisfy their 6 months validity requirement and the old passport to match the passport number?


I want to create a long document that has environments for 1) problems, 2) solutions, 3) commentary.  I would like to be able to easily create the associated pdf that includes, for example, all problems and solutions, but which omits all commentary.  Is there a simple way to exclude everything that occurs within a certain environment?

I'm working on a large document which contains several figures. Due to the figures it takes a long time to compile.   I would like to comment out all the figures while I'm working and then put them back in at the end. To do this, I added something like   \renewenvironment{figure}{\begin{comment}}{\end{comment}}  which I could then comment out when needed. However, this just doesn't work and gives all sorts of problems. Specifically, I tried to compile this -   \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{comment} %\renewenvironment{figure}{\begin{comment}}{\end{comment}} \begin{document} \begin{figure} \begin{center} \includegraphics{image.png} \end{center} \end{figure} \end{document}   With the % everything compiled perfectly. If I remove the %, I get an error  Excluding 'comment' comment.) Runaway argument? ! File ended while scanning use of \next.


I know that every simply connected open subset of $\mathbb R^2$ is homeomorphic with $\mathbb R^2$ . My question is : Is every simply connected subset of $\mathbb R^2$ contractible ?  Remark : By simply connected I mean path connected with trivial fundamental group .

The standard counter example to the claim that a simply connected space might be contractible is a sphere $S^n$, with $n > 1$, which is simply connected but not contractible. Suppose that I were interested in a counter example in the plane - does anyone know of a subset of $R^2$ which is simply connected but not contractible?


I've been trying to install Android developer tools on Eclipse, and I followed the information in .  Like the video said, I added the following two lines of code to the .bashrc file:  export PATH=$(PATH):-/android-sdk/tools/ export PATH=$(PATH):-/android-sdk/platform-tools/   It seems, however, that this did not help me to install the Android files on Eclipse, as I am still having problems with that. What's more, it seems that I can't make any command in the terminal without getting a major error now! Every time I try to make a command in the terminal I get the following message:     The command could not be located because '/usr/bin' is not included in   the PATH environment variable.   Is there away to restore .bashrc to its default?

The terminal shows this when it opens:  bash: /home/atlas/.bashrc: line 73: syntax error near unexpected token `[' bash: /home/atlas/.bashrc: line 73: `if [ -x /usr/bin/dircolors ] ; then '   I've tried to fix it using:  cp /ect/skel/.bashrc ~/   And I get this:  cp: cannot stat `/ect/skel/.bashrc': No such file or directory   I'm unsure of why this is doing this and how to fix it. I had previously been in the .bashrc file messing around and apparently I've messed something up. All I want to do is to restore the .bashrc file to default settings.


The following code was more unpredictable than I had expected.  Test case 1:  # Line with print is OK:  y4 = 0      def G6():     print(f"y4={y4}")  G6()   Output: y4=0  Test case 2:  # Line with print throws error this time: # UnboundLocalError: local variable 'y5' referenced before assignment # But why exactly? If y5 is a local variable, then y4 (above) should be too, IMO. # Is y4 (above) even a local variable? Is y4 (above) also being referenced before assignment, or not?  y5 = 0      def G7():     print(f"y5={y5}")     y5 += 2  G7()   Output on the line print(): UnboundLocalError: local variable 'y5' referenced before assignment  Can this python behavior be rationalized?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I had new wooden decking installed on my balcony. The guy that did the job says it doesn't need stain because the wood is already treated:   He said to sand and stain it in two years time, but I was wondering if I stain it now maybe it will last more than two years? I live in London so, as you probably know, it rains A LOT. Wood is a very poor choice, but I can't change it because of the rules in my apartment lease.

My husband is installing a new deck with pressure-treated lumber at our home in Tennessee.   How long does he need to wait to paint, or should he stain the deck now?


Let $t$ be a real number such that $\sin \dfrac{t}{2}\neq 0$.  Show that $$\sum ^{n}_{k=1}\sin kt=\dfrac{\cos\dfrac{t}{2}-\cos \left( n+\dfrac{1}{2}\right) t}{2\sin \dfrac{t}{2}}$$ for every positive $n$. What method should I use?  Any explanation is much appreciated.

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


Define $-S = \{-x \mid x \in S\}$ Prove $\sup(-S) = -\inf(S)$ and $\inf(-S) = - \sup(S)$, with $S$ bounded both sides  Can someone help me with this, i dont get this type of more "complex" inf and sup excersises, detailed explanation would be appreciated, thanks alot !

Let $A$ be a nonempty set of real numbers which is bounded below. Let $-A$ be the set of all numbers $-x$, where $x \in A$. Prove that $\inf A = -\sup(-A)$.   We know that $-A$ is bounded above. Hence $\sup(-A)$ exists. So to proceed, one would show that $\inf A \leq -\sup(-A)$ and $\inf A \geq -\sup(-A)$? Or $-\inf A > \sup(-A)$ and $-\inf A < \sup(-A)$.  I get the sense that one can use the following fact as well: (i) Let $\alpha = \sup S$. If $\beta < \alpha$ then $\beta$ is not an upper bound for $S$.


I was just wondering if you could view the photos you take with the camera?

The camera in Far Cry 3 is useful for tagging enemies from a distance but also includes the ability to take pictures.  This does not seem to do anything useful when used on animals or enemies.  Is there a purpose?


Basically, I have a form where people can enter stuff in, and there is one part where they input an email address. Sometimes, people just put in their name and don't put an actual email address. Sometimes they do not fill it out at all.  Is there any easy way to check to see if the string has an @ symbol in it and check to see if its Null?   Any help is appreciated

In Java is there a way to check the condition:  "Does this single character appear at all in string x"  without using a loop?


We have a SAAS based product with big vision & currently we are rebranding our product model. Is it the best SEO practice if i am going to use my Brand Name in my URL's of the main pages? Eg:        "example=My Brand Name"  Which one will be the best URL structure towards my TG?

Let’s take an example of a movie site. So a well structured set of URLs for this site can be:     Movie page - example.com/movies/the-matrix Review for movie - example.com/movies/the-matrix/reviews Trailers for movie - example.com/movies/the-matrix/trailers Specific trailer for movie - example.com/movies/the-matrix/trailers/trailer1   where it’s possible to navigate the resource even by directly deleting/appending resource name seamlessly.  For SEO purpose I read somewhere that for two given pages, Google will prefer the page which have search query up in the URL hierarchy among other things. So for the given 2 URLs and the query "the matrix trailer"    example.com/movies/the-matrix/trailers example.org/trailers/the-matrix/    `     Google might prefer the second URL as it has the keyword "trailer" at first level comparing to first URL which has "trailer" at 3rd level (a resource deeper in URL hierarchy may be less important).    If it is correct, one may be tempted to create URL hierarchy somewhat like      Movie page - example.com/movies/the-matrix Review for movie - example.com/reviews/the-matrix/ Trailers for movie - example.com/trailers/the-matrix/ Specific trailer for movie - example.com/trailers/the-matrix/trailer1     which will break the seamless hierarchy.    My questions are:   Is it true that resource deeper in URL hierarchy is tend to be less important when comparing to URLs of other site?   Is sacrificing meaningful, seamless hierarchy worth for this SEO optimization?


Why is this command not working?  echo 'foo bar' | xargs -I % -L 1 echo yeah % yeah   It produces the following output:  yeah % yeah foo yeah % yeah bar   While I expected the following output:  yeah foo yeah yeah bar yeah

This works as expected:  $ echo a b c | xargs --replace="{}" echo x "{}" y x a b c y   This does too:  $ echo a b c | xargs --max-args=1 echo x x a x b x c   But this doesn't work as expected:  $ echo a b c | xargs --max-args=1 --replace="{}" echo x "{}" y x a b c y   And neither does this:  $ echo a b c | xargs --delimiter=' ' --max-args=1 --replace="{}" echo x "{}" y x a y x b y x c  y   I expected this output:  x a y x b y x c y   As a workaround, I am using printf and two xargs, but that is ugly:  $ echo a b c | xargs printf '%s\0' | \ > xargs --null --max-args=1 --replace="{}" echo x "{}" y x a y x b y x c y   Any idea why this is happening?


Basically, I have a blank page, I inserted the subsection title and underneath I want to add a sideways figure.   \subsection{Findings} \begin{sidewaysfigure} \centering \includegraphics[scale = 0.2]{hi.pdf} \captionof{figure}{picture1}  \label{123} \end{sidewaysfigure}   However, the problem is that I managed to get subsection title printed on one page, but the sideways figure is always on the another page. Is it possible make them appear on the same page ?

I am trying to get a big table in the Appendix, directly below the chapter title.   Sidewaystable from the rotating package works, since it nicely rotates the entire table, including caption and footnotes.   After searching a while, I found that the floatrow package adds the [H] option to the sidewaystable-environment, such that it can be forced to be placed at a specific location.   However, when adding that option to the table below the chapter title, not the table is sitting below the title but the title slides down and sits above the table. In result, an additional blank page is left before the title.  Moreover, the title is below a header, which I was unable to remove through \thispagestyle{empty}. I have added a minimal working example below.   Is there a way to move the table up instead of the title down, in order to fix (i) the empty page and (ii) the header occurrence?  \documentclass[openright]{scrbook} \usepackage{booktabs} \usepackage{rotating} \usepackage{floatrow}  \begin{document} \chapter{Appendix} \begin{sidewaystable}[H] \caption{Experimental settings.} \begin{tabular}{lccc} \toprule  Test & Yes & No & Yes \tabularnewline \midrule 1  & 2 & 3 & 4\footnote{This is absolutely necessary information with reference to 4.}                    \tabularnewline \bottomrule \end{tabular} \label{table_exp_settings} \end{sidewaystable} \thispagestyle{empty} \end{document}


So in the season 6 finale of Game of Thrones,       Arya Stark finally gets her revenge on Walder Frey and kills him after disguising herself with a face from the Hall of Faces.   I suppose if she is not a member of the Faceless Men, then it can be assumed the face was stolen. But my question is, if she is now a member (as I think the show suggests), why is she allowed to kill her enemy? If she is supposed to be No One, she should not have such an enemy. More importantly, they seem pretty strict about who you can and cannot kill, so why would she be allowed to do this?  I realize there is a  already, but I am less interested in the how/why of her using faces, and more with her being allowed to kill for revenge in the first place, and "stealing a life" from the many-faced god.  From the :     [the Faceless Men] feel that they are only helping to carry out Death's will, and cannot choose their own targets (for personal reasons, such as revenge): they can only target those whom death has selected - the targets of assassination contracts they have accepted.

Per my understanding, once Arya Stark killed the Waif in  S06E08 ("No One") she came to Jaqen H'ghar and finally admits that,     A girl is Arya Stark of Winterfell. And I'm going home.   So she seems to renounce any ties with the Faceless Men and to have found her real self back again, after a time of confusion about herself and her legacy, to Jaqen's apparent satisfaction.  Then in S06E10 ("The Winds of Winter"), how is she able to still use the faces      when killing Walder Frey?   I thought this magic is only reserved to the Faceless Men who truly became No One. Arya, though, is someone and is done with the Many-Faced God, yet she still can use the faces at her apparent disposal (without even being near the "face storage" in Braavos). Why/how?  This might be based on a lack of understanding from my side about how this "face magic" actually works. Is it just an accquired skill that you can then use however you want (maybe only requiring some "willing" corpse to provide its face)? Or is it tied to other requirements that Arya already fulfills, albeit not belonging to the Many-Faced God anymore? Or does she maybe even still belong to the Faceless Men somehow? Or is she using the faces "illegaly" as she did before?