How to solve $\int_{-\pi/4}^{\pi/4}\left(\cos{x}-\sqrt{1+x^2}\sin^2{x}\cos^2{x} \right)dx$?

I have the following definite integral $$\int_{-\pi/4}^{\pi/4}\left(\cos{x}-\sqrt{1+x^2}\sin^2{x}\cos^2{x} \right)dx$$ and five options: a) $0$ b) $\sqrt2$ c) $\sqrt 2 -1$ d) $\frac{\sqrt 2-1}{2}$ e) $\sqrt 2-\frac{1}{4}$ I tried to solve the integral, but I'm affraid I have lost a lot of practice and haven't succeeded. I have also tried to deduce its solution using other arguments. For example, since the integral of the cosine is already $\sqrt2$, I discard the option b), as the second summand of the integrand is even and positive for any $x$. However, I haven't been able to discard other options using similar arguments. Any help would be appreciated.


In comics does Batman have a rule against killing?

Inspired by  question, I have to admit I don't know a lot about the Comic Book Batman, but I know a fair amount about his other incarnations.   I know for example, that the 1989 movie had him kill the Joker. He vehemently wanted the Joker dead and had no compunctions about taking a life. I also know that he had a rule against killing in The Animated Series that he never broke, and that he very nearly broke it in Batman Beyond.  But as far as the comic books go, when did Batman develop a rule against killing his foes? Does he ever kill them rather than deliver them to the proper authorities?


Most efficient way of purging of 10TB data from SAN?

I want to purge storage data from SAN which accumulates to 10 TB. The OS is linux. The storage is mounted as mount-points on a system for which it is visible I was recommended by a friend to use winscp But I don't think the tool is efficient to such an extent.   I appreciate if you can be recommended a tool or command which can help me perform this job.


Why does the value produced is float and not integer?

I have declared at line 1-3 for the value to be in integer. But when running the code, it'll give me float value instead of integer unless I declare it: total = int(group_3 + group_2 + group_1) Is this because of Modulo? If so, any idea why? a = int(input()) b = int(input()) c = int(input())          group_1 = (((a % 2) + a) / 2) group_2 = (((b % 2) + b) / 2) group_3 = (((c % 2) + c) / 2)          total = (group_3 + group_2 + group_1) print(type(total)) print(total)


Is the R language reliable for the field of economics?

I am a graduate student in economics who recently converted to R from other very well-known statistical packages (I was using SPSS mainly). My little problem at the moment is that I am the only R user in my class. My classmates use Stata and Gauss and one of my professors even said that R is perfect for engineering, but not for economics. He said that many packages are built by people who know a lot about programming, but not much about economics and therefore are not reliable. He also mentioned the fact that since no money is actually involved in building an R package, there is therefore no incentive to do it correctly (unlike in Stata for example) and that he used R for a time and got some "ridiculous" results in his attempts to estimate some stuff. Moreover, he complained about he random number generator in R which he said was "messy".  I've been using R for just a little more than a month and I must say I have fallen in love with it. All this stuff I am hearing from my professor is just discouraging me.  So my question is: "Is R reliable for the field of economics?".


How can a web game store points online without giving the user the possibility to do the same call but with more points?

Imagine I have an HTML5 web game where the user can get points by doing certain activities. The game can be played offline, so there's not necessarily a live internet connection (note: this makes this question other than existing questions). Game state will then be synchronized at a later moment.  How can the frontend tell the server that the user has indeed gained those points without giving the user the ability to cheat? E.g. by doing a REST call with a multitude of his points? How can the server tell the difference between a real call and a fake call?  What I can think of is to send not the points, but e.g. all the moves of the game, and then the server recomputes the game and calculates the gained points? But that is quite hard, and the game must be deterministic in order to give the client and server the exact same result from the moves.  Does anybody know how existing games implement this? Or how it could theoretically be done?


Should I use Rufus or Etcher to duel boot Windows 10 and Ubuntu?

I don't know which one to use, Rufus or Etcher. Which one is better?


sometimes when I open some file, the Visual Studio shows me a dialog about inconsistent line endings but Visual Studio is able to normalize the line endings.  How can I normalize the line endings (Windows CR LF) in the file by myself with using C#?  I read a definition of stored procedure from SQL Server and save it to the file.   File.WriteAllText("procedure.sql", "content");   But when I open the file in Visual Studio it gives a warning about inconsistent line endings. SQL Server Management Studio also shows the same warnings when I want to modify the stored procedure.


$a_1, a_2,..., a_9$ is an arbitrary permutation of positive integers from 1 to 9. Prove that $(a_1 − 1)(a_2 − 2)...(a_9 − 9)$ is always an even number. So I don't understand what the question is asking by "arbitrary permutation of positive integers". Does that mean consecutive integers or multiples? And also, can someone please help me prove this too? Thank you so much! :)


How to test if two coins have different biases?

probably a noob question because I'm a noob.  I have two coins, A and B. For each coin I have a sample of the results I get by tossing it. My null hypothesis is that A has equal or higher probability to land on HEAD than B, but that probability is unknown (as well as B's probability). However, the data shows me that B seems to be more probable to land on HEAD. How can I test the null hypothesis?  It seems to me that a simple t-test won't work - A coin toss is Bernoulli distributed, and not normally distributed. I thought about dividing each sample to sub-samples, consider the ratio of HEADs in each subsample as a random variable that is distributed approximately like a normal variable, and then use t-test. However, this seems like a complicated (and inaccurate) solution for a basic (the most basic?) question.  bonus points: what's the effect size?


Does the zero product property hold in vector spaces?

Suppose $V$ is a vector space over a field $F$.  Let $v \in V\setminus \{0\}$ and $\lambda \in F$.  Does $\lambda v= 0$ imply $\lambda = 0$?


Launcher going all black. What is wrong with it?

All the icons in the Unity Launcher is blank.    Need Help!


Everytime I enter to ubuntu I don't have bars, I dont have browser, etc

Every time I enter on Ubuntu, this happens:    Then when I put my mouse in the corner it would give me a black image  I have my unity enabled but it doesn't give me a little box next to it to enable it(but I think I have it enabled because when I click on it in the left it says to enable it and I have it enabled)    Can someone help me with this?


Does Ubuntu software center needs update ....?

I'm the newest Ubuntu user, so have a little mercy on me ... :)  I'm trying to install g++ 4.7, the version I have is 4.6. I looked for it in the Ubuntu software center and didn't find it so I ended up getting it from the command line.  (sorry of the long intro ... )  do I need to update Ubuntu software center some how so it can find new software releases...?  if so how do I do that, if not, then why it couldn't find the new version of g++ ?  Thank you


pgfplots - draw boxplot without outliers

I am creating a boxplot with pgfplots, using the builtin statistics library. I load the input data from a table file.  \usepackage{pgfplots} \usepgfplotslibrary{statistics} ... \begin{tikzpicture} \begin{axis}[boxplot/draw direction=y]    \addplot+[boxplot] table[      col sep=tab,      x expr=\coordindex,      y=aColName] {aFileName}; \end{axis} \end{tikzpicture}   Is it possible to draw the plot without outliers? Or hide them? I don't want to pre-calculate the boxplot values by hand.


Disable bounty-related notifications, if there is no answer to award bounty

My bounty failed. It was aimed to attract at least one answer, but no answer was actually given. Do I still need to see these -- a bit annoying -- reminders that my bounty is about expire within... 3 days... 1 day etc.? Can these be disabled in this situation.  I mean... what should I actually do with these reminders or what is their purpose -- what should they remind me? Neither I can't award bounty to any answer manually nor it can be awarded automatically, because... there are no answers.


#include <stdio.h>      int main()     {         const char* s = "Number: 420604953084";         long number;         sscanf(s, "Number: %ld", &number);         printf("Result: %ld", number);          return 0;     }  This code, compiled on desktop with c++11 (or, for example ) returns correctly: Result: 420604953084  But compiled with ARM Mbed 6.6 the result is: (#include <mbed.h>) ... Result: -301941924  Does anyone have a clue? Unforunatelly, these things are not documented at all in Mbed.


fisher.exact test not returning expected p-value

I am trying to run Fisher Exact Test, however, I get unexpected results. I thought the two.sided p-value should be twice as large than the minimal one-sided p-value. However, the results do not hold. How is the two.sided p-value obtained in this test? Here is the example: tab <- rbind(c(176, 15),              c(430, 53))  > fisher.test(tab, alternative = "two.sided")$p.value [1] 0.2577816 > fisher.test(tab, alternative = "greater")$p.value  [1] 0.9146759 > fisher.test(tab, alternative = "less")$p.value   [1] 0.1416532  I tried computing the probabilities using hyper functions, but I obtain the same results as the one-sided tests.


RSA: How effective is this keypair-trash attack

A question that could very well be part of xkcd's "what if?":  Let's say Monica made a piece of software that sends all RSA keypairs to a central database after they're not used anymore. Something like a keypair-trash. Let's say Monica has convinced everyone in the world to use this piece of software. Monica starts collecting keypairs on January 2015 and waits X years and collects all keypairs.  1) Given the current evolution of electronics and use of RSA, how many years would Monica have to wait so that a new keypair created has a 10% chance of being in the database? (you can apply certain limits like key length never changing)  2) If Monica had a DB that has 10% of all the possible RSA keypairs (within certain limits like length). Will the database be so big that searching a match is still too hard?  3) Would the attack be any more effective if Monica managed to put a keygenerating program in every consumer-grade device (with internet connection) of a country the size of the USA? The program uses all the devices spare time to generate keys and send them to her DB.


I can't upgrade my HTC Desire 616 to KitKat 4.4.4 but my phone is absolutely capable of running this update! How can I update it?


About inter-city and inter-country bus services in Europe

I am planning a month-long trip in mid-June to Europe; mainly Italy, Switzerland, France and Spain in that order. I'll like to know about a bus service that I can use while in a country, and to travel from one country to another.   I found this  provided by Eurolines, can this be used within a country for eg.Rome to Florence? I'll really appreciate if somebody can guide which bus service are available in each country and can help travel from one country to another or is it better to book point to point rail tickets.


I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to terminate its process, then re-run the command. How can I terminate it?  I haven't closed its shell window. But as you know it doesn't stop using Ctrl+C and Ctrl+Z.


Paging for hundreds of page buttons in php (or I need to use javascript?)

I would like to ask if how to do simple paging and pagination like GOOGLE.  should I use javascript?  should I use bootstrap?  This is my code for my pagination and I have 30 page buttons right now with 9 records per page  and all of them are present on the page.  $results_per_page = 9; // find out the number of results stored in database $result = mysqli_query($link, $query); $number_of_results = mysqli_num_rows($result); // determine number of total pages available $number_of_pages = ceil($number_of_results/$results_per_page); // determine which page number visitor is currently on if (!isset($_GET['page'])) {     $page = 1; } else {     $page = $_GET['page']; }  // determine the sql LIMIT starting number for the results on the displaying page  $this_page_first_result = ($page-1)*$results_per_page; // retrieve selected results from database and display them on page $sql='SELECT * FROM policy LIMIT ' . $this_page_first_result . ',' .  $results_per_page;  $result = mysqli_query($link, $sql);  // display the links to the pages ?> <form method="post"> <?php for ($page=1;$page<=$number_of_pages;$page++) { ?>     <input class="btn btn-success" type="submit" value="<?php echo $page;?>" name="page" > <?php   } ?>  </form>  <?php $page = 0; ?>   I want to hide other buttons while the 10 buttons are shown.   Thank you in advance ^_^


Jeff Atwood appears as employee in API Results - even though he is not

I've been playing with the Stack Exchange API and developed a UserScript that adds icon next to users that are employees.  It appears as though the  of API is still reporting that  is an employee, yet his bio indicates that  for the company.     However, I no longer work at Stack Exchange, Inc.    Calling the Users method returns the following result. (filtered unnecessary fields)  {   "items": [     {       "account_id": 1,       "is_employee": true,       "reputation": 260720,       "user_type": "moderator",       "user_id": 1,       "display_name": "Jeff Atwood"     }   ] }   Should this be updated to reflect his currently employment status?


Assume $f$ and $g$ are differentiable at $x$. Prove that $(fg)^{(n)} = \sum_{k=0}^n \binom{n}{k}f^{(k)}(x)g^{(n-k)}(x)$   I am assuming here $fg = f(x) g(x)$. Then we can prove this via induction. If $n = 0$ we have $1 = 1$ which is true. Now assume it is true for some $m$ we need to show it is possible for $m+1$. We have $(fg)^m = \sum_{k=0}^m f^{(k)}(x)g^{m-k}(x)$. How do we show that?


High percentage of audits combined with audits failed for bad reasons putting me off reviewing

I can understand the need to audit editing etc and when I get the first user and first answer privileges the system seemed to work well.  However I just unlocked close votes and now it seems that every third vote I do is an audit. That is just annoying and feels like an enormous waste of my time and doesn't really encourage me to put any effort into trying to clear the enormous backlog of close votes stack overflow has.  So I was already getting a bit annoyed by it, and then I got an audit:   The answer from OldCurmudgeon came up in the audit to be reviewed and it was indeed an excellent answer. However the process failed because I went and read the question and saw the answer was already there! So I hit flag to report that the answer was a duplicate of an already posted answer...and got told that I should be paying more attention?  So I get told I should pay more attention because I was paying too much attention?  What does the audit failed actually mean? Beyond being a slap in the face for trying to help what does one or two failed audits actually do in real terms?


This question is in the spirit of , an example of an apparently non-deterministic system in Newtonian mechanics. Under certain restrictions, the  guarantees the existence and uniqueness of solutions to differential equations with initial conditions. However, Norton's dome does not satisfy these restrictions. The ball may sit on top of the dome for an arbitrary period of time before sliding down in a particular trajectory, without violating Newton's laws of motion.    Is there a plausible example of a system of interacting point-particles such that the equations of a point-particle are continuous but not , and therefore fail to have a unique solution?


New design for the privileges page on meta. Open for feedback

The changes have now been rolled out across the network!    Most of these changes are cosmetic.  We moved the list into the main content area, increased the font size a little, and used the check marks from badges to show progression.  Each privilege gets a one sentence summary so that you can easily browse the list, and we have added categories and filters to help you get a better idea of what kind of privileges there are.  Finally, we have added a progress bar to the right sidebar instead of showing simultaneous progression for all of the privileges.


How can we look back at our Universe 13Billion years ago?

I read this article on Space.com and I quote "As far as we know, that's as far [back] as we can see — we get an image of the universe as it was when it was about 389,000 years old," So what I wanna know is that    How can we look into the past? Does this mean that we might be able to see ourselves even?


I've seen many [ a shooting star / shooting stars ] lately

Is the former like there were a few days where a single shooting star appeared? And is the latter like there were a few days where one or more than one shooting stars appeared?


References about rigorous thermodynamics

Can you suggest some references for rigorous treatment of thermodynamics? I want things like reversibility, equilibrium to be clearly defined in terms of the basic assumptions of the framework.


Orthogonality of sine and cosine integrals.

How to prove that $$ \int_{t_0}^{t_0+T} \sin(m\omega t)\sin(n\omega t)\,\mathrm{d}t$$  will equal to $0$ when $m\ne n$ and $\frac{T}{2}$ when $m=n\ne 0$? Besides $$ \int_{t_0}^{t_0+T} \cos(m\omega t)\cos(n\omega t)\,\mathrm{d}t$$ will equal to $0$ when $m\ne n$ and $\frac{T}{2}$ when $m=n\ne 0$ and $T$ when $m=n=0$?


Installing Qt 5.5.1 on Ubuntu 14.04 - throws qt.network.ssl error on terminal

I am planning to install qt 5.5.1 on my ubuntu 14.04 running on virtual machine. I have downloaded the installer from qt-io and when I try to install the setup, I notice the below warning on my terminal, and then the installer pop up.  qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method   Do I need to worry much about this warning ? I dont see any error of this kind when I installed qt 5.3.1 on same machine.   Is there a way to resolve this warning ? Any help is appreciated. Thanks.  This is the current version of openSSL on my machine.  openssl version -v OpenSSL 1.0.1f 6 Jan 2014


Suppose $f : \space [-1,1] \subset \mathbb{R} \rightarrow \mathbb{R}$ is continuous on $[-1,1]$, and differentiable on $(-1,0) \space \cup \space (0,1) $. If $\lim_{x \rightarrow 0} f'(x) = 7$, prove that $f$ is differentiable at $x = 0$ and $f'(x) = 7$. I believe the best method to prove this is by mean value theorem and definition of derivative. I tried to do this but couldn't. Does anyone know how to prove this? There were a few similar questions that did not help either.


Google Lighthouse offscreen images & SEO

I've used Google Lighthouse for the first time and my main problem are offscreen images, meaning I should lazy load. I already do that but I have and script preventing bots to lazy load, so they get the whole content.  I want to:   lazy load images get them indexed in google images rank good at lighthouse (to focus on other issues and also I guess it would affect my score)   Most articles I've seen are at least 2 years old and I don't get what should I do. Should I stop blocking bots to lazy load?


SciFi book series about a guy surviving in three deadly planets

I remember reading a series of 3 short sci-fi stories or novels in the late 90s. The books themselves were older, probably from the 80s.   The three booklets all had the same protagonist: a psychic gambler, as far as I remember.   In one book he fixed a planet that had to deal with psychic-linked fauna. The settlers there had set up automated defense systems, which angered the fauna, forcing them to attack.  In another, he crash-landed in an early renaissance world. He brown-nosed up to one of the houses that ruled there, using his knowledge about electricity. He built a Morse Machine, that used a modified Morse code. I believe or was HTH encoded like our SOS as ...---... .  My memory fails me on the contents of the last book.  Which series is that and who wrote it?


Is spacetime flat inside a spherical shell?

In a perfectly symmetrical spherical hollow shell, there is a null net gravitational force according to Newton, since in his theory the force is exactly inversely proportional to the square of the distance.  What is the result of general theory of relativity? Is the spacetime flat inside (given the fact that orbit of Mercury rotates I don't think so)? How is signal from the cavity redshifted to an observer at infinity?


Get following error while trying to install GIMP 2.8 on Ubuntu 12.04:  The following packages have unmet dependencies:  gimp : Depends: libgimp2.0 (<= 2.6.12-z) but 2.8.6-0precise1~ppa is to be installed         Depends: gimp-data (<= 2.6.12-z) but 2.8.6-0precise1~ppa is to be installed   How do I update those dependencies?


Proving that an inverse ring homomorphism of an ideal is an ideal?

Say I have some function $f:R \rightarrow S$ such that $f$ is a ring homomorphism and $J$ is an ideal of $f$. $I = f^{-1}(J)$ is an ideal of $R$, but I don't really understand why. $J$ being an ideal means that $I$ is non-empty, that much makes sense.  But how can I show that addition/absorption hold if $f$ isn't surjective, nor do I know if $f^{-1}$ is even a ring homomorphism? I've seen a very similar question has been asked, but the only response appeared to just prove that these things held in $J$.  For instance, if I want to prove addition holds, I could take $i_1, i_2 \in I$ so that for $j_1, j_2 \in J$, $i_1 = f^{-1}(j_1)$, $i_2 = f^{-1}(j_2)$. But then I can't really add these elements together because I don't know if addition is preserved in $f^{-1}$. What gives?


How does a liquid state in Earth's inner/outer core allow a magnetic field?

I'm pretty sure metal loses more of its structure as it heats up and magnetic properties in a material are caused by a particular combination of atomic arrangement and orbital levels so...how does the difference in rotation of Earth's liquid inner and outer core generate any kind of magnetic field? Why wouldn't Earth's magnetic field be even stronger if those two layers were completely stationary and solid?


How to add items in listbox without duplicate Like That :

I tried to show items without duplicate in List Box.  private void Lst_Box_SelectedIndexChanged(object sender, EventArgs e) {     if (Chk_Multi.Checked == true)     {         Lst_Box.SelectionMode = SelectionMode.MultiSimple;         if (Lst_Box.SelectedItem == "Janvier")         {             Lst_Selected.Items.Add(Lst_Box.Text);         }     }     if (Chk_Multi.Checked == false)     {         Lst_Box.SelectionMode = SelectionMode.One;         Lst_Selected.Items.Add(Lst_Box.Text);     } }


What function does the series converge to?

I'm trying to find the function this series converges to. $\sum \limits_{i=0}^{\infty}{{{n+i}\choose{n}}{(\frac{a}{x})}^{i}}$ I guess it converges to $(\frac{x}{x-a})^{n+1}$. Can someone help me?


What do the different monster parts do when making potions in Legend of Zelda Breath of the Wild?

I've read a bunch of different semi-helpful blog posts about cooking and materials in Breath of the Wild, but most of them gloss over the details about what monster parts actually do, and just say to combine "monster parts" with critters.  But I know from some experimentation that monster parts are not created equally. Besides having different rarity and value, some monster parts seemed to make potions fail completely (dubious food), and others seem to do things like increase the value or duration of the potion.  Does anybody have a comprehensive list of the specific effects for monster parts when brewing potions?  It's pretty tedious to test stuff like market value because you have to first brew/cook the thing, then go into the slow merchant UI to see the price. But so far I've learned:   mixing different buffs does not seem possible; get regular or dubious food when attempting this some monster parts and insects don't seem to work in combination using multiple buff ingredients sometimes improves the buff (like medium stealth instead of low stealth), but sometimes has no additional effect at all (even using 4 identical buff ingredients) some combinations result in powerful buffs even if you only have a single buff ingredient. So doubling up ingredients isn't always necessary, sometimes has no effect, but often does improve the quality of the potion. some monster parts in combination seem to increase duration (duplicate parts and mixed parts) some monster parts (lizalfos horn I think) seem to improve value of potion.. meaning if you use same buff ingredient with two different monster parts, you will get same duration and quality, but one will have much higher market value. this may be increased by doubling up monster parts. selling cooked food and potions seems to net much more rupees than selling the raw ingredients - and is a great way to make tons of cash (farm the forest for a while, hunt some stuff, and profit) there may be some element of randomness for the outcome.. sometimes seems like same combination nets more or less hearts, more or less duration, etc., but haven't definitively proven this yet


I am working on Git.I was merging one binary file it gave me conflicts.   Can someone please tell me why binary files conflicts. What are the causes.Is it because of the uncommitted changes on current branch or its just because of the different versions of the binary files?


How to prevent nginx redirecting from HTTPS to HTTP on AWS?

I have a website served by nginx behind an AWS ELB Load Balancer. Only HTTPS is enabled on the load balancer.  Requesting individual files, or directories with a trailing slash, work fine. However, requesting directories without a trailing slash don't work.  The reason is, when I request the directory without the trailing slash, nginx does a redirect to the path with the trailing slash (that's OK), but it also changes from HTTPS to HTTP. The load balancer is configured to only allow HTTPS, so that doesn't work (timeout).  On the nginx logfile, I can see that the request reaches nginx, and that it's nginx that responds with the 301 Permanent Redirect (so it's not e.g. a problem with the load balancer setup).  10.100.10.15 - - [24/Nov/2017:15:41:08 +0000] "GET /admin HTTP/1.1" 301 178 "-" "Wget/1.18 (darwin16.0.0)"   When I request the URL via curl I see the redirect:  $ curl -v https://example.com/admin *   Trying 1.2.3.4... * TCP_NODELAY set * Connected to example.com (1.2.3.4) port 443 (#0) * TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 * Server certificate: example.com * Server certificate: Amazon * Server certificate: Amazon Root CA 1 * Server certificate: Starfield Services Root Certificate Authority - G2 > GET /admin HTTP/1.1 > Host: example.com > User-Agent: curl/7.54.0 > Accept: */* >  < HTTP/1.1 301 Moved Permanently < Date: Mon, 27 Nov 2017 09:19:05 GMT < Content-Type: text/html < Content-Length: 178 < Connection: keep-alive < Server: nginx < Location: http://example.com/admin/ < X-UA-Compatible: IE=Edge <   <title>301 Moved Permanently</title>
301 Moved Permanently

nginx   * Connection #0 to host example.com left intact   My nginx config file is just   server {     root /var/www; }   The /etc/nginx/nginx.conf is .  I have tried server_name_in_redirect off but it did not make any difference.  I would like to avoid putting the hostname in the config file, because this is packed into a Docker image which is then deployed on different hosts (QA, Prod, etc.).  I would like nginx to do this redirect, but stay on HTTPS. What can I do?


How do I read the contents of a small text file into a scalar in Perl?

I have a small text file that I'd like to read into a scalar variable exactly as it is in the file (preserving line separators and other whitespace).  The equivalent in Python would be something like  buffer = ""  try:     file = open("fileName", 'rU')     try:         buffer += file.read()     finally:         file.close() except IOError:     buffer += "The file could not be opened."   This is for simply redisplaying the contents of the file on a web page, which is why my error message is going into my file buffer.


Looking for intro to Conformal Bootstrap

I want to start looking at the . I've heard very interesting things about it but would like to clear some things up first.   I taken QFT at the level of Peskin & Schroeder, written a bachelors thesis on quantum integrability, know complex analysis up to things like mobius transformations and conformal mappings, functional analysis and algebraic topology. Then stuff like EM with Jackson and QM with Merzbacher's books etc.   What resources are best for working up to the conformal bootstrap?   From what I've seen the bootstrap seems to be heavily numerical. I'm extremely used to exact analytical expressions so would like to know the use of the bootstrap, particularly in relation to N=4 SYM (recently looked through a paper on this topic but it was above my level) or even general QFT.


What is the alternative for ls command in linux?

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


Without axiom of choice, can we prove that there are only countably many disjoint intervals in real line.

With the axiom of choice, we can select a ration number $r_k$ in each interval $[a_k,b_k]$ and we can easily prove $Q$ is countable,so this complete the proof.  However,without the axiom of choice, does each interval has a rational number which we can select?


My Mountain Bike ,about ten years old,Three (3) sprockets in front. It backpedals (whizzz) But when I go to pedal there is no engagement - Pedals turn but sprockets don't move..But sprockets move when backpedaling.     edit<- I searched Batman's & the other person mentioned for this "Duplicate question" but found none similar.    It's Shimano parts , the pedal arm is white aluminum, the chaingears, is that the word for sprocket ? The Chaingear/sprocket where the chain rides on is Black Aluminum.     When I look behind the assembly,Down at the crank axle,  and while turning crank by using pedal, A round circular part is turning with the pedal , But it is perfectly round and factory made like that ,Looks like a part of chaingear, It's also Black Aluminum, Maybe there's a catch or pin that's broke ?   While I grasp the pedal and crank forward , both pedals turn as supposed to , But the chaingear/Big circular saw piece remains idle, It does not move ,    But it moves when backpedaling, As does the gears on the rear tire..                  edit edit>>          I proceeded to cross a peculiarly arranged intersection, I deemed the coast clear , 5 feet from safety my pedals gave out , I could pedal easily and freely but no movement on my front chaingear and as a result - No torque available to propel my rear gear into saving my life.        A car whizzed around the corner and straight at me at the same time my 21 speed Mountain Bike with GTX tires Shit thine bed


I worked briefly with Drupal 7 and I thought it was possible there but in Drupal 8 is it possible to have a view output an increasing numbered CSS classes for Views rows?  This is what I want.

   I know I can add a CSS class to every row and give every row the same class.


Did SQ-242, fly from Sydney to Singapore on 8th April 2020?

Was Flight No SQ-242 Singapore Airlines from Sydney to Singapore on 8th April 2020, cancelled due to the Corona virus and border controls in Australia?


Stop browser recording history for a particular website

Is there any way I can prevent the browser to record the history for a particular website with the help of a plugin(as I can't find any)? As I don't think there's any inbuilt feature for doing this except the Icognito Mode?   As using icognito, it doesn't preserve history for any website, but I want something where I can have an exclude list of websites to be excluded by browser to save history for.


FavPic is an array with a picture element stored in it, im trying to set the variable, pRef, equal to that array element. Instead, I keep getting Null Pointer Exception crashes. What exactly is a Null Pointer exception, and how would these few lines of code cause such a thing? Thanks!      public void setFavouritePicture (Picture pRef)   {     pRef = favPic[0];    }


File / Folder navigation problem with the 'cd' command

I used to use this command cd /Foldername to navigate the folder. But I am facing a problem with this now I need to use this command cd ~/foldername for navigating. Please have a look on the screen capture:   The fact is how can I retrieve the old command? I prefer the old command.


Should I install Xbox 360 games to my hard drive?

Are there any benefits/downsides to installing an Xbox 360 game to my hard drive before playing it?


Calculating Image boundary / footprint of satellite images using open source tools?

I need to create the polygon outlines of several single layer raster images, not the extent/bounding box, but the area without the nodata values, as shown here: .  In the answer to the question above, the Image Boundary plugin was mentioned, however, I don't find it in the QGIS 1.8.0 Lisboa, running on Ubuntu.   Is the tool still available?  If not, is there a way to do this using opensource tools, either gdal, R, QGIS, GRASS, or similar, not with ArcMap?


I am trying to put commas in the bibliography in between the names of the authors in Latex but it isn't working. Also, I have putted "and" between their names in the bibtex but it didn't work (it is showing me the word and when compiling instead of a comma!) I am using unsrt style. Does anyone have an idea what to do in that case?  @book{Emile,     title={The River},     author={Emile Colombos, Rita James and Tom Hardy },     volume={7},     year={2000} }


Do all interactions terms need their individual terms in regression model?

I am actually reviewing a manuscript where the authors compare 5-6 logit regression models with AIC. However, some of the models have interaction terms without including the individual covariate terms. Does it ever make sense to do this?  For example (not specific to logit models):  M1: Y = X1 + X2 + X1*X2 M2: Y = X1 + X2 M3: Y = X1 + X1*X2 (missing X2) M4: Y = X2 + X1*X2 (missing X1) M5: Y = X1*X2 (missing X1 & X2)   I've always been under the impression that if you have the interaction term X1*X2 you also need X1 + X2. Therefore, models 1 and 2 would be fine but models 3-5 would be problematic (even if AIC is lower). Is this correct? Is it a rule or more of a guideline? Does anyone have a good reference that explains the reasoning behind this? I just want to make sure I don't miscommunicate anything important in the review.  Thanks for any thoughts, Dan


Finding arc length of colar curve using sectors

For finding the area under a polar curve, we divide the area into small sectors of circles, as shown in image.    Suppose I do the same for finding the arc length.  I divide the curve into small sectors of many circles.  Let dΩ be the small angle subtended by a sector.  Then using the formula of a circumference of a circle,   Circumference = (dΩ/2π)(2πr)= rdΩ  And so to find the total arc length between two angles a and b, we take the limit of the sum of the circumferences of the sectors as dΩ tends to 0, which in other words is the integral from a to b of r*dΩ.  But this method is wrong. Where am I wrong?


How do I execute a query based on date? As you can see below, I have a table with the attribute PURCHASEDATE as a timestamp.  My current query is    String query = "SELECT t FROM TransactionE t WHERE t.purchaseDate = '" + currentDate + "'";   currentDate in this case is "2013-10-22"  My query above would never return a result because of the timestamp. How do I query from a timestamp based on a date?  Thanks guys! =)


Execute snippet of code when key is pressed

I want to create a process in Linux which waits for some particular keys to be pressed and executes a snippet of code and goes back to sleep. How can I achieve this?   Initially a process will be in sleep mode Wakes up when certain Keys are Pressed Executes a piece of Code Goes back to sleep   Additional questions   I know I can create a daemon process for it but how can I get notification for those keystrokes? Do I need to create an interrupt routine for this?  Is there a way to register a process for event notification(s) in Linux as in Android?


Maximum likelihood estimator of the exponential distribution with two same parameter

Let $X_{1},...,X_{n}$ be a random samples from  a population having the probability density function:  $f(x)= \frac{1}{\theta}e^{\frac{-(x-\theta)}{\theta}}$ where $x\geq \theta$.   When I solved the likelihood equation of the above density, the maximum likelihood estimator turned out to be mean of the sample but if you see the range of values that the parameter $\theta$ can take is $(0,X_{1}]$. How can this be possible that the likelihood estimator is out of the range of $\theta$. Please clear my doubt regarding this. Thanks


My university is testing an intro Machine Learning (ML) course for us undergrads, and having been interested in ML since the beginning to understand what it was, I jumped at the chance to take it. But being someone who has not been back in school for a long time and much busier than I was in my first years long ago, I am finding that I need more info and examples than the class in its current form has.  I am struggling to figure out what the attached question is asking. I am searching online for help with this particular topic, but I am also finding that everyone seems to have their own way of phrasing similar questions in such a way that I am finding it hard to link the info.   My understanding from stats way back when is that $p(x|\omega_1)$ is stating the probability of $x$ given $\omega_1$ for $0\le x \le 2$ and zero other wise. Same obviously if given $\omega_2$. If I understand, the priors are the probability of $\omega_1$ and $\omega_2$ which are somehow obtained. And honestly that is as far as I am really comprehending. I am not sure what (a) and (b) are truly asking for or how to get them. If anyone is able to help me with some pointed info on the topic it would be greatly appreciated.


Who is considered a native speaker of English? I am a little confused by the various answers found online.


How do I change a user name in Windows 7?

I have an install of Windows 7 that I've already put a few days into. Today I realized I've made a mistake in the username and it's driving me nuts (my personal OCD).  While changing the physical folder name is perhaps possible, though quite involved, I do not want to open that can of worms.  What I want to do is simply change the username I give when the login prompt shows up. I thought it's possible by just renaming the user account in the User Accounts but that didn't work.  Is it possible to do then? Or is the only way to create another user and spend hour migrating everything I'd already customized to that user?


How to open Thunderbird minimised at startup in Ubuntu 16.04

I looked around for a solution that still works in 16.04. I found that previously offered  including the one which was accepted were for older versions of Ubuntu.  The results were Thunderbird would open but not minimised.  There are alternative solutions  and  that explain ways to do this, they are general purpose scripts which can be adapted. However, it's a bit complex for the task and not tailored to Thunderbird.


What command do I use in minecraft for setting people spawn when they spawn on a map I create? Because I am host

What command do I use to make everyone spawn at one place? because I am making a map and I don't know how to make everyone spawn at one place, the rule place.


Site-specific information in Help Centre for "What types of question should I avoid asking?"

I've noticed that  describing what questions you shouldn't ask appears to be the same for all sites (I've tried three, so I might be wrong.) Mostly, these tips probably are broadly applicable enough to cover all sites, but there are some sites where they seem out of place. For example, this paragraph:  To prevent your question from being flagged and possibly removed, avoid asking subjective questions where …  every answer is equally valid: “What’s your favorite ______?”  your answer is provided along with the question, and you expect more answers: “I use ______ for ______, what do you use?”  there is no actual problem to be solved: “I’m curious if other people feel like I do.”  you are asking an open-ended, hypothetical question: “What if ______ happened?”  your question is just a rant in disguise: “______ sucks, am I right?”    This seems weird on Programming Puzzles & Code Golf, or Code Review, where even these template questions aren't in any way applicable. While this is all technically true, because these questions wouldn't be valid on any site, I think that the don't ask page should contain specific information for each site, at least for sites that deviate from the Q&A format like PCG or CR. Knowing what's not okay is just as important to me as knowing what is okay, when participating in a new community, but these pages don't give much insight.


I'm very new to Blender. After creating this chair, I added a flat plain for the ground and have confirmed the my chair is snapped to the ground plain. When I added a light, I noticed the shadows are detached from the chair legs, as if it were hovering above the ground. Any idea what may be causing this?


So, basically I have a Queue (List of List of strings). Now, suppose I want to append 'okay' to the list at index 1, why is it getting appended for all the lists inside Queue? How do I append a value to a specific list only inside Queue? Queue = [] temp = [] Queue.append(temp) # 12 - 8 Queue.append(temp) Queue.append(temp) Queue[1].append('okay') print(Queue)  [['okay'], ['okay'], ['okay']]


JQuery: Change the class of a dynamically-created  element when clicked

When a user types, the text is turned into an array, separated by " ". A
 element is created and occupied by one
 for each member of the array, each containing its respective word. These are given the class list-group-item-danger by default, as in Bootstrap. When clicked, this class should be removed and replaced with list-group-item-success.  There is a default
 element. The
 members within it respond as expected, with the colour changing when clicked. However, once those are removed and the dynamically created
 elements are inserted, they no longer function and remain with the list-group-item-danger class which they already had.  HTML:

                     <input id="wordsearch" type="text" class="form-control wordsearch" placeholder="" />                                                                    <button class="btn btn-default" type="submit">                                                      </button>

Your

words

appear

here

as

you

type.

   CSS:  .word-filter li{     display: inline; }   JQuery:  $(document).ready(function() {     $('#wordsearch').keyup(function() {         var inputVal = $('#wordsearch').val();         var inputs = inputVal.split(" ");         var ul = document.createElement("ul");         ul.setAttribute("class", "list-group word-filter");         $(inputs).each(function() {             var li = document.createElement("li");             li.setAttribute("class", "list-group-item list-group-item-danger");             li.appendChild(document.createTextNode(this));             ul.appendChild(li);         });         $('#wordFilter').empty();         $('#wordFilter').append(ul);     }); /* Colour Switching Function */     $('div#wordFilter ul li').click(function() {         if($(this).hasClass('list-group-item-success')) {             $(this).addClass('list-group-item-danger');             $(this).removeClass('list-group-item-success');         } else {             $(this).addClass('list-group-item-success');             $(this).removeClass('list-group-item-danger');         }     }); });


What is the best way to detect memory leaks in c# .net ?  We are trying to find the cause of memory leaks on an application thats already installed and runing on a server  So visual studio profiler is not an option.  I worked with valgrind on linux, its a tool that actualy showed me, for example, the file names and line numbers in the code where i initialized the variables that are never disposed of..  however, valgrind only works on linux,  Are there good tools like that for .net ?


How was Voldemort supposed to regenerate from a Horcrux?

To clarify I am not asking  To me the a horcrux seems to be the same as a phylactery which a lich would use (which I first read about in The Chronicles of Prydain) it is simply a way to keep a soul tethered to this realm but with a stronger link than say a ghost. (There is a chance that eventually Voldemort would have made himself into a being that could not be killed without destroying his horcruxes but that is merely conjecture.) Lilly Potter’s unknown mother’s love protection spell seems to have killed (by reversal or backlash) and split his soul into an uncontained soul shard and into Harry which means it was split into two non-official Horcruxes. This allowed Voldemort as a soul creature thing to regain strength by attaching to Quirrel and drinking Unicorn blood and so forth.   There is evidence that the horcruxes were designed to do more than just contain parts of his soul though. With the Riddle Diary it seemed to be recreating Voldemort as he was at seventeen by taking Ginny's life force. This means that his first horcrux was able to rebuild himself. I find it hard to believe that he wouldn’t make this a feature in all of his horcruxes. (It is my personal opinion that he intended to make a completion spell after creating his seventh official Horcrux and that would have made him close to immortal, something like a lich but without the rotting away.)  Voldemort meant to make 7 Horcruxes. Each one is a splitting of his soul that can tether him to the living world in case his current body is destroyed. Each one also seems to have a some aspect of personality either originally there or put into place by Voldemort. Now Voldemort is too smart to not have a way for each horcrux he made to have a way to recreate him or aid in his regeneration. Assuming that Voldemort wouldn't just make basically what amounts to save points without a way to regenerate. How exactly was he supposed to regenerate and was it different for each Horcrux?  I don’t believe there is a cannon answer so anything directly from the creator or statements made with facts to back them up will be considered. Pure opinion will not.  Also while researching question and answers for this question I've come across conflicting answers for what a horcrux does. So please if you feel there is a duplicate of any kind share a link and specify.


Integrate : $\int \frac{\sin x}{\sin4x} \,dx$

Integrate the following  :   $$\int \frac{\sin x}{\sin4x}dx$$  My approach :   $$=\int \frac{\sin x}{2\sin2x \cos2x}dx$$  $$= \int \frac{\sin x}{4\sin x \cos x \cos2x}dx$$ $$= \int \frac{1}{4\cos x \cos2x}dx $$ [ didn't get the hint here ] then I did the following way.  $$= \int \frac{\sin x}{4\sin x \cos x (\cos2x) }dx$$  Now putting $\cos x =t$ $\Rightarrow -\sin x \, dx = dt $   $$= \int \frac{-dt}{4\sqrt{1-t^2} t(2t^2-1)}$$  [Using : $ \cos2x = 2\cos^2x-1]$


How to get the path of running java program

Is there a way to get the path of main class of the running java program.  structure is  D:/ |---Project        |------bin        |------src   I want to get the path as D:\Project\bin\.  I tried System.getProperty("java.class.path"); but the problem is, if I run like   java -classpath D:\Project\bin;D:\Project\src\  Main  Output  Getting : D:\Project\bin;D:\Project\src\ Want    : D:\Project\bin   Is there any way to do this?      =====  EDIT  =====  Got the solution here   (By )  package foo;  public class Test {     public static void main(String[] args)     {         ClassLoader loader = Test.class.getClassLoader();         System.out.println(loader.getResource("foo/Test.class"));     } }   This printed out:  file:/C:/Users/Jon/Test/foo/Test.class      (By )  URL main = Main.class.getResource("Main.class"); if (!"file".equalsIgnoreCase(main.getProtocol()))   throw new IllegalStateException("Main class is not stored in a file."); File path = new File(main.getPath());   Note that most class files are assembled into JAR files so this won't work in every case (hence the IllegalStateException). However, you can locate the JAR that contains the class with this technique, and you can get the content of the class file by substituting a call to getResourceAsStream() in place of getResource(), and that will work whether the class is on the file system or in a JAR.


What are the permissions the Android app needs?

The Android app just prompted for an update and it shows that it needs a new permission to see phone call stuff. Why would that be necessary for this app?  What other permissions does the app require, and why?


Windows 7 eats RAM with no indication on where it is/what's using it

I have a weird issue I've been strugling with for well over a year now...  I have 6GB RAM, but Windows works like it's more like 2GB. Windows reports that I have 6GB without problems, but right now for instance, if I sum the memory of all processes running, I get around 300MB of used RAM. Still, Windows claims I have used 73% of the physical RAM.  In other words, I only have 27% free of my 6GB, without ANY applications running (only small background apps/processes).  See this screenshot that explains the problem. In this case I have many apps running, but combined, they use less than 1GB memory. Stil, Windows reports that 96% of my memory is used, and behaves accordingly (apps crashing, memory warnings etc).


Prove that for every integer $n \geq 0$, the number $4^{2n+1}+3^{n+2}$ is a multiple of 13.


Can I check for a certain set of letters inside inputted letters and numbers? (C#)

I'm attempting to create a fake shell program in C#, but I need to know how to display two different messages depending on whether or not the user puts 'cd' infront of their "command".  Here's a part of my code:  /* C:\Users dir */ users:  Console.Write("C://Users>"); string userValueFromUsers; userValueFromUsers = Console.ReadLine(); if (userValueFromUsers.Equals("exit")) {     goto end; } else if (userValueFromUsers.Equals("")) {     goto users; } else if (userValueFromUsers.Equals("cd..")) {     goto users; } else if (userValueFromUsers.Equals("cd " + random text)); {     Console.WriteLine("The system cannot find the path specified."); } else if (userValueFromUsers.Equals("cd..")) {     goto c; } else     Console.WriteLine("'" + userValueFromUsers + "' is not recognised as an internal or external command,"); Console.WriteLine("operable program or batch file.\n") goto users;   My problem is at the line that reads "if (userValueFromUsers.Equals("cd " + random text"));", with 'random text' being my current placeholder for 'anything the user says.'  To clarify, c, start, end and users are all just parts of my code, c being the C:\ directory, start being the start and end being how you exit.  Thanks in advance!


Yesterday one of my friends asked me if there is some torrent client that runs on the command-line.  I had no answer for him, but I think that you have some.


How can we integrate $\sin\left(x^2\right)$?  $$f(x)=\int{\sin\left(x^2\right)}\ \mathrm dx$$  I almost lost about how to do it.


Change Default Program Install Path from SSD to Secondary HDD

I recently installed Ubuntu 14.04 on a Kingston 120 GB SSD. I plan on installing several programs, including Steam, that will take up quite a bit of space, so I installed, formatted, and partitioned a 1 TB HDD. Is it possible to change the default installation path of programs, or possibly even on a program by program basis? An older similar post suggested mounting an additional harddrive or partion as /usr or as /usr/share, but I am not sure if this is relevant to my issue. Thanks in advance.


Prove that $C(m,n)=\frac{(m+n)(m+n+1)}{2}+m$ is a bijection from $\mathbb{N}^2$ to $\mathbb{N}$

I've been stuck for a couple of hours on how to prove that $C(m,n)=\frac{(m+n)(m+n+1)}{2}+m$ is a bijection from $\mathbb{N}^2$ to $\mathbb{N}$.  I read in another question that in order to prove that it is injective, you have to show: $$m+n<m'+n'\Rightarrow C(m,n)<C(m',n')$$  From where $C(m,n)=C(m',n')\Rightarrow m+n=m'+n'$, and then $m=m',n=n'$.  However, I failed to show the first implication, and I also couldn't understand how to go from $m+n=m'+n'$ to $m=m',n=n'$.  Would someone be kind enough to give me some tips on how  to proceed?


How to see the full date on macOS Big Sur?

With default settings, the clock on macOS Catalina shows the current day of the week and the current time. You can click the clock to reveal the full date. In the Big Sur update, this dropdown seems to have vanished, instead opening notification center on interaction. I don't want to see the full date at all times. It takes up space in the dock, and most of the time the full date is not really relevant information. I would prefer to be able to use the old behavior if possible.


Regular division of the perimeter of an ellipse

I would like to divide an ellipse into $N$ parts such that these $N$ parts have the same arc length.  So given let's say $a$ and $b$ the semi-axis of an ellipse centered on $(0,0)$ and a positive integer $N$ , the solution should give $N$ angles $A_1 .. A_N$, with let's say $A_0=0$ such that the lines passing by $(0,0)$ and with these slopes will cut the ellipse, "revealing" arcs of the ellipse with equal length. So that the sum of these length obviously equals the perimeter of the ellipse.  In other words I have a pie in shape of ellipse, cut in $N$ slices, such that each "side" of these slices are equals and I need the "angle" of the slices.  I hope that my description is clear enough and that it has a possible simple solution too !  Thanks by advances you mathematicians ! (A programmer)  ps : approximations are most welcome


Why can't I change directory to the current directory with permission denied?

I am trying to restore a database with the following command:  $ sudo -u postgres pg_restore -C -d dvdrental dvdrental.tar  [sudo] password for t:    However, I am receiving the following error message:      could not change directory to "/home/t/mydata/.../relation model/SQL/implementations/Implementations, i.e. relational database management systems/postgreSQL/general/web/postgresqltutorial/databases": Permission denied      pg_restore: [archiver] could not open input file "dvdrental.tar": No such file or directory   I was wondering why I can't change directory to the current directory with permission denied?  File permission bits are:   -rw-rw-r-- 1 t t 2838016 May 26  2013 dvdrental.tar


Outputting all class variables in Python 3.7

I'm following a tutorial on Python classes. I want to output all class variables, but raise_amount doesn't show up for some reason. Here's my class definition along with one instance, emp_1: class Employee:          raise_amount = 1.04          def __init__(self, first, last, pay):         self.first = first         self.last = last         self.pay = pay      emp_1 = Employee('Corey', 'Schafer', 50000)  These 2 statements do the same thing, but neither displays raise_amount: print(vars(emp_1)) print(emp_1.__dict__)  {'first': 'Corey', 'last': 'Schafer', 'pay': 50000} {'first': 'Corey', 'last': 'Schafer', 'pay': 50000}  Is there a newer way to output the class variables (Python 3.7)? The above statements worked in the video, but it's from 2016. I can still reference raise_amount (see below), just can't see it when outputting all the class variables. print(emp_1.raise_amount)  1.04


I can't install any package even dpkg my dpkg file's and folders has been deleted and I received this error:  Could not exec dpkg! E: Sub-process /usr/bin/dpkg returned an error code (100)   EDIT: When I ran sudo apt-get update && sudo apt-get install --reinstall dpkg I got this output:  dpkg: warning: 'dpkg-deb' not found in PATH or not executable. dpkg: error: 1 expected program not found in PATH or not executable. Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin. E: Sub-process /usr/bin/dpkg returned an error code (2)   EDIT  When install buddgie desktop  The following packages have unmet dependencies:  budgie-desktop-environment : Depends: budgie-lightdm-theme (>= 0.5.4) but it is not going to be installed                           Depends: plymouth-themes but it is not installable                           Recommends: arc-firefox-theme but it is not going to be installed                           Recommends: pocillo-icon-theme but it is not going to be installed                           Recommends: budgie-indicator-applet but it is not going to be installed                           Recommends: vertex-theme but it is not going to be installed                           Recommends: gthumb but it is not installable                           Recommends: rhythmbox-plugin-alternative-toolbar but it is not installable                           Recommends: menulibre but it is not installable                           Recommends: transmission but it is not installable                           Recommends: tlp but it is not installable                           Recommends: budgie-welcome but it is not going to be installed E: Unable to correct problems, you have held broken packages.


i'm making a video game, and i'm having, i think, a concept problem. The game will be a platformer which will use tile maps, so to start i will create a mask matrix indicating the tiles to be loaded, and etc..., so my problem is, how to handle the scrolling? should i create a giant mask matrix indicating in each position of the whole level what is supposed to be loaded, and according to the position of the player, change the section to be drawed?? Is this a correct approach to this situation??


Pointwise Convergence Of Sequence Of Real Functions

Let $f_1:[0,1]\to\mathbb{R}$, $f_1(0)=0$ be continuously differentiable function and $\lambda>1$. Consider the sequence of function defined by  $f_k(x):=\lambda f_{k-1}(x/\lambda)$, $k≥2,$ , $x\in [0,1]$. Find the pointwise limit of the sequence of function.  My Approach:  By the recurring relation, we get,  $f_n(x)=\lambda^{n-1} f_1(x/\lambda)$. If we take the limit and using the continuity of $f_1$, we come across a situation of $\infty •0$. Please help me further.


I have a Linux machine (which I want to use as a gateway) and two other machines A and B. Gateway machine has eth0, eth1, and eth2.  eth1 connects to machine A and eth2 connects to machine B. I want to be able to ping from A to B and the other way around. I tried to do it using iptables, and added FOWARDING rules:  iptables -A FORWARD -i eth1 -o eth2 -j ACCEPT iptables -A FORWARD -i eth2 -o eth1 -j ACCEPT   But I am getting "host is unreachable" when trying to ping.  When I run  iptables -L -n -V   I can see that the forwarding rules got 0 packets and 0 bytes. Now I know I might missing a few more things, but it looks like the FORWARDING chain is never reached. When according to documentation if it’s not the destination it will go to FORWARDING chain.   EDIT 1: i cleaned the iptables and started from scratch using the following commnads      iptables -A FORWARD  -i eth1 -o eth2 -j ACCEPT     iptables -A FORWARD  -i eth2 -o eth1 -j ACCEPT      iptables -t nat -A PREROUTING -i eth1 -j DNAT --to-destination y.y.y.y     iptables -t nat -A PREROUTING -i eth2 -j DNAT --to-destination x.x.x.x      iptables -t nat -A POSTROUTING -o eth2 -d y.y.y.y -j SNAT --to-source x.x.x.x     iptables -t nat -A POSTROUTING -o eth1 -d x.x.x.x -j SNAT --to-source y.y.y.y   Still getting "network is unreachable"


If one group has 23 participants and the second group has 117 participants in it, can we rely on the result of t-test?

I was evaluating a research paper in which the authors have 23 male participants and 117 female participants. They have applied t-test to calculate Gender differences and have even concluded on significance of the difference. I am not sure when the groups are so markedly difference in terms of their size, we can use it for drawing such conclusions. Please help me!!!


What's the best way of replacing a plug or switch in a house with aluminum wiring?

My house has aluminum wiring, which from what I understand isn't recommended any more. How do I replace a plug or switch since the new unit only takes copper wiring?


How do I install and preauthorize app so I can use the JWT Bearer token flow?

I'm trying to follow the instructions in  and get an invalid request with an error description of "refresh_token scope is required and the connected app should be installed and preauthorized."  In the documentation it says I should "Install and preauthorize the app" - but I have no idea how to go about this, and I can't find the appropriate docs. I've looked around several config screens for the app and can't see anything obvious. As a salesforce novice I'm stuck!


Was Voldemort a Better Wizard Than Dumbledore?

Pursuant to , I have a somewhat related question. The majority of Harry Potter readers automatically assume that Dumbledore must be a better wizard than Voldemort, because Dumbledore is "good" and Voldemort is "evil." However, would Tom Riddle's prematurely developed skills demonstrate that Voldemort was inherently a better wizard than Dumbledore? In chapter 17, The Heir of Slytherin, Harry challenges Tom Riddle when he claims to be the greatest sorcerer in the world, retorting that Albus Dumbledore is the greatest sorcerer in the world. Harry reminds Tom Riddle that Voldemort is frightened of Dumbledore. Conversely, in Half-Blood Prince, Dumbledore himself states that Voldemort knows perhaps more magic than any other wizard alive. Yet, as Harry is J.K. Rowling's most direct voice, do we conclude that Dumbledore was, in fact, the superior wizard? Who was the better¹ wizard: Voldemort or Dumbledore? ¹Better meaning on a technically skilled level.


How can I use sed to replace a multi-line string?

I've noticed that, if I add \n to a pattern for substituting using sed, it does not match. Example:  $ cat > alpha.txt This is a test Please do not be alarmed  $ sed -i'.original' 's/a test\nPlease do not/not a test\nBe/' alpha.txt  $ diff alpha.txt{,.original}  $ # No differences printed out   How can I get this to work?


What stabilizes neutrons against beta decay in a neutron star?

Free neutrons are known to undergo beta decay with a . Binding with other nucleons stabilizes the neutrons in an atomic nucleus, but only if the fraction of protons is high enough (at least a third or so). But what keeps a neutron star stable against beta decay? Apparently, this is extra pressure due to gravity in contrast to "negative pressure" of proton Coulomb repulsion in a nucleus but how do we know that this is enough to stabilize the degenerate neutronic fluid?  I am aware of a  but not really happy with the answers there. There is lot of dazzling details , but I am a looking for an answer suitable form a 8-year old with enhanced curiosity towards astrophysics.


Why transform.Rotate(X,0,Z) rotates also Y?

In my game I'm trying to rotate a turret.  I'm using the classic pattern:   float h = Input.GetAxis ("Horizontal"); float v = Input.GetAxis ("Vertical");  if (h != 0 || v!=0)     rb.transform.Rotate (new Vector3(v, 0, h));   The problem is that if I move in vertical axis also Y axis rotates. Why?   How can I achieve a rotation that rotates only the X and Z axis and not the Y axis?


Install freezes on splash image on Inspiron 5565

I want to dual boot Win10 and Ubuntu 16.04. I'm using a Dell Inspiron 5565 AMD (not Intel) laptop with touchscreen Radeon graphics 4GB. Preinstalled OS is Windows 10 home.  I've created unallocated space and fixed fast boot settings. I tried thumb drives and DVD with a fresh Ubuntu iso each time.   The installation process is freezing on the splash screen.   Does this message give any useful clues?  CPU: 0 PID:33 Comm: kworker/0:1 Tainted G D L 4.10.0-28 ...


I'm trying to make a C program which can take both stdin and files then prints it to stdout. This program will have an option parser to manage a defined set of options : i.e: -x, -y, -z / or combined: -zx  Let's say we have the following functions : - get_stdin   ->  get standard input and put it on stdout - get_file    ->  get file contents and put it on stdout  How would one write this following pseudocode ?  ft_array = [     ( STDIN, &get_stdin );     ( FILE, &get_file ); ]


Postgres 10 - Query slows down with order by

I am running a query like   select id from students where school_id='67153fb1-8f79-441d-a747-ca3778cf6d3d';   on table that looks like                                      Table "public.students"           Column       |            Type             |             Modifiers                   -------------------+-----------------------------+------------------------------------      id                | uuid                        | not null default gen_random_uuid()      school_id        | uuid                        |  Indexes:     "students_pkey" PRIMARY KEY, btree (id)     "students_school_id_idx" btree (school_id)   The query plan for the select statement with just where looks like below-  explain select id from students where school_id='67153fb1-8f79-441d-a747-ca3778cf6d3d';                                             QUERY PLAN                                             --------------------------------------------------------------------------------------------------  Bitmap Heap Scan on students  (cost=581.83..83357.10 rows=24954 width=16)    Recheck Cond: (school_id = '67153fb1-8f79-441d-a747-ca3778cf6d3d'::uuid)    ->  Bitmap Index Scan on students_school_id_idx  (cost=0.00..575.59 rows=24954 width=0)          Index Cond: (school_id = '67153fb1-8f79-441d-a747-ca3778cf6d3d'::uuid)   This is fairly fast.  Now we add order by to the query with id that degrades the query.(Such a query is generated by Rails like student.first with some condition)  explain select id from students where school_id='67153fb1-8f79-441d-a747-ca3778cf6d3d' order by id asc limit 1;                                                  QUERY PLAN                                                  ------------------------------------------------------------------------------------------------------------  Limit  (cost=0.43..488.51 rows=1 width=16)    ->  Index Scan using students_pkey on students  (cost=0.43..12179370.22 rows=24954 width=16)          Filter: (school_id = '67153fb1-8f79-441d-a747-ca3778cf6d3d'::uuid)   How can I improve the speed to return the results of this query? Currently there are around 4990731 records in the table and is taking more than 2 minutes! Its running on RDS with db.t2.medium instance.  UPDATE After running Analyze students;  explain select id from students where school_id='67153fb1-8f79-441d-a747-ca3778cf6d3d' order by id asc limit 1;                                                        QUERY PLAN                                                         -----------------------------------------------------------------------------------------------------------------      Limit  (cost=8.46..8.46 rows=1 width=16)        ->  Sort  (cost=8.46..8.46 rows=1 width=16)              Sort Key: id              ->  Index Scan using students_school_id_idx on students  (cost=0.43..8.45 rows=1 width=16)                    Index Cond: (school_id = '67153fb1-8f79-441d-a747-ca3778cf6d3d'::uuid)      explain analyze select id from students where school_id='67153fb1-8f79-441d-a747-ca3778cf6d3d' order by id asc limit 1;                                                                           QUERY PLAN                                                                              -----------------------------------------------------------------------------------------------------------------------------------------------------------     Limit  (cost=8.46..8.46 rows=1 width=16) (actual time=1.853..1.855 rows=1 loops=1)      ->  Sort  (cost=8.46..8.46 rows=1 width=16) (actual time=1.851..1.852 rows=1 loops=1)            Sort Key: id            Sort Method: quicksort  Memory: 25kB            ->  Index Scan using students_school_id_idx on students  (cost=0.43..8.45 rows=1 width=16) (actual time=1.841..1.843 rows=1 loops=1)                  Index Cond: (school_id = '67153fb1-8f79-441d-a747-ca3778cf6d3d'::uuid)     Planning time: 0.145 ms     Execution time: 1.874 ms


Probability of getting atleast K heads while tossing a fair coin N times

Probability of getting Head = Probability of getting Tail = 1/2. This is basically programming question for large values of N and K (of range 10^5). I know the answer would be equal to (NCK + NC(K+1) + .. + NCN)/(2^N). But how do I calculate it for large values of N and K?


Create phonebook-like registers at the page margin

I try to create a little booklet with formulas that I need for university. Since we are allowed to use formularies (I'm not shure, if this is the right word for that!) in exams, it's absolutely crucial to find each formula as fast as possible.   Therefore I try to create a register at the page margin like on phonebooks or addressbooks as seen in the picture below.  (What I would like to generate are those red letters. But preferably not only one letter but a few words)   Do you know any package that could do this for me automatically?  Thanks in advance!  Frieder


How to prove that $$ \frac{x_1}{1+x_1^2}+\frac{x_2}{1+x_1^2+x_2^2}+\cdots+\frac{x_n}{1+x_1^2+\cdots+x_n^2}<\sqrt{n} $$ knowing that $(x_n)$ is a positive sequence ? I looked up all kinds of inequalities such AM-GM, Chebyshev, Cauchy-Schwarz, but I couldn't manage to obtain anything useful.. Can anyone help ?


how to host attachments outside of salesforce

Does anyone have experience hosting attachments outside of salesforce? I have a customer portal that allows file uploads via an authenticated sites user and it could potentially be a large number of files of substantial size. I've started to look into options like FTP Attachments in the app exchange but it doesn't seem to have an API I could add attachments through via APEX. Google drive does have an API that I'm assuming I could access through the REST API. Has anyone solved this problem before?


Quick formula for finding the probability of exactly x of n events happening when all events have a different probability?

Say that there are 5 events, with probabilities $P(A)=0.24$, $P(B)=0.29$, $P(C)=0.65$, $P(D)=0.12$, & $P(E)=0.82$ What is the easiest way to figure out the odds of exactly 3 of those events occurring?  The way I would solve for them right now would be like this (where $P(ABC)$ means $A$,$B$,& $C$ occur but $D$ & $E$ do not).  $P(ABC)+P(ABD)+P(ABE)+P(ACD)+P(ACE)+P(ADE)+P(BCD)+P(BCE)+P(BDE)+P(CDE) =  0.24 \cdot  0.29\cdot 0.65\cdot (1-0.12) (1-0.82) + 0.24 \cdot  0.29(1-0.65) 0.12 (1-0.82) + ...$ and so on.  There has to be an easier way, no?  Thanks!


How to print a huge image as multiple tiles using Photoshop CS4

I have a design in Photoshop CS4 that I want to print on multiple glossy sheets of paper to create a wall-sized image.  Using the slice tool I cut it into 99 pieces, each of which I want to print on an 8.5 * 11, horizontally oriented.  How can I prepare each slice for printing? Should I create a new document for each, and if so how should I prepare the document/image size in order to make each full slice to be a full page, without losing resolution?


I have searched religiously through the web to find an answer to this quest.  I don't know thing about .htaccess or web.config.  I'm currently hosting my website through GoDaddy.com. From what ive been able to uncover is that GoDaddy uses a windows based server so the .htaccess wont work, hince why i tried using web.config.  I have tried creating a .htaccess and a web.config file and uploading them in the same place as my index.html.   Could someone please help me.


Setting up command promt in tcsh to show only last 3 working directory instead of complete path?

I have command prompt in tcsh that shows the current working directory. The problem is that the command prompt becomes very big once I am in a deep hierarchy of folders. How do I set the command prompt to show, let's say, only the last 3 directory names?


Is the sentence structure "because... and so" grammatically correct?

According to the grammar I know, I only use either "because" or "so", but I do not use them in one sentence at the same time. I found that a translator always renders in this way. Sometimes the translator uses "because... and so," "not because...so," or "some say because... and so." My editing team are confused about that and don't know if it is a grammar error.  Is "because... and so" proper in written English?  Examples:     "Throughout history there has been no mention of extra terrestrial   beings living on the planet. Because they do not appear to us, and so   many feel they do not exist."      "And because she was young, and so damn clever and amusing and   wonderful, wherever she made her home, there would be some man who   would fall in love with her." (Crown of Midnight)      "Finitude is implicit in being limited, therefore, because being   limited, and so coming to a stop, is itself part of a thing's ownmost   being." (The Opening of Hegei's Logic: From Being to Infinity)   A quick google search shows 339,000 instances and of which 279,000 in the 21st century (supposedly). I want to make sure is "Because...and so..." proper grammar?


How to set out of office in Outlook so as to not reply when the incoming mail is addressed to a Group?

I am a part of a mailing Group called "ITSupport".  If I set an out of office reply, it replies to all mails, including those addressed to the group.  How do I stop this?  I am using Outlook 2007.


Need current date is in "UTC" timezone having Date format

I tried to convert current date is in "UTC" timezone format       Calendar cal = Calendar.getInstance();     cal.setTime(new Date());     DateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm:ss Z yyyy");     sdf.setTimeZone(TimeZone.getTimeZone("UTC"));     String dat = sdf.format(cal.getTime());     System.out.println("In string format" + dat);     System.out.println(("Date After parses " + (Date) sdf.parse(dat)));   Below is op:  In string format Mon Apr 11 09:57:12 +0000 2016 Date After parses Mon Apr 11 15:27:12 IST 2016  When i tried to convert date(Parse) in Date Format from String,I am getting the date is in Current date time and also in IST format.


Why can't I assign to 3d lists properly?

Let's say that I make a 3D list  list = [[[0, 0], [0, 0]], [[0, 0], [0, 0]]]   and I run  list[0][0][0] = 1 #set the first element of the first list of the first list to 1  print(list)   I'd expect to get  [[[1, 0], [0, 0]], [[0, 0], [0, 0]]]   but instead, I get  [[[1, 0], [1, 0]], [[1, 0], [1, 0]]]   Can someone figure out how to make it assign a variable to ONLY ONE element of a 3D list, instead of every first element? Thanks!  If it matters, I'm using Python 3.7 32-bit.


I want to download all my photographs from Google Photos. I found out that I can download 500 files in one zip file. I mark the first photo, scroll down 500 photos, press Shift and mark the last photo. This way I can download 500 photos.  I found out that I can select all photos of a day by pressing on the checkmark next to the day.    Is there a way to download all photos?


A single word for someone who spends their wealth very foolishly

What is a single word for someone who spends their wealth very foolishly?  For example: A person is obligated to take care of their children but instead spends their money on unnecessary things leaving no money to provide the necessary things for their children like food and clothes.


I am modifying a WordPress theme, but the problem is every time I edit my CSS file via FileZilla and upload it to the server, the CSS file doesn't get updated immediately after browser refresh and it's very frustrating.  I get the idea that the CSS ver tag is helping browser not to cache old CSS files, but for the temporary purpose, I would like to disable it.  Can you guys give me a hint, how the code of style.css?ver=1.0.0 tag command might look like? So that I can reverse engineer it and modify it my self or remove it completely.


How can I run an EXE from a Network Share?

I have the network share \server\me mounted as H:  There are executable in directories there.  I try to run them in cmd.exe  H:\somedir>program Access is denied.   I've read that it is possibly related to the "Local Intranet" and "Trusted Sites" settings in the Security tab of "Internet Options". I've added file:///H:/ to "Trusted Sites" and this automatically translated to file:///*.server  I still get "Access is denied."  How can I run an EXE from a Network Share and/or a mapped network drive?  Double clicking the EXE in windows explorer first gives me the "publisher could not be verified" warning. After I click "Run" in that dialog, I get "Windows cannot access the specified device, path, or file.  You may not have the appropriate permissions to access the item."


Patrick Morandi- Field and Galois Theory- Section 4- Exercise 11

Let $K=k(x)$ be the rational function field over a perfect field $k$ of  characteristic $p > 0$. Let $F = k(u)$ for some $u$ in $K$, and write $u = \frac {f(x)}{g(x)}$ with $f$ and  $g$ relatively prime. Show that $K$ is  separable over $F$ if and only if $u$ is not in $K^p$.


laptop screen goes blank after waking from sleep

I have been facing this issue from the last week after some update. Whenever my laptop wakes up from suspend state it just shows me a blank screen. Regardless of whatever I do(move my mouse, press keyboard buttons) it just refuses to wake up. I am forced to do a restart and lose all my unsaved files. Has this issue been reported for Ubuntu 12.04?  I am using a Lenovo X200 with Intel Mobile 4 Series Graphics Chipset. Please let me know if any body has found a fix for this.


With the current technology in 2016, on which plane can I travel the furthest distance without stopping to refuel?  Please answer with information on the distance, plane type, and approximate flight time.


There is a symbol, a circle with a horizontal line passing through it, on the right side of the top-plate LCD of my Pentax K-5:     This symbol also appears on my Pentax K-r on the left side of the viewfinder assembly, only that it is engraved rather than painted on.  The K-5 manual calls this the image plane indicator.  What does this symbol mean, and what is it used for?


How do I copy and paste from a website to a command block?

How do I copy and paste a long command from a website into a command block?


I have several instances of terminals running in my working environment, what I would like is to set a specific title for each one, in order to have a clear idea what purpose the specific terminal serves i.e. Apache, editing_ini, postgres etc...  Of course from the command line.


I am new to both ubuntu and programming, first time posting. I thought it would be fun to install ubuntu on an older laptop but i got stuck. I have read here and other places and tried everything I can muster. I need help. I have added a link to ubuntu pastebin where I have saved a txt called  wareless-info.txt If anyone can help me it would make my day... many thanks.


Limit exists or not? $\lim \limits_{n \to\infty}\ \left[n-\frac{n}{e}\left(1+\frac{1}{n}\right)^n\right] $

Determine whether or not the following limit exists, and find its value if it exists: $$\lim \limits_{n \to\infty}\ \left[n-\frac{n}{e}\left(1+\frac{1}{n}\right)^n\right] $$  I think the limit of $\left(1+\frac{1}{n}\right)^n$ is $e$, but I am not sure I can use this or not in the limit calculation. Could you please help me to solve this? Thank you!


evaluate $\lim_{n\rightarrow\infty}\frac{1}{n}\sum^n_{k=1} k^{\frac{1}{k}}$  I could guess that it converges to 1 but I'm having trouble showing how


As a Swedish citizen I need a visa to travel to Russia but not to Malaysia.  If I book 2 separate flights:  Stockholm → Moscow → Stockholm Moscow → Kuala Lumpur → Moscow  I would fly Stockholm → Moscow → Kuala Lumpur and back.  I do not intend to leave the Moscow airport, would I still need a Russian visa? If yes, would it be a normal visit visa to Russia?


Best circuit to get an array of signals with the same frequency and edge-synchronizable to a reference but individually controllable duty-cycles?

I am looking to build a circuit to control five different FET drivers individually. The input signal would be a single shot from a function generator, which should produce five output signals, with the same frequency and phase but the duty cycles need to be individually controllable. Basically, I am trying to replace five function generators (synchronized to the same clock) with one single function generator and a circuit board due to limited resources. The outputs need to have only two levels i.e pulse wave  EDIT: Olin's suggestion (using a MCU) or a FPGA seem to be the best options but any analog alternatives are much appreciated. Thanks :)


Are there other verbs that work like “dare” and “need”?

The verbs dare and need do not require auxiliaries when used in the interrogative; for example, “need I?” is as acceptable as “do I need?”  Excluding the auxiliaries themselves (like be, do, have), are there any other such verbs that work that way?


How to access both partitions on a bootable USB flash drive in Windows

I have a 16GB USB Flash Drive that is partitioned into two different sizes. The first partition contains a bootable version of Ubuntu, the second partition is for general saving of files.   Windows will only recognise the first partition. I have tried using  but this breaks the bootable partition. Disk Management recognises the second partition but does not allow me to do anything with it.  Is there a way to make both partitions accessible by Windows and keep the USB disk bootable?


Can you please describe how to derive a formula for first n members of  $$ S = 1\cdot 2 + 2\cdot 3 + 3\cdot 4 +\cdots +n(n+1)\mbox{?} $$ Thank you


Using ArcMap Field Calculator to set Row 1 (Column D)= Row2 (Column B)?

This is probably a fairly basic question but I have a long list of latitude and longitude values that represent telemetry points that will be the start point of the line.  Before I convert them to line, I need to add a column for the ending latitude and longitude values of the line.  This will be equal to the lat longs of the next point.  Each point is represented by a column "uniqueID"  This is one example of what I need done but there are several other instances in the database.  The example is shown in excel and is easily calculable with an "=B2" expression in excel but I need a formula for it in ModelBuilder.


I am writing a few rather large pseudocode functions using algorithm and algorithmic, i.e. my code looks something like:  \begin{algorithm}                      \caption{Coolest Algorithm ever}           \label{findme}                           \begin{algorithmic} [1]                   % enter the algorithmic environment \REQUIRE    Here are a few variables \\             variable 2 \\             variable 3  \ENSURE     this is the output \\             output 2  \STATE $some cool code here$ \STATE $some cool code here$ \STATE $some cool code here$ \STATE $some cool code here$ \end{algorithmic} \end{algorithm}   Unfortunately this code does not fit on one page and I am definitely not able to split it into some subfunctions or so (I already did that as far as possible).  So now I need to split up the algorithm into two pages, but I have no idea how.  The easiest way I can imagine is just to start a new algorithm on the new page, but this time letting the line counter start at line 35 or so instead of 1. But how can I do that?  Please not that there is already a similar question here on this site, but it deals with the package algorithmicx.


Creating many parallel lines in ArcGIS Desktop?

I need to create many parallel lines.   Is there a tool in ArcGIS Desktop where you input the distance between the parallels and the number of them?


How do you make holes in a cylinder sharp using subdivision surface modifier?

I am making high poly model for a gun using subdivision surface modifier, in the pic you can see the barrel with a hole in it but the control loops deform the curvature of the barrel as in it isn't round anymore. How do you make holes in a cylinder sharp using subdiv? Or you shouldnt use subdiv?


The ability to squint and focus - what is it called and is it used in optics?

Most people that wear glasses or contacts can squint to reduce the blurriness of their vision.  How can this be explained, and has it ever been used in optics to enhance the focus or clarity of an image?


How can I use ifuse command in a bash script?

When I enter this command in a terminal window, it works as expected:  ifuse "/home/sadi/mnt"   But it is ineffective when used in a bash script run via a .desktop file.  What can I do to use it like that?  This command (supposed to mount a connected device in the specified folder) is preceded by mkdir -p "/home/sadi/mnt", and followed by nautilus --no-desktop --new-window "/home/sadi/mnt" both of which work perfectly both in terminal and in bash script.  type ifuse output = /home/sadi/usr/bin/ifuse and I have this in my .bashrc: export PATH="${HOME}/usr/bin:${PATH}"


How can I reduce the Ubuntu install size to the minimum, with GUI?

I want to install Ubuntu, with the minimal packages for web browsing. Installation should be under 2GB.  Any ideas? Where can I start?


Expectation and variance (unknown problem type)

I'm having trouble identifying what type of problem the following question is:   A student is trying a new study strategy for the final exam.  There are four topics to study for the exam and each day he picks a topic at random to study (and so he may study the same topic multiple times).  Let T be the random variable corresponding to the number of days he'll study before he has studied every topic  Find E(T) and Var(T).   The answer to this question is provided to me but I don't know how the answer is obtained. I incorrectly tried to use a distribution, which obviously failed. Is this a variation of the balls in the bin problem? How can I locate this problem so that I know which approach to take (I have my exam in 2 hours).   Thanks! Just having trouble wrapping my head around this particular problem.


There is something I don't understand in the answer of the following question

Q. The gravitational field due to a mass distribution is given by $E=k/(x^3)$ in $x$-direction. Taking the gravitational potential to be zero at infinity, find its value at a distance $x$. for the answer let the 'integral where the lower limit is infinity and upper limit x' be denoted as I The answer my textbook gives to the above question is :  shouldn't the dot product of E and dx (because we are traveling from infinity to a point) give - sign so the final answer should be negative.


The name of the letter, which is related to two English letters "gh"

What is the name of the marked letter, which in my opinion relates to the two modern English letters "gh"?


using computations with \foreach in tikz

I am trying to learn \foreach in TikZ and I am confused because of all the errors I get. Here is a code sample I tried that gave me:  ForeachEvaluateTest.tex:0:File ended while scanning use of \pgffor@stripcontext     \documentclass{article} \usepackage{tikz}  \begin{document}   \pgfmathsetmacro{\dx}{5}  \pgfmathsetmacro{\offx}{2}   \begin{tikzpicture}   \pgfmathsetmacro{\endi}{\offx+\dx}   \pgfmathsetmacro{\starti}{\offx}    \foreach \i [evaluate=\i] in {\starti,...+1,\endi}   {    \draw (\i,0) -- (\i,1);   }  \end{tikzpicture}     \end{document}   I manage to fix this by a strange modification which can not possibly be the best way to fix it.  \documentclass{article} \usepackage{tikz}  \begin{document}   \pgfmathsetmacro{\dx}{5}  \pgfmathsetmacro{\offx}{2}   \begin{tikzpicture}   \pgfmathsetmacro{\endi}{\offx+\dx-1}   \pgfmathsetmacro{\starti}{\offx-1}    \foreach \i [evaluate=\i] in {\starti+1,...+1,\endi+1}   {    \draw (\i,0) -- (\i,1);   }  \end{tikzpicture}     \end{document}   Any pointers to why this makes a difference?


What is the meaning of the eigenvector and eigenvalue ? Why is that so interesting/important?

I asked many people those questions and everybody can calculate the eigenvector and eigenvalue of a given example, but if I ask those people what does it mean I always see frozen faces and and get an ehhhh. So, I'd be happy if someone can give me response for those questions and doesn't ask me if I've already asked Google or Wikipedia. By the way, I've seen that this question was asked in a similar way, but isn't there a short explanation for that ?


Can distance between two closed sets be zero?

Is given metric space $(M, d)$. Let $A\cap B = \emptyset; \,\,\text{dist}(A,B):=\inf\{d(x,y):x\in A, y\in B\}$. $A, B$ are both closed sets. Is it possible that $\text{dist}(A,B)=0$?  The first thought comes into mind is that obviously $\text{dist}(A,B)>0$, but possibly there are some tricky $d$ and $A, B$ so that it's untrue.  Thanks in advance!


New to SQL- Delete First and Last Day of Each Month From Data Set

I am extremely new to SQL. I am operating on SQL Server 2012.  I am working with an Inventory file that contains the Date the Inventory was taken, item #, and quantity. The first and last day of each month of the data set is wrong. My goal is to remove just the rows that contain the first and last day of each month. Any help/ideas would be greatly appreciated.


As an Indian citizen, can I apply and have both a B1 and F1 visa?

I got admitted into a university in USA and received my I-20 for the same. I am yet to apply for my F-1 visa. The program start date is 8th August, 2016.  Meanwhile, I also got selected for a Youth Cultural program by an organization in USA, which requires me to travel to USA from 18th June to 10th July on Visitors visa (B1/B2). I am yet to apply for that, too. I am planning to return to my home (India) on 10th July and then go back to USA in August to start my studies.  Now, 3 timelines would be possible for me:    I apply for F-1 visa first, and then for B1/B2. Thus, obtain both the visa before 18th June.  I apply for B1/B2 visa first, and then for F-1, and obtain both the visa before 18th June.  I apply for B1/B2 before 18th June, and apply for F-1 after coming back, i.e. after 10th July.   Can you please suggest me the best option out of these three considering following points :    Getting a F-1 visa is more important for me than the B1/B2, as a very good study program in good university is at stake. I don't want the B1/B2 visa approval/rejection to affect my chances of getting F-1 visa successfully.  Is it possible to have two valid visas stamped (B1 and F1) at the same time? Would there be a problem at entry port on 18th June if my passport has two valid visas stamped (both B1 and F-1) ? I can produce enough documents stating my purpose of visit (cultural program for the first visit).  If in case my B1 visa is rejected, will that decision affect my chances of getting F-1?


We have in and out degree of a directed graph G. if G does not includes loop (edge from one vertex to itself) and does not include multiple edge (from each vertex to another vertex at most one directed edge), we want to check for how many of the following we have a corresponding graph. the vertex number start from 1 to n and the degree sequence are sort by vertex numbers.  a) $d_{in}=(0,1,2,3), d_{out}=(2,2,1,1)$  b) $d_{in}=(2,2,1), d_{out}=(2,2,1)$  c) $d_{in}=(1,1,2,3,3), d_{out}=(2,2,3, 1,2)$  I want to find a nice way instead of drawing graph.  for (C):


For close vote privilege users, the Duplicate option repeats

For people with Close Vote privilege, when choose flag, the option to mark duplicate repeats 2 times and both points to same window. First one is in the main menu.  The second one is in the Should be closed menu  And both points to


Exponentiation with fully homomorphic encryption

I have often heard that because a fully homomorphic encryption scheme allows for both additions and multiplications on encrypted data, most other operations can be simulated. I don't understand how exponentiation can be done, i.e., how to build $E(x^y)=E(x)^{E(y)}$ ?   If it can't be done, is there a FHE that support $E(x) . E(y) = E(x^y)$ where the operation on encrypted data is not necessarily exponentiation?


Why is a normal subgroup of $G_1\times G_2$ with trivial intersections with $G_1$ and $G_2$ is abelian?

Let $G=G_1\times G_2$ be a direct product, and let $H\triangleleft G$ be a normal subgroup such that $H\cap G_1=H\cap G_2=\{1\}.$ Then $H$ is abelian.     I considered the commutators of two elements in $H$, trying to show that it must be $1,$ but I don't see how this works. Any hint is very welcomed and appreciated. Thanks in advance.


What do you call a Q&A user who posts a question but never checks back?

I have searched for a term that describes users who post questions and then disappear without trace. These users will post and write their questions in a great flurry,  sometimes ignoring the basic rules of punctuation and capitalization, they will also plead for assistance, and conclude their posts with a thnx. And yet when regular users respond and politely ask for further information these newcomers will remain mute. Answers will be posted but receive no confirmation from the OP (original poster) that their problem has been solved. Only when a day has passed by, do users realize that these newcomers have effectively gone. Disappeared. Vanished. Sparito.   I am not talking about lurkers, users who sit on the sidelines and observe, reading content but never interacting or contributing. Apparently, lurkers are said to  make up 99% of all Internet users.     In Internet culture, the 1% rule is a rule of thumb pertaining to   participation in an internet community, stating that only 1% of the   users of a website actively create new content, while the other 99% of   the participants only lurk. [...]   The terms lurk and lurking, in reference to online activity, are used   to refer to online observation without engaging others in the   community, and were first used by veteran print journalist, P Tomi   Austin, circa 1990, when her presence was noticed by other users in   chat rooms, who queried her reasons for not engaging in chat. There   were repeated inquiries about her identity and her refusal to engage   in chat.       Wikipedia:    No, I am referring to users who do make a contribution, who have taken the plunge, and seem to want to engage but then never come back (unless they have multiple accounts, which seems very unlikely to me.)   I have come to call them Hit & Run users; because they remind me of the expression , they shoot a question and then run away. But is there an established expression, word or phrase used in social media? I have honestly searched but Internet slang dictionaries are no good unless you already know the term you're looking for!


How to maximise a window to fill up screen in Mavericks?

Before Mavericks, I could maximise a window while holding shift key, and the window would always fill up the entire screen without needing any third party tools or changes.  It no longer works in Mavericks, is there a workaround or hidden setting to revert to the old behavior?


Would Beetee's electrocution plan work and kill the tributes in the lake?

In , the second episode of the Hunger Games trilogy, one of the characters (Beetee) proposes a plan to kill some of the remaining tributes. He proposes wrapping a special wire that he has designed to withstand the vast energy of lightning around a tall tree and running it down to a salt water lake. Then when lightening strikes the tree (which it does predictably every twelve hours) anyone in the lake will be killed. (N.B. This is not Beetee's real plan, but it is the one he wants his allies to believe.)  I don't think his plan would work at all. Assuming that his wire can carry the enormous current delivered by a lightening strike (this is fiction after all) surely the current would short to ground through the salt water rather than taking a path through anyone standing or swimming in the water. The analogy I have in mind is that of birds standing untroubled on live electricity wires. They are unharmed because they do not provide a path to earth. But another analogy might be dropping a mains electric heater into a bath when you are in it. I think that kills you (though I'm not sure why.)


If ${n \choose 3} + {n+3-1 \choose 3} = (n)_3$, compute $n$.  Just making sure I am on the right track...  Do I expand each piece out and solve algebraically?


multiple records might have the external id.  I want to Query all the duplicate Records ,I want to know all the Records which is having same external Id  How can I perform this query?  The Answer is:  SELECT External__c, count(Id) records FROM MyObject__c GROUP BY External__c HAVING count(Id) > 1   If you are open to using Apex, you can generate a Set based on the above. If your volume is low enough, you can do it all in one go:  Set<String> externalIds = new Set<String>(); for (AggregateResult aggregate : [     SELECT External__c FROM MyObject__c     GROUP BY External__c HAVING count(Id) > 1 ]) externalIds.add((String)aggregate.get('External__c'));  List<MyObject__c> duplicates = [     SELECT Id, External__c FROM MyObject__c     WHERE External IN :externalIds ];   I am Having Large Number of Records,How to Query? then I want to know all records which is having same External Id,Guide Me for the Answer