Find the maximum value of $x_1x_2+x_2x_3+\cdots+x_nx_1$ if $x_1+x_2+\cdots+x_n=0$ and $x_1^2+x_2^2+...+x_n^2=1$.  I can get by Cauchy-Schwarz that $x_1x_2+x_2x_3+\cdots+x_nx_1 \leqslant 1$, but can expression $x_1x_2+x_2x_3+\cdots+x_nx_1$ be smaller?
To seek the maximum value of $S=x_1x_2+x_2x_3+\cdots+x_nx_1$ on this domain:  $x_1+x_2+\cdots+x_n=0$ and  $x_1^2+x_2^2+\cdots+x_n^2=1$.  I have made some trivial observations:  1) $S\in[-1,1)$ by the rearrangement inequality.  2) We can make $S$ arbitrarily close to $1$ by increasing $n$.  3) An equivalent problem is to minimise $(x_1-x_2)^2+\cdots+(x_n-x_1)^2$.  But does the maximum have a meaningful closed form  for each $n$?
Resizing an iframe based on content I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes.   How do I resize the iframes to fit the height of the iframes' content?  I've tried to decipher the javascript Google uses but it's obfuscated, and searching the web has been fruitless so far.  Update: Please note that content is loaded from other domains, so the  applies. Prove that two distinct numbers of the form $a^{2^{n}} + 1$ and $a^{2^{m}} + 1$ are relatively prime if $a$ is even and have $\gcd=2$ if $a$ is odd.   My attempt: If $a$ is even, let $a = 2^{s}k$ for some integers $k, s$ Then, $$a^{2^{n}} + 1 = 2^{2^{n}s}\cdot k^{2^n} + 1$$ and $$a^{2^{m}}  + 1 = 2^{2^{m}s}\cdot k^{2^m} + 1$$ To prove that they're relatively prime, we need to show that their gcd = 1. And I was stuck here, how could I prove that gcd of two numbers is $1$?     A hint would be sufficient. Thanks. Wrong place for hyperref link in scaled tikz picture I have a TikZ picture with a node containing a minipage with an itemize environment; each item is a hyperref to other sections of the document.   When scaling the image (for example with \begin{tikzpicture}[scale=.7, transform shape] I've a strange behavior: links in itemize are not in the right place: they present a somewhat vertical offset, as if they don't scale as the rest of image.   Here the MWE:  \documentclass[a4paper]{article} \usepackage{tikz} \usepackage[pdftex]{hyperref} \begin{document}  Here something interesting\label{text:interesting-one} \newpage  Here something interesting, too\label{text:interesting-two} \newpage  and here there are very very interesting stuff\label{text:interesting-three} \newpage  \newpage Now the problem: links rectangles have some offset, making links unusable in case of long itemize  \begin{figure}[htb] \begin{tikzpicture}[scale=.7, transform shape] \node at (0,0) (mynode) { \begin{minipage}{4cm} \begin{itemize} \item \hyperref[text:interesting-one]{First link} \item \hyperref[text:interesting-two]{Second link} \item \hyperref[text:interesting-three]{Third link} \item \hyperref[text:interesting-one]{First link again} \item \hyperref[text:interesting-two]{Second link again} \item \hyperref[text:interesting-three]{Third link again} \end{itemize} \end{minipage} }; \end{tikzpicture} \end{figure} \end{document}   And here a snapshot of the problem    Note: This is evident using the default settings of hyperref package, which draws the red rectangle around links, but it took me some time to found it when only the text is coloured, i.e. when using \usepackage[linkcolor=blue,colorlinks=true]{hyperref} Custom counter steps twice when invoked from caption using caption package Email SMTP validator I need to send hundreds of newsletters, but would like to check first if email exists on server. It's called  validation, at least I think so, based on my research on Internet.    There's several libraries that can do that, and also a page with open-source code in  (), but I have hard time reading ASP Classic, and it seems that it uses some third-party library...    Is there some code for SMTP validation in C#, and/or general explanation of how it works? Average distance between two random points in a square A square with side $a$ is given. What is the average distance between two uniformly-distributed random points inside the square?  For more general "rectangle" case, see . The proof found there is fairly complex, and I am looking for a simpler proof for this special case. I expect it could be significantly simpler.  See also . In the LaTeX document pasted below, I still see page numbers upon compiling, even though I've included a \pagestyle{empty} command below the \maketitle command. Any ideas what I'm doing wrong? Thanks in advance.  \title{Thesis Abstracts} \author{         Kurt Han Peek } \date{\today}  \documentclass[a4paper,11pt]{article} \usepackage{graphicx} \usepackage[margin=2cm]{geometry}  \begin{document} \maketitle \pagestyle{empty}  \section*{An Analysis of the Effects of Digital Phase Errors on the Performance of a FMCW-Doppler Radar} In modern frequency-modulated continuous-wave (FMCW) radars, the transmitter is increasingly being implemented using direct digital chirp synthesis (DDCS), which provides improvements in sweep linearity, stability, precision, agility, and versatility over analog techniques. Its main limitations are errors due to sampling of the modulating signal, phase truncation, and digital-to-analog converter (DAC) quantization, which produce spurious signals due to their deterministic nature. This thesis presents an analysis and simulation of the effect of two sources of digital phase errors -- namely, sampling of the modulating signal and phase truncation -- on the performance of a FMCW-Doppler transceiver employing a DDCS in its transmitter. An upper bound for the amplitude of spurious targets resulting from these digital phase errors is established. Further, it is shown that provided the phase errors are periodic with the sweep period, the spurious targets are not offset from the target in Doppler. An algorithm for selecting the digital chirp parameters of a DDCS so as to ensure periodic and phase-continuous sweep transitions, which guarantee periodic phase errors and reduce `spectral splatter', is devised. Finally, we investigate parallels of FMCW radar in the optical domain, and consider the fundamental question whether range resolution is fundamentally limited by the bandwidth of a transmitted signal, or its carrier frequency.  \section*{Estimation and Compensation of Frequency Sweep Nonlinearity in FMCW radar} One of the main issues limiting the range resolution of linear frequency-modulated continuous-wave (FMCW) radars is nonlinearity of frequency sweep, which results in degradation of contrast and range resolution, especially at long ranges. Two novel, slightly different, methods to correct for frequency sweep nonlinearity by digital post-processing of the deramped signal were introduced independently by Burgos-Garcia et al. (Burgos-Garcia, Castillo et al. 2003) and Meta et al. (Meta, Hoogeboom et al. 2006). In these publications, however, no formal proof of the techniques was given, and no limitations were described. In this thesis, we prove that the algorithm of Meta is exact for temporally infinite chirps, and remains valid for finite chirps with time-bandwidth products which are large compared to unity, provided the maximum frequency component of the phase error function is small compared to the square root of the nominal chirp rate. It is also shown that the algorithm of Meta reduces to that of Burgos-Garcia in this limit. A digital implementation of both methods described. Finally, we propose a novel method to measure the systematic phase errors which are required as input to the compensation algorithm.  \end{document} Here $p$ and $q$ are co-prime integers. Is it necessarily an algebraic number? Can't access pre populated SQLite database using PhoneGap/Cordova in Android I am a new QGIS user and i have a challenge to convert legend from right to left reading in QGIS like ArcGIS. Is there a difference between "write" and "write down"? Does an unbalanced sample matter when doing logistic regression? I am not sure of the meaning of this sentence:     The significance of culture and identity in development has to do not so much with the cultural factor in the process of development as with abandoning Eurocentric development thinking.   I'm not sure what the use of as is supposed to convey. Does it mean "development has to do not so much ... as with abandoning", i.e. not as much as abandoning? Does the abandoning have more to do with it?  And the second question: Why does it use "has to do not so much". Why not "has not so much to do"? Is "have to" a verb? How do I get and modify the source code of packages installed through apt-get? I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them?   I have a couple applications I use regularly that aren't being actively developed any longer and I would like to add features. Where would I go to get the rights to update these applications?  In this case specifically, I am referring to the hellanzb package How do you reset the sa password? I lost the sa password on a machine, and when I log in to the machine directly using an account in the admin group, SQL Server Management Studio will not allow me to log in using Windows authentication.  My plan was to simply log into the server, connect via Windows Authentication, and reset sa to use a new password. Since I cant' connect via Windows Authentication, this won't work.  How else can I reset the sa password? How do I correctly tag my questions? Here are some tips for tagging questions. These guidelines will help you more accurately tag your questions, which in turn will help them get more attention and lead to better answers faster.     For more information, see "" in the . How do I do Combinatorics / Counting? If someone could give answers and explain, it would be greatly appreciated. Help required studying for a final.  One hundred tickets, numbered 1,2,3,…,100, are sold to 100 different people for a drawing. Four different prizes are awarded, including a grand prize (a trip to Tahiti).   A) How many ways are there to award the prizes?  B) How many ways are there to award the prizes if the person holding ticket 47 wins the grand prize?  C) How many ways are there to award the prizes if the person holding ticket 47 wins one of the prizes?  D) How many ways are there to award the prizes if the person holding ticket 47 does not win a prize?  E) How many ways are there to award the prizes if the people holding tickets 19 and 47 both win prizes?  F) How many ways are there to award the prizes if the people holding tickets 19, 47, 73, and 97 all win prizes?  G) How many ways are there to award the prizes if none of the people holding tickets 19, 47, 73, and 97 wins a prize?  H) How many ways are there to award the prizes if the grand prize winner is a person holding ticket 18, 47, 73, or 97?  I) How many ways are there to award the prizes if the people holding tickets 19 and 47 win prizes, but the people holding tickets 73 and 97 do not win prizes? Why are map tiles being repeated? Using MapServer and Openlayers Problem I have: map tiles from my layer are being repeated.  Shapefile is projection 3059. I have specified 3059 is in the mapfile and also when creating map object.  I know OpenLayers.Layer.WMS is recommended, but when I use it I only see empty map. When I use OpenLayers.Layer.MapServer, map is displayed (and tiles are repeated), so I'm using that for now.  My layer (EPSG:3059) looks like this    Versions: Openlayers 2.13.1 MapServer 6.0.3  WMS Server mapfile:  MAP     NAME country_map     STATUS ON     SIZE 800 500     EXTENT 313187.4 146161.56 766469.92 470367.64     UNITS METERS     SHAPEPATH "shapefiles"     IMAGECOLOR 155 155 155      WEB         TEMPLATE "template.html"         IMAGEPATH "C:/MS4W/ms4w/apache/htdocs/gis/output/"         IMAGEURL "/gis/output/"          METADATA             "wms_title"             "MapServer + Openlayers"             "wms_onlineresource"    "http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W\ms4w\Apache\htdocs\gis\mapfile2.map"             "wms_enable_request"    "*"             "wms_srs"               "EPSG:3059"         END     END      PROJECTION         "init=epsg:3059"     END  # example layer     LAYER     METADATA         "wms_title"             "lat_rob_region"     END     NAME "lat_rob_region"     DATA lat_rob_region     STATUS ON     TYPE POLYGON         CLASS             NAME "lat_rob_region"             STYLE                 COLOR 0 255 0             END         END     END END   Javascript:  var lon = 25; var lat = 57; var zoom = 5; var map, layer1;  function init() {     map = new OpenLayers.Map( 'map',{displayProjection: new OpenLayers.Projection("EPSG:3059")} );      layer1 = new OpenLayers.Layer.MapServer( "Country map",              "http://localhost:1025/cgi-bin/mapserv.exe?map=C:/MS4W/ms4w/Apache/htdocs/gis/mapfile2.map", {layers: 'lat_rob_region'},             {gutter: 15},{srs: 'EPSG:3059'});     map.addLayer(layer1);      map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);     map.addControl( new OpenLayers.Control.LayerSwitcher() ); } I have a large amount of duplicate records (25.000) in an even larger table (250.000 records). I've done the detection using the reporting function. The criteria I used to detect the duplicates were 3 fields (unique account identifier, unique user identifier and date). Based on a list of criteria, I would like to either merge or delete these records. I've got a handle on the logic associated with the merging and the deleting but what I'm having trouble with is defining the duplicate detection process.   I'm looking at either creating a custom object to take care of the detection or dumping the records into an SQL database and taking care of it offline. Any thoughts on which one of the two is the best approach?  Edit:  After reading the first comment, I think the more appropriate question would be "How do I approach the problem in SOQL".  The object I'm working with is the Event object and I'm really only looking at the standard fields, AccountId, OwnerId and ActivityDate. From what I've found online, there's no easy way to find records that have the same value for these three fields. I think it could be accomplished by nesting SOQL queries but I'd like to use a different approach if at all possible. Do I need to play previous Witchers before Witcher3 I'm thinking about buying The Witcher 3 and I know it's heavily based on a story/narrative.   For the story/narrative to make sense, do I need to play the previous 2 Witcher games - or are the stories for each title independent of one another?