A friend of mine owns a Minecraft Realm. I was unable to join, but the weird thing is other friends are playing on that world while I was waiting for it to be fixed.  I am playing on 1.8.9 and the error is: "Failed to login: Authentication servers are currently down for maintenance." Another friend solved the same problem by restarting his computer. I tried this but it didn't work.  Does anyone know what the problem is?

Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved.


I'm trying to create a horizontal headline box consisting of two different colors. This is what I have right now:  \documentclass{beamer} \usepackage{lmodern}   \definecolor{accent1}{RGB}{0, 110, 220} %blue \definecolor{accent2}{RGB}{255, 248, 220} %cornsilk   \setbeamercolor{accent12}{fg=accent1,bg=accent2} \setbeamercolor{accent21}{fg=accent2,bg=accent1}  \setbeamerfont{section in head/foot}{family=\rm}  \makeatletter \setbeamertemplate{headline} {     \leavevmode     \hbox     {         \begin{beamercolorbox}[wd=0.5\paperwidth,ht=3ex,dp=1.5ex,right]{accent12}         \end{beamercolorbox}         \begin{beamercolorbox}[wd=0.5\paperwidth,ht=3ex,dp=1.5ex,left]{accent21}             \usebeamerfont{section in head/foot}\hspace*{2ex}\insertsectionhead         \end{beamercolorbox}      }     \vskip0pt% } \makeatother  \beamertemplatenavigationsymbolsempty %remove navigation panel  \begin{document}  \section{Introduction} \begin{frame}     hello \end{frame}  \end{document}     there are a few problems with this code.   As you can see in the output there is a small space between the two color boxes, but why? Both boxes are set to a width of 0.5\paperwidth? There are overfull hbox warnings, why and how to get rid of them?

I have  experience where empty spaces cause unwanted effects. It is not easy to trace the cause of these unwanted effects. In order to eliminate any doubt, I often overuse % as follows.   \usepackage% [% left=3cm, right=3cm% ]% {geometry}   or  \newcommand{\mycommand}% {% This is my command.% }   I got an extreme example that will break what Leo Liu said     In fact, only spaces which would be   output have to be removed by comment.   The following code does not produce output, but we cannot remove the % and leave a blank line between two elements of a list below.  \newpsstyle{gridstyle} { gridwidth=0.4pt, % griddots=0 }   Shortly speaking, where are the necessary places to be appended with % to remove unwanted spaces?


I read the question "How to install mods for the new minecraft launcher" and got the modified directory to show up in the list and I can load mods for a 1.5.2 version from the launcher now. The problem I am having is that when Minecraft comes up everything is flipped. It is both upside down and in mirror image. If I load the same jar file using the old minecraft launcher it works just fine. (Mind you there is a lot of rearranging between these tries.)   Does anyone know what is causing this? Any help is appreciated. Thanks.

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


In R (2.15.2) I fitted once an ARIMA(3,1,3) on a time series and once an ARMA(3,3) on the once differenced timeseries. The fitted parameters differ, which I attributed to the fitting method in ARIMA.   Also, fitting an ARIMA(3,0,3) on the same data as ARMA(3,3) will not result in identical parameters, no matter the fitting method I use.  I am interested in identifying where the difference comes from and with what parameters i can (if at all) fit the ARIMA to get the same coefficients of the fit as from the ARMA.  Sample code to demonstrate:  library(tseries) set.seed(2) #getting a time series manually x<-c(1,2,1) e<-c(0,0.3,-0.2) n<-45 AR<-c(0.5,-0.4,-0.1) MA<-c(0.4,0.3,-0.2) for(i in 4:n){ tt<-rnorm(1) t<-x[length(x)]+tt+x[i-1]*AR[1]+x[i-2]*AR[2]+x[i-3]*AR[3]+e[i-1]*MA[1]+e[i-2]*MA[2]+e[i-3]*MA[3] x<-c(x,t) e<-c(e,tt) } par(mfrow=c(2,1)) plot(x) plot(diff(x,1))  #fitting different versions. What I would like to get is fit1 with ARIMA() fit1<-arma(diff(x,1,lag=1),c(3,3),include.intercept=F) fit2<-arima(x,c(3,1,3),include.mean=F) fit3<-arima(diff(x,1),c(3,0,3),include.mean=F) fit4<-arima(x,c(3,1,3),method="CSS",include.mean=F) fit5<-arima(diff(x,1),c(3,0,3),method="CSS",include.mean=F)  cbind(fit1$coe,fit2$coe,fit3$coe,fit4$coe,fit5$coe)   Edit: Using the conditional sum of squares comes pretty close, but is not quite there. Thanks for the hint for the fit1!  Edit2: I do not think this is a duplicate. Points 2 and 3 address different problems than mine, and even if I override the initialisation mentioned in point 1 by   fit4<-arima(x,c(3,1,3),method="CSS",include.mean=F,init=fit1$coe)   I still get different coefficients

Is it better to difference a series (assuming it needs it) before using an Arima OR better to use the d parameter within Arima?  I was surprised how different the fitted values are depending on which route is taken with the same model and data. Or am I doing something incorrectly?  install.packages("forecast") library(forecast)  wineindT<-window(wineind, start=c(1987,1), end=c(1994,8)) wineindT_diff <-diff(wineindT)  #coefficients and other measures are similar modA<-Arima(wineindT,order=c(1,1,0)) summary(modA) modB<-Arima(wineindT_diff,order=c(1,0,0)) summary(modB)  #fitted values from modA A<-forecast.Arima(modA,1)$fitted  #fitted from modB, setting initial value to the first value in the original series B<-diffinv(forecast.Arima(modB,1)$fitted,xi=wineindT[1])   plot(A, col="red") lines(B, col="blue")   ADD:  Please note I am differencing the series once and fitting arima (1,0,0) then I am fitting arima (1,1,0) to the original series. I am (I think) reversing the differencing on the fitted values for the arima(1,0,0) on the differenced file.   I am comparing the fitted values - not the predictions.  Here is the plot (red is arima(1,1,0) and blue is the arima (1,0,0) on the differenced series after changing back to the original scale)  :    Response to Dr. Hyndman's Answer:  1) Can you illustrate in R code what I would need to do in order to get the two fitted values (and presumably forecasts) to match (allowing for small difference due to your first point in your answer) between Arima (1,1,0) and Arima(1,0,0) on the manually differenced series? I assume this has to do with the mean not being included in modA, but I am not entirely sure how to proceed.  2) Regarding your #3. I know I am missing the obvious, but are not $\hat{X}_t = X_{t-1} + \phi(X_{t-1}-X_{t-2}) $ and $\hat{Y}_t = \phi (X_{t-1}-X_{t-2})$ the same when $\hat{Y}_t$ is defined as $\hat{X}_t - X_{t-1}$? Are you saying I am "undifferencing" incorrectly?


How do we presently understand time?  Can a second be related directly to physical phenomena?   What is a second really?  Why are we sure that time is linear?

This is an attempt to gather together the various questions about time that have been asked on this site and provide a single set of hopefully authoritative answers. Specifically we attempt to address issues such as:   What do physicists mean by time? How does time flow? Why is there an arrow of time?


The following example borrow from forecastxgb author's blog, the tree-based model can't extrapolate in it's nature, but there are definitely some method to combine the benefit of tree model (interaction factors) and linear model's trend extrapolate ability.  Could anyone give some ideas?  I have seen some kaggle solution, some people advise using the linear model prediction as the tree model's feature, it can imporve the prediction result, but how to improve the extrapolate?  Another idea is using the xgboost predict the residual of the linear model, this can help the prediction a lot.   Is there anyway?  library(xgboost)  # extreme gradient boosting set.seed(134) # for reproducibility x <- 1:100 + rnorm(100) y <-   3 + 0.3 * x + rnorm(100) extrap <- data.frame(x = 101:120 + rnorm(20))  xg_params <- list(objective = "reg:linear", max.depth = 2) mod_cv <- xgb.cv(label = y, params = xg_params, data = as.matrix(x), nrounds = 40, nfold = 10)  # choose nrounds that gives best value of root mean square error on the training set best_nrounds <- which(mod_cv$evaluation_log$test_rmse_mean == min(mod_cv$evaluation_log$test_rmse_mean)) mod_xg <- xgboost(label = y, params = xg_params, data = as.matrix(x), nrounds = best_nrounds)  p <- function(title){   plot(x, y, xlim = c(0, 150), ylim = c(0, 50), pch = 19, cex = 0.6,       main = title, xlab = "", ylab = "", font.main = 1)   grid() }  predshape <- 1 p("Extreme gradient boosting") points(extrap$x, predict(mod_xg, newdata = as.matrix(extrap)), col = "darkgreen", pch = predshape)     mod_lm <- lm(y ~ x) p("Linear regression") points(extrap$x, predict(mod_lm, newdata = extrap), col = "red", pch = predshape)

When it comes to decision trees, can the predicted value lay outside of the range of the training data?  For example, if the training data set range of the target variable is 0-100, when I generate my model and apply it to something else, can my values be -5?  or 150?  Given that my understanding of decision tree regression is that it is still a rules based - left/right progression and that at the bottom of the tree in the training set it can never see a value outside a certain range, it will never be able to predict it?


I installed Ubuntu 16.04 LTS on my HP 15-ay103nm and Wi-Fi network is too slow. It's supposed to be about 40Mb/s but it is about 7Mb/s.  And Wi-Fi icon on top right is weird. Now it is full signal and for 30s will be half full.  Can someone help me how to fix this problem?  P. S. I have dual boot, legal Windows Home 10 and this Ubuntu 16.04 LTS. On Windows everything is excellent!

I have installed Ubuntu 15.04 on my laptop with RTL8723BE Wi-fi card. But it is always disconnecting from network. I have tried echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf but that didn't helped. What can I do to prevent the wifi from disconnecting? If I upgrade to kernel 4.X, will it help?  ~$ lspci -knn | grep Net -A2  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be   ~$ rfkill list 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   ~$ ifconfig && iwconfig && route -n && ping -c 1 google.com eth0      Link encap:Ethernet  HWaddr 38:63:bb:cd:4a:7e             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:3 errors:0 dropped:0 overruns:0 frame:0           TX packets:53 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:752 (752.0 B)  TX bytes:8445 (8.4 KB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:3870 errors:0 dropped:0 overruns:0 frame:0           TX packets:3870 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:314613 (314.6 KB)  TX bytes:314613 (314.6 KB)  wlan0     Link encap:Ethernet  HWaddr c0:38:96:6d:c4:83             inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::c238:96ff:fe6d:c483/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15240 errors:0 dropped:0 overruns:0 frame:0           TX packets:14627 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:14410285 (14.4 MB)  TX bytes:2192744 (2.1 MB)  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:"DIR-615"             Mode:Managed  Frequency:2.437 GHz  Access Point: 00:90:4C:08:00:0D              Bit Rate=150 Mb/s   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-22 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:186   Missed beacon:0  lo        no wireless extensions.  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    400    0        0 wlan0 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0 PING google.com.Dlink (172.26.136.19) 56(84) bytes of data. 64 bytes from 19.136.26.172.in-addr.arpa (172.26.136.19): icmp_seq=1 ttl=249 time=102 ms  --- google.com.Dlink ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 102.547/102.547/102.547/0.000 ms


I have two drives and I installed Ubuntu 17.10 while my Windows 7 drive was mounted. Therefore GRUB was accidentally installed to drive with windows 7. I've been using it for months and it's working ok, but how can I move GRUB to the drive where Ubuntu is installed?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I will explain my problem with following pictures:      As you can see there is the column 'BvD ID number' that has the same variables (in picture 2 they occur more often). I would like to merge these two so that I can have picture one with the added information of picture 2.  How can I do this?  Thanks in advance

I'm looking to use Excel to look up and return multiple reference values for a given key. VLookup does something very similar to what I need - but only returns a single match.   I assume it'll involve array-returning and handling methods, though I haven't dealt with these before. Some Googling starts to lean on the if([lookuparray]=[value],row[lookuparray]) as part of a solution - though I can't get it to return a single match...  For example, if I have this reference data:  Adam    Red Adam    Green Adam    Blue Bob     Red Bob     Yellow Bob     Green Carl    Red    I'm trying to get the multiple return values on the right. (Comma separated, if possible)  Red      Adam, Bob, Carl Green    Adam, Bob Blue     Adam Yellow   Bob   (I already have the key value on the left - no need to pull out those values)  Any help as to how to approach handling multiple values in th this context is apprecited. Thanks.


Is there a difference between these two sentences? Are they the same?   What color do you like the best? What color do you like best?   Is there a difference in their meaning?

I came across with this sentence and it cast me doubt the usage of "most" and "the most"   The sentence states: "But what I remembered most is moving a lot"  Would it change the meaning of the sentence if I interchange "most" with "the most"? I am a little confused about when to use these words.  Previous to this post I searched for the difference between these words but I think I need not only the definition but examples to distinguish their usage. Thank you


I am new to Flask and I found this Flask_WTF or Flask Forms. I just dont see the need for it. We can do similar things with HTML. I understand that Flask forms have internal validations but we can provide better javascript client side validations which can validate data without server trip. What is the real need of using Flask Forms? Would not HTML forms will be better so we can provide inline styling if required and will be easy to use with bootstrap.   Please suggest.

Which is better to do client side or server side validation?  In our situation we are using    jQuery and MVC.   JSON data to pass between our View and Controller.     A lot of the validation I do is validating data as users enter it. For example I use the the keypress event to prevent letters in a text box, set a max number of characters and that a number is with in a range.   I guess the better question would be, Are there any benefits to doing server side validation over client side?    Awesome answers everyone. The website that we have is password protected and for a small user base(<50). If they are not running JavaScript we will send ninjas. But if we were designing a site for everyone one I'd agree to do validation on both sides.


I know that metaphysics has to do with the fundamental nature of reality. I am just not sure if a multiverse is considered fundamental

I answered a question here with a quote with the following quote from Cosmologist George Ellis.     “Similar claims [about a multiverse] have been made since antiquity by many cultures. What is new is the assertion that the   multiverse is a scientific theory, with all that implies about being   mathematically rigorous and experimentally testable. I am skeptical   about this claim. I do not believe the existence of those other   universes has been proved—or ever could be. Proponents of the   multiverse, as well as greatly enlarging our conception of physical   reality, are implicitly redefining what is meant by ‘science.’”—pg 39      “For a cosmologist, the basic problem with all multiverse proposals is the presence of a cosmic visual horizon. The horizon is   the limit to how far away we can see, because signals traveling toward   us at the speed of light (which is finite) have not had time since the   beginning of the universe to reach us from farther out. All the   parallel universes lie outside our horizon and remain beyond our   capacity to see, now or ever, no matter how technology evolves. In   fact, they are to far away to have had any influence on our universe   whatsoever. That is why none of the claims made by multiverse   enthusiasts can be directly substantiated.”—pg 40-41      “A remarkable fact about our universe is that physical constants have just the right values needed to allow for complex structures,   including living things. Steven Weinberg, Martin Rees, Leonard   Susskind and others contend that an exotic multiverse provides a tidy   explanation for this apparent coincidence: if all possible values   occur in a large enough collection of universes, then viable ones for   life will surely be found somewhere. This reasoning has been applied,   in particular, to explanation the density of the dark energy that is   speeding up the expansion of the universe today. I agree that the   multiverse is a possible valid explanation for the value of this   density; arguably, it is the only scientifically based option we have   right now. But we have no hope of testing it observationally.”—pg 42      “All in all, the case for the multiverse is inconclusive. The basic reason is the extreme flexibility of the proposal: it is more a   concept than well-defined theory. Most proposals involve a patchwork   of different ideas rather than a coherent whole. The basic mechanism   for eternal inflation does not itself cause physics to be different in   each domain in a multiverse; for that, it needs to be coupled to   another speculative theory. Although they can be fitted together,   there is nothing inevitable about it. … Nothing is wrong with   scientifically based philosophical speculation, which is what   multiverse proposals are. But we should name it for what it is.”—pg 43   Now with this in mind if these theories cannot be independently verified should their truth not lie in  method outside physics or what is also known as meta physics?


So the Ubuntu 20.04's notification settings changed its toggle label from "Notification Popups" to "Do Not Disturb". And in the previous versions I could permanently disable these popups with that toggle. But after upgrading to 20.04 from 19.10, I have to manually set it to Do Not Disturb on every boot. Is there a way to keep it disabled?

I am trying to remove the popup notifications completely from Gnome. The notifications I mention are this:    I do not wish to see ANY notification at all from any app. Mainly because of 2 things:   Notification get in the way of me clicking a Browser tab Notification stays way too long in there when I am in a hurry   Since I can't find a way of making the notification smaller (at least in an easy manner), moving it somewhere else, or even telling the option of Do Not disturb to stay fixed (when I reboot the PC it goes back to off). I am then looking for a way to completely disable this notifications altogether.  I have tried going to settings and disabling everything in there with no luck (and also because I can't do one app at a time and the idea of an option for DISABLE ALL is not there).


I've got a folder that has 0600 chmod permission and this folder has a sh script.  I'm trying to limit some permissions but I've realized that if the folder has not a execute permission, unless for the user, I can't access using cd command, so that I can't execute my script. The script has the proper permission (0700)  Is this right? I don't understand why. Could anybody explain me the function of execute permission in folders?  Thanks a lot!

I am having a bit of trouble understanding what the execute permission means for directories. Do I understand it correctly that anything in a directory for which a user does not have x-rights is inaccessible even if the things inside the directory gives specific rights to the user?  Or will the user still have direct access to the things in the directory, but simply cannot list what is in the directory?  (What I am really trying to understand is how safe a directory is from access from other users if they do not have x-permission for it.)


Context: I'm studying for my discrete mathematics exam and I keep running into this question that I've failed to solve. The question is as follows.    Problem: The main form for normal induction over natural numbers $n$ takes the following form:   $P(1)$ is true, and for every $n, P(n-1)\to P(n).\qquad\qquad\qquad\text{[Sometimes written as $P(n)\to P(n+1)$]}$   If both 1 and 2 are true, then $P(n)$ is true for every $n$.  The question is to prove the correctness of the form above.    My work: My idea was to make a boolean statement and if it's a tautology in a true false table. That means the statement is always correct.  I've tried many times but I've failed.  Here is the original question in Hebrew:  n טענה כלשהי לגבי מםפר טבעי  $P(n)$ תהי   אם מתקימיים שני התנאים הבאים:  1- הטענה $P(0)$ נכונה  2- לכל n>0, $P(n)$ נכונות הטענה $P(n-1)$ גוררת את נכונות הטענה   אז $P(n)$ נכונה לכל מספר טבעי n  הוכיחו את נכונות משפט זה

What makes induction (over natural numbers) a valid proof technique? Is $$ \dfrac{ P(0) \quad \forall i \in \mathbb{N}. P(i) \Rightarrow P(i+1) }{ \forall n \in \mathbb{N}.  P(n)} $$ just taken for granted as a proof rule, or can it be derived from more foundational axioms?  Similarly, can the principle of induction over well-founded sets be derived from something more foundational, or does it have to be assumed to be a valid inference rule?


I want to write a ant/maven script to download and install some of the internal applications.  I am looking for tool which can give functionality like wget or curl so that I can directly call that from ant/maven it should support multiple protocols like https, ftp, http.  I expect there could be tool by Apache but not getting it.  Does http://hc.apache.org/ works as wget/curl I want all the verification like ssl certificate verification and all.

I am tasked with writing an authentication component for an open source JAVA app.  We have an in-house authentication widget that uses https.  I have some example php code that accesses the widget which uses cURL to handle the transfer.    My question is whether or not there is a port of cURL to JAVA, or better yet, what base package will get me close enough to handle the task?   Update:  This is in a nutshell, the code I would like to replicate in JAVA:  $cp = curl_init(); $my_url = "https://" . AUTH_SERVER . "/auth/authenticate.asp?pt1=$uname&pt2=$pass&pt4=full"; curl_setopt($cp, CURLOPT_URL, $my_url); curl_setopt($cp, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($cp); curl_close($cp);   , I think you're on the right track, I think I'm going to end up using HttpsURLConnection and then picking out what I need from the response.


I got some curious here.  On Stack Exchange, my preview name is a regular text (Ahmad Azwar Anas). But in another portal, in example, the Ubuntu portal, I got some alphanumeric combination, such as userXXXX.  What is going on? Can it become a single preview?  A link that explains it clearly will be admirable. Hehehe. I can not find it through Google. {Oh... my bad.}

I noticed, when viewing a question on the , that my username and profile is not correct.  , and .  Something is weird here:   My profile "about" section is filled in and I have the Autobiographer badge. I certainly never manually filled in the about page there so clearly this account is connected to my main account as the profile text was filled in automatically. Yet, the username and avatar does not match. Also I have the association bonus there, so it definitely wasn't me logging in randomly, I must have been already logged in as myself network-wide when I created that account (assuming I created that account).  The "private information" section in that user900 profile is completely blank (no full name, no email address), unlike all of my other profiles. Only the "about me" is really filled in.   Points 1 + 2 = there's no reason why the username or avatar should be different.  Point 3 is a mystery.  Also I am quite sure it's connected to my account. When I log out of Literature it does log me out of the entire network. And when I log in to the network, that account on Literature shows up again.  What is going on here? Is this a bug? An accidental merge? Did I do something weird?   None of this makes any sense to me. There's no reason why I should have a profile with a generic username and gravatar on that site given the other observations.  Additional random data points:   I use the same Google login for everything here. Just to be sure I reviewed account activity for my Google account. There are no security alerts, no unrecognized devices, and no suspicious logins or other activity. I do not use the mobile apps. I sometimes use the mobile site through my phone, but I checked my phone's browser history (which I have not cleared since January) and confirmed that I have never visited that site there. Looks like I haven't cleared my desktop browser history either, and I can at least verify that I did indeed create the account on March 1st, there is a visit to the  and the first question I visited was , although it does not appear that I took any actions there. According to my browser history I edited my profile, or at least visited the edit page, on March 2 (via MSE) and March 4 (via SO). I would have applied the changes to all communities. According to  the Literature site profile was updated on March 3, two days after it was created. Not sure if this is a red herring, but these events did all happen around the same time. Yesterday, I had an unregistered account on the UX site merged with mine (long story), it seemed to happen without a hitch, not sure if that's related.


For the Black-Scholes market model where the price of the riskless asset (bond) satisfies $$dB_t=rB_tdt, B_0 = 1$$ for some $r>0$ and the stock price evolves according to $$dS_t = µS_tdt + σS_tdW_t, S_0 = 1,$$ where $µ, σ > 0$ constants and $W_t$ is a (standard) Brownian motion. With fixed time horizon $T > 0$, and fixed a constant $K>0$. How can we find the price of the European call option $$G=f(S_T ) $$ where $f(x) = (x − K)_+$.  I was wondering if anyone could help me? Thanks.

I use this  to read the option pricing in Black-Scholes model in pages 93-99, The proof of the formula given by $$c(s,t)= N(d_1(s,t)- Ke^{-rT}N(d_2(s,t)))$$ where  $$d_{1,2}=\frac{\ln(s/K)+(r\pm \frac{1}{2}\sigma^2)t}{\sigma \sqrt{t}},$$   seem  for me more  long to read. Where do I find a short demonstration with adequate assumptions?


The question is to Show that $\tau(n) \leq 2\sqrt n$. Am given the hint; if $d|n$, then one of $d$ or $n/d$ is less than or equal to $\sqrt n$. ($\tau(n)$ is the number of divisors of $n$) I just dont know how to start, pls any useful insight will be appreciated.  EDIT; the only thy i could do was; if $d$ and $d'$ are divisors of $n$ then, $d^2+(d')^2+2d \dot d'=(d+d')^2$ or $2d \dot d' \leq (d+d')^2$ or $\sqrt(2d \dot d') \leq (d+d')$ or $\sqrt(2n) \leq (d+d')$ and if we add up for all divisors we obtain $\tau(n)/2 \sqrt(2n) \leq \sigma (n)$

In Waclaw Sierpinski's book Elementary Theory of Numbers on page 168 there is the following exercise:  "Exercises. 1. Prove that for natural numbers $n$ we have $d(n) \leq 2\sqrt{n}$," where $d(n)$ is the number of divisors of n.  As a hint right below is given: "The proof follows from the fact that of two complementary divisors of a natural number $n$ one is always not greater than $\sqrt{n}$.  I understand the hint but I don't know how it can be used to prove $d(n)\leq 2\sqrt{n}$.  Complementary divisors are pairs of divisors that when multiplied gives the number that is to be divided. For example the number $120$ has the complementary divisors: \begin{align*} & 1, 120 \\ & 2, 60 \\ & 3, 40 \\ & 4, 30 \\ & 5, 24 \\ & 6, 20 \\ & 8, 15 \\ & 10, 12 \\ \end{align*} How do you prove that $d(n) \leq 2\sqrt{n}$?


I have a Product content type with these fields; title, body, and one entity reference revisions(Paragraph: field_select_module). I am creating a custom REST API(custom module) to export the fields in the JSON. I am able to print the title and body. Could someone help me to print the paragraph fields which have title and image(Media) and title and image will repeat 3 times. It should be inside this array 'product_list' => array(), Here is my controller. <?php  namespace Drupal\drupalup_json_api\Controller;  use Drupal\Core\Controller\ControllerBase; use Drupal\node\Entity\Node; use Symfony\Component\HttpFoundation\JsonResponse; use Drupal\paragraphs\Entity\Paragraph;  /**  * Controller for export json.  */ class JsonApiController extends ControllerBase {    /**    * {@inheritdoc}    */   public function data() {     $json_array = array(       'data' => array()     );     $nids = \Drupal::entityQuery('node')->condition('type','product_main_categories')->execute();     $nodes =  Node::loadMultiple($nids);      foreach ($nodes as $node) {       $json_array = array(         'id' => $node->get('nid')->value,         'title' =>  $node->get('title')->value,         'content' => $node->get('body')->value,         'product_list' => array(                      ),       );     }     return new JsonResponse($json_array);   } }

I'm using paragraphs in my content type. I've created a paragraph type and added content. Now I want to load the paragraphs in a foreach. But nothing's showing up. $paras is empty:  $node  = \Drupal\node\Entity\Node::load(1); $paras = $node->get('field_paragraph')->referencedEntities();


I am new to Blender so I started to watch tutorials. Recently i have been doing tunnel tutorial. But i have problem with rendering.   As you can see on the picture above there is a problem with tracks and walls. As for the walls i dont know if it is a issue with textures or rendering. But on the rails there is no textures, yet there is a problem. I tried to render only rails and lights and i still get same result. I am rendering on Blender render. I am working on default Blender settings, so maybe i need to adjust settings to my computer. Best regards

I was following  on creating a watch and noticed that when I rendered the watch, some pieces were messed up.  I'm new to 3D modeling and I've just learned Blender, I can't explain it well, so here's a picture:    Other examples:     I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?


Do there exist $a, b> 1$, such that  $$ a^4 \equiv 1 \pmod{b^2}$$ and $$ b^4 \equiv 1 \pmod{a^2}.$$

Are there solutions in integers $a,b>1$ to the following simultaneous congruences? $$ a^4\equiv 1 \pmod{b^2} \quad \mathrm{and} \quad b^4\equiv1 \pmod{a^2} $$  A brute-force search didn't turn up any small ones, but I also don't see how to rule them out.


I want to see if two objects in the same array list are the same. Similarly if there are not objects that are the same in the array list I also want to display an appropriate message. At the moment it is printing too much. I just want it to display one line: "there are books that are the same" or "there are NO books that are the same". Here are my efforts so far.  public static void main(String[] args) {      List<Book> listOfBooks = new ArrayList<>();     Book book1 = new Book();     Book book2 = new Book();     Book book3 = new Book();      listOfBooks.add(book1);     listOfBooks.add(book2);     listOfBooks.add(book3);     listOfBooks.add(book2);      for (Book bookA : listOfBooks) {         for (Book bookB : listOfBooks) {             if (bookA.equals(bookB)) {                 System.out.println("there are books that are the same");             }             System.out.println("there are NO books that are the same");         }      } }   Thanks in advance.  EDIT: I amended my code as such according to "duplicate question"  List<Book> listOfBooks = new ArrayList<>();     Set<Book> setOfBooks = new HashSet<Book>(listOfBooks);      Book book1 = new Book();     Book book2 = new Book();     Book book3 = new Book();      listOfBooks.add(book1);     listOfBooks.add(book2);     listOfBooks.add(book3);      if (setOfBooks.size() < listOfBooks.size()) {         System.out.println("there are duplicates");     } else {         System.out.println("there are no duplicates");     }   Still prints "there are duplicates" when there clearly are not.   RESOLVED: Ordering of my code was incorrect. Solution-      List<Book> listOfBooks = new ArrayList<>();      Book book1 = new Book();     Book book2 = new Book();     Book book3 = new Book();      listOfBooks.add(book1);     listOfBooks.add(book2);     listOfBooks.add(book3);      Set<Book> setOfBooks = new HashSet<>(listOfBooks);      if (setOfBooks.size() < listOfBooks.size()) {         System.out.println("there are duplicates");     } else {         System.out.println("there are no duplicates");     }

How could I go about detecting (returning true/false) whether an ArrayList contains more than one of the same element in Java?  Many thanks, Terry  Edit Forgot to mention that I am not looking to compare "Blocks" with each other but their integer values. Each "block" has an int and this is what makes them different. I find the int of a particular Block by calling a method named "getNum" (e.g. table1[0][2].getNum();


Let $K$ be a complete discrete valuation field. That is, suppose that $K$ is a field, and that there is a map $\nu : K^{\times} \rightarrow \mathbb{Z}$ such that $\nu(a+ b) \geq \nu(a) \vee \nu(b)$, $\nu(1) = 0$, and $\nu(ab) = \nu(a) + \nu(b)$. How might I show that there are no other valuations on this field? For instance, when we complete $\mathbb{Q}$ to $\mathbb{Q}_p$, the other valuations $\nu_q$ disappear for $q \neq p$.

I'm stuck on a question in an exercise on p-adic numbers. Actually, let $p$ a prime number, $F/\mathbb{Q}_p$ a finite extension of fields, $\mathcal{O}$ the integral closure of $\mathbb{Z}_p$ on $F$, $\mathfrak{p}$ the maximal ideal of $\mathcal{O}$.   We have already shown that : $\forall l \in \mathbb{N}_{\geq 2}$, $\gcd(l,p)=1 \;\forall x \in \mathfrak{p} \; \exists y \in \mathcal{O} \quad y^l=1+x$, using Hensel's lemma.    Now, the next question is :      Deduce from this that for any non trivial valuation $w$ on $F$, if we are   noting $\mathcal{O}_w$ its valuation ring, we have  : $\mathcal{O} \subset O_w$.   (We know as well that if we are noting : $v(x) = v_p(N_{F/\mathbb{Q}_p}(x))$, then $\mathcal{O} = \{ x \in F \; | \; v(x) \geq 0\}$)  To do this, I thought to show that $\mathbb{Z}_p \subset O_w$, as $O_w$ is integrally closed on $F$, we would have $\mathcal{O} \subset O_w$.  Now, if $x \in \mathbb{Z}_p$, $x = \frac{a}{b}$, where $\gcd(p,b)=1, \gcd(a,b)=1$. We also know that the restriction to $\mathbb{Q}$ of $|.|_w$ (which is the n.a absolute value corresponding to the valuation) is either trivial or $|.|_q$ for a prime $q$, by Ostrowski's theorem. So : $w(x) = w(\frac{a}{b}) = w(a)-w(b)$. If $w$ is trivial over $\mathbb{Q}$, $w(x) = 0$ and we have the result. Otherwise, $w(x) = v_q(a) - v_q(b)$. But then I'm stuck, cause actually the result I have to prove indicates that $q=p$, but there is no way (I found) from here to conclude this (and it's actually quite normal, cause this is what implies the next question).  So, anyone could help me, please ?  Thank you !


I have to show the following equation:  $\int_{0}^{\pi} t \cdot f(sin \; t) \; dt = \frac{\pi}{2} \int_{0}^{\pi} f(sin \; t) \; dt$  with $f : [0, 1] \rightarrow \mathbb{R}$ is continuous.  I transformed both sites to the following:  $\int_{0}^{\pi} t \cdot f(sin \; t) \; dt = \pi \cdot F(sin \; \pi)$ and  $\frac{\pi}{2} \int_{0}^{\pi} f(sin \; t) \; dt = \frac{\pi}{2} F(sin \; \pi) - \frac{\pi}{2} F(0)$  Now I don't know how to go on, because I do know nothing about $f(x)$ or $F(x)$. Is my approach correct or is there a other possibility to show the equation?

Let $f(\sin x)$ be a given function of $\sin x$.   How would I show that $\int_0^\pi xf(\sin x)dx=\frac{1}{2}\pi\int_0^\pi f(\sin x)dx$?


I need to iterate through an arrayList and add/remove elemets from it based on some conditions. The issue is that after adding/removing the arrayList's size changes and therefore I get a Null Pointer Exception error. Any help would be appreciated.  public class hello{    MyArrayList<Integer> list = new MyArrayList<>();    list.add(1);    list.add(2);    .......    for (int i = 0; i < list.size(); i++){        if(//some condition){           list.add(//something);        }        else if(//some condition){            list.remove(//something);        }     }  }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm trying to bake muffins with a convection oven that has a steaming function. Without using steam, the muffins' edges will set first whilst the middle remains soft and when that rises, the muffins will end up pointy. Introducing steam seems to solve this issue and the muffins will rise evenly this time. However, they will shrink after a couple minutes on the rack. Please note that we're talking here about high protein muffins with added whey protein. They're also sugar-free, gluten-free and low-fat (I know, right? Sounds impossible!). So the batter has a higher than usual liquid content to mitigate for the lack of gluten, fats and sugar and high protein and fibre content which would lead to a very dense and heavy product. How to approach this type of product with this type of oven?

Here is the recipe I used, I did not mix it for long, as that make the muffins very hard.   The muffins were very hard, and had a bad after taste and smell. I missed adding some oil, but what else could be the reason ?   Red Millet Flour, 50 g Whole Wheat flour, 50 g Toasted Oat Bran, 40g Whole Green Mung Beans - Sprouted, 100 g Domino - Light Brown Sugar 50g Baking Soda, 2 tsp Salt, 1 Tablespoon Liquid Egg White, 4 eggs 100% Whey (Vanilla), 75g Chobani - Greek Yogurt - 0% Vanilla, 5.3 oz (small packet) Carrots - Raw, 1 cup, grated Bananas - Raw, 1 cup, mashed White, all-purpose, enriched, bleached, 40 g   Also I wanted to try yeast instead of baking soda, but due to eggs and other veggies I cannot let is rise overnight (any ideas ?). I was trying to make good protein muffins which are an ideal breakfast, grab one with a glass of milk and done!   They run approximately 160 calories per muffin 25g carbs, 1g fat, 12g protein.


I would like to change the grey fonts to black. on all sites. I have trouble reading the gray fonts. Can I change them to black?

Of late, I've noticed that many web sites seem to be using light grey text for many sections of their sites. Some such sections include - the text (link, usually) that shows in the status bar at the bottom of the browser when you hover the mouse over a link on their page, the indicator text in form fields to be filled in (e.g. the word "email" in the email address field), and many other elements on the page.  That light grey makes it much less readable.    Not sure whether is a new trend, or something to do with my browser settings (I haven't changed them lately, AFAIK), or Google Chrome, which is my browser. This is on Windows 7 running on a Dell Vostro laptop. I added the info about the laptop because I suspect the problem may even be due to my hardware settings, since I found the default brightness to be too high after I bought it, and changed it via Control Panel.  Would like to know what are some of the things I can check or change to solve this.  Thanks.


My script  #!/bin/bash  for i in *_TEx_*.dat; do     file1=$i done  for i in *_TEy_*.dat; do     file2=$i done  echo file1="$file1" echo file2="$file2"  awk '$0+0 == $0 { printf "%.3f\n", $0 / .05 }' "$file1" > ex65536.dat awk '$0+0 == $0 { printf "%.3f\n", $0 / .05 }' "$file2" > ey65536.dat  mv *.dat /home/milenko/birrp  mycd() {     cd /home/milenko/birrp }  mycd   But   milenko@milenko-HP-Compaq-6830s:~/procmt$ pwd /home/milenko/procmt   What is wrong with my instructions to change the working directory?

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


Let $x_n = \sum_{k=1}^{n} \frac{1}{k} - \log n$. Prove that $x_n$ converges as $n \to\infty$.

I'm searching for a really simple and beautiful proof that the sequence $(u_n)_{n \in \mathbb{N}} = \sum\nolimits_{k=1}^n \frac{1}{k} - \log(n)$ converges. At first I want to know if my answer is OK.  My try: $\lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} - \log (n) = \lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} + \sum\limits_{k=1}^{n-1} \log(k)-\log(k+1) = \lim\limits_{n\to\infty} \frac{1}{n} + \sum\limits_{k=1}^{n-1} \log(\frac{k}{k+1})+\frac{1}{k}$     $ = \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ Now we prove that the last sum converges by the comparison test: $\frac{1}{k}-\log(\frac{k+1}{k}) < \frac{1}{k^2} \Leftrightarrow k<k^2\log(\frac{k+1}{k})+1$ which surely holds for $k\geqslant 1$      As $ \sum\limits_{k=1}^{\infty} \frac{1}{k^2}$ converges $ \Rightarrow \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ converges and we name this limit $\gamma$ q.e.d


I know that passed arguments inside function are copies of data passed to the function. But why is it that you can change arrays and objects but not strings and numbers by changing them as arguments inside function ? Array example: const numbers = [1, 2]  const change = (arg) => {   arg.push(3) };  change(numbers);  console.log(numbers); // [1,2,3] - arr changed!  Number example: const number = 2  const change = (arg) => {   arg = arg + 1 };  change(number);  console.log(number); // 2 - number didn't change

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


I have a custom list in which i have created a calendar view.   I want to color the calendar items based on a choice column. In SP2010, I had a JavaScript doing this but in SP Online, I am not able to achieve this.   Please note: Calendar Overlay option is not available as this is a custom list.

I have SharePoint calendar and I want the entries to be in color based on status. If user add one entry and status is initially pending then that task would be in green, later it get changed to in progress then task color should change to yellow and blue for resolved.  Resolved=blue in progress=yellow pending=green   How can I achieve this, can anyone provide me javascript code for same


I have a table and am trying to include a caption and label. The caption is printed but with the wrong number. It is my first table in the document, but latex uses the number of my Chapter (3.1) for the table. I tried fixing it by manipulating the counter, but it will only change between 3.1 and 3.2.   This is my code:  \setcounter{table}{0}  \begin{table}[h!] \begin{tabu}to 0.8\textwidth { | X[c] || X[c] | X[c] | } \hline Measure & Min & Max \\  \hline \hline One & 1 & 26 \\  \hline Two & 6.353 & 2.2 \\  \hline Three & 0 & 8.46 \\  \hline Four & -16.86 & -2.94 \\  \hline \end{tabu} \caption{Statistics of indices} \label{table:1} \end{table}   Can somebody help? I've been fighting with this table for hours and would really appreciate tips!

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


getListing () {     if [ "$1" = ""];     then         alcListDir ~/Projects/Haskell/ -f \             | alcSortPath time | tac | xargs -n1 basename     else         alcListDir ~/Projects/Haskell/"$1"/ -f \             | alcSortPath time | tac | xargs -n1 basename | sed -e "s/^/"$1"\//"     fi }   The above is giving me an error (when run with set -x) of:  +./rofi.sh:29> getListing '' +getListing:1> [ '' '=' ']' getListing:1: parse error: condition expected:    I'm invoking the function like so: getListing ""  What is the cause of the error?

I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month="01"] && [$day="01"]; then         date="$last_month/$yes_day/$last_year"         fulldate="$last_month/$yes_day/$last_year" else         if [$month="01"] && [$day="02"]; then                 date="$last_month/$yes_day/$last_year"                 fulldate="$last_month/$yes_day/$last_year"         else                 if [ $day = "01" ]; then                         date="$last_month/$yes_day/$year"                         fulldate="$year$last_month$yes_day"                 else                         if [ $day = "02" ]; then                                 date="$last_month/$yes_day/$year"                                 fulldate="$year$last_month$yes_day"                         else                                 date="$month/$yes_day/$year"                                 fulldate="$year$month$yes_day"                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found


I'm newbie in ubuntu and I'm trying to program an AVR micro-controller , i searched a lot for a suitable program and found at last a program called "extreme burner" but it doesn't work !  apt-get install avrprog Reading package lists... Done Building dependency tree        Reading state information... Done Package avrprog is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'avrprog' has no installation candidate

What does the above Error mean? What is an installation candidate?  I was trying to do  sudo apt-get install munin-memcached     and I get this message:  Reading package lists... Done Building dependency tree        Reading state information... Done Package munin-memcached is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package munin-memcached has no installation candidate   I googled for the problem and someone said to do a apt-get upgrade but it still did not solve my problem.


I see two possible solutions:   Put the answering form immediately below the question (in the collapsed state by default) Put a copy of the question near the answering form.

Often when I edit one of my answers, it's because I want to better address the original question. The only problem is that I can't see the original question while I'm editing my answer!  I'd love to see the original question text beneath the "answer edit" form. This way I could scroll down slightly to read it if I wanted to, or just ignore it if not.  Current workaround is to click the 'return to answer' link and hope that you remember to launch it in a new tab/window, then tab back and forth.    Imported from this uservoice item:


I've got a friend who has been completely abandoned by his previous website guy.  Yes, the guy was cut rate, and yes, you get what you pay for.  Anyway, he has asked me to help him untangle all that has been done.  Starting now, he wants to know who is actually hosting his website.  He knows for sure that the site is registered through GoDaddy, and he previously had the domain hosted there as well.  He even prepaid his hosting contract through August 2011 I believe.  Now he's receiving hosting bills from 2 other companies as well (I don't know the names of the other 2 companies at this time).  He THINKS that the programmer (who has dropped off the face of the earth) had moved it somewhere, but he doesn't know where it was moved.  Is there any way to tell from a WhoIs or some other method where the site is being hosted?  Whois reports 1 IP address, traceroute reports a different IP address.  I'm more than a little outside my comfort zone.  Any help or pointers would be much appreciated.

Is there a service that will identify where a site is hosted (presumably by IP)?


could you please tell me why  click event is not firing when I am taking selector in object; here is my code   (function(){   $(function(){     var config ={       btn:$('#btn'),       hello:$('.hello'),        bodyClickEvent: $("body"),        overlayClick: $('.overlay'),       closeBtnSelector: '#closeBtn',     };   config.btn.click(function(){     $('#container').append($('#overlay').html())     $('.popupdata').html('
xxxx
X Close
');     })   config.bodyClickEvent.on("click", config.closeBtnSelector, function () {      //why it is not working     config.overlayClick.fadeOut(500);                config.overlayClick.remove();     // below code is working fine                //$('.overlay').fadeOut(500);                //$('.overlay').remove();             });  }) })()   why these two line are not working   config.overlayClick.fadeOut(500);                config.overlayClick.remove();   when I run my code it show a button when I click on button some html is show with close button text .When I click close button it is not fadeout my html and remove.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I am running Ubuntu 16.04 and new to Ubuntu. Please let me know what I did wrong: In my system a sources.list~ file and also a trusted.gpg~ file was generated.

I have stored a text  as .txt while saving it in Gedit in Ubuntu 14.04.  But after viewing that folder, which i have stored will have two files with that name but with 'Tilde Symbol' '~' for an another file and it will be hidden!!!  Say 'a.txt' means the folder will contain '~a.txt' too, which can be viewed only by making them unhidden  Why is it so? What does it mean? Any Problem/Error with that?  How to Rectify it?


It is known that in simple harmonic motion, the total energy of the system is proportional the square of the amplitude, but how can I prove that for a simple pendulum where amplitude is the arc length of the part of the circle? Much obliged for any help.

I'm a mathematics student trying to grasp some basics about wave propagation. A sentence I find very often in introductive physics textbooks is the following:      In a wave, energy is proportional to amplitude squared.   This is something I would like to understand better in the case of mechanical (linear) waves.  The simplest model is the vibrating string of mass density $\mu$ and tension $T$: here an element of string of rest length $dx$ and vertical displacement $y(x, t)$ possesses a kinetic energy $\frac{1}{2}\mu dx \left( \frac{\partial y}{\partial t}\right)^2$ and a potential elastic energy $\frac{1}{2}T dx \left( \frac{\partial y}{\partial x}\right)^2$. So we have the total energy   $$dE=\frac{1}{2}\mu dx \left( \frac{\partial y}{\partial t}\right)^2+\frac{1}{2}T dx \left( \frac{\partial y}{\partial x}\right)^2,$$  which completely explains the sentence. Can we obtain a similar formula for higher-dimensional waves? How should I modify the above formula for a (simplified model of an) elastic membrane, for example? I would expect something like   $$dE=\text{some constant}\left(\frac{\partial z}{\partial t}\right)^2+\text{some other constant}\left\lvert\nabla z\right\rvert^2,$$  where $z=z(x, y, t)$ is the vertical displacement. Am I right?


I am trying to get everything between /* and */ I am using re library and following expression to get data pattern = re.compile(r'(?<=\/\*)(.|\n)+?(?=\*\/)') result = pattern.findall(query)  query - a string with data shown in the image (may contain line breaks, etc.) my expression is not working correctly and I get this result ['\n', '\n', '\n', '\n']  how can I get all content in between /* and */?

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


I wanted to put a link to one of the comments on  into chat. But it seems that isn't supported, for some reason. Normally you can just click the "x hours ago" link on a comment, and that takes you straight to it and lets you link to it. But on the election page there's no link, just straight text.  I'm guessing this is intentional, because it would be a really weird bug, but I'm wondering 1) why this is the case and 2) if there isn't a really compelling reason, can we change it? I'd like to be able to discuss nominations with people and point out specific comments, just like I would with any other post.

There were   on this already, and  it’s also implemented by now. And when looking at the source, I can indeed see an ID being set for every comment on election pages.  However, unlike comments on questions, there is no actual link for the permalink for comments on election pages:    Could those be added please so we can actually link to comments easily?


I am trying to sort point symbols at the same coordinates in a line. The first picture shows how I want it to be (all symbols in a single horizontal line), the second how it looks with the standard grid-based point displacement (multiple, unwanted rows of symbols, and therefor also an unwanted overlap of text and symbols).   Is there any way/plugin to either change the parameters of how the grid is built (number of rows/lines) or any other way to show symbols in a line?  I am not hugely into scripting or programming though.

I am making an atlas of protected areas using QGIS. I am using version 2.12, but this question will probably also apply to version 2.14 as well.  Several points of interest (poi) objects are presented in this atlas. Some of these, like parking, information station and viewpoint are presented as icons. When these are close to oneother it is relevant to group the icons and align them (on a line) close to a centerpoint for the poi-objects. Currently this is done using desktop publishing tools and it looks like this:    I would like to pull as much as possible of this process into the QGIS atlas system. We have many of the protecteda areas, so the gain of automating the process is potentially big.  How can this be done in QGIS?  Also see question  for context.


I just want to set a placeholder in a String to a running number in a big loop. For convenience the placeholder is %d. What is faster, using String's .format or .replace method?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


My question is this: everyone is always seen entering the Stargate from the side the kawoosh comes out. What if you entered the Stargate from the side opposite this? Would you be disintegrated, would you exit the Stargate on the other side, or would you exit the Stargate from the “normal” side-the side the kawoosh comes out?  My question is not the same as “What happens to objects that enter a Stargate from the destination side?”-I am asking about entering from the back side of the outgoing wormhole, not entering the incoming wormhole.

Related Questions:      When people dial a gate, they generally enter from the 'front' of the stargate. For convenience's sake on most planets, the 'front' of the gate is defined as the end that faces toward the DHD. Its also the side that has the 'kawoosh' splash out effect.  Even when 'space gates' were introduced in Atlantis, we get treated to a scene where some darts are guarding a gate, from only one side:    But what happens if an object entered from the 'back' (i.e., the other side) of an active gate?  Note: I'm not talking about  directions. I'm assuming a "we dialed out, now we're gonna walk around the gate and enter from the wrong side" scenario.


Because of messages I received about the mail server being insecure, I was told to change my password. This I did with relative ease, got a "verification code" to use, went through two or three steps to verify this and thought all was well. However, when I try to log into my Gmail, it asks for my user name and password. Neither the new nor old credentials work.  What do I do now?

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )


I have yet to find a suitable explanation anywhere of the formal motivations for defining conditionals with false antecedents as true. I've heard arguments along the lines of "because otherwise such-and-such won't work" or something like that. I understand that. But, my contention is this: Why even define conditionals with False antecedents in the first place. Just as easily as we say 1/0 is undefined, couldn't we just do that with conditionals ( F -----> T, F---->F,  then UNDEFINED) and avoid all the counterintuitive headaches this notion gives students?  And, pretty please StackExchange community, do your best to NOT answer "because that's how it's defined" or "your question isn't clear enough".   Regards

I know, I know, there are tons of questions on this -- I've read them all, it feels like. I don't understand why $(F \implies F) \equiv T$ and $(F \implies T) \equiv T$.  One of the best examples I saw was showing how if you start out with a false premise like $3=5$ then you can derive all sorts of statements that are true like $8=8$ but also false like $6=10$, hence $F \implies T$ is true but so is $F \implies F$.  But for me examples don't always do it for me because how do I know if the relationship always holds even outside the example? Sometimes examples aren't sufficiently generalized.  Sometimes people say "Well ($p \implies q$) is equivalent to $\lnot p \lor q$ so you can prove it that way!" except we arrived at that representation from the truth table in the first place from disjunctive normal form so the argument is circular and I don't find it convincing.  Sometimes people will use analogies like "Well assume we relabeled those two "vacuous cases" three other ways, $F/F, F/T, T/F$ -- see how the end results make no sense?" Sure but T/T makes no sense to me either so I don't see why this is a good argument. Just because the other three are silly doesn't tell me why T/T is not silly.   Other times I see "Well it's just defined that way because it's useful"... with no examples of how it's indeed useful and why we couldn't make do with some other definition. Then this leads to the inevitable counter-responders who insist it's not mere definition of convenience but a consequence of other rules in the system and so on, adding to the confusion.  So I'm hoping to skip all that: Is there some other way to show without a doubt that $(F \implies q) \equiv T$?


How to display the number of employees in each department with each salary in oracle  something like this   department_id salar_equal_1000  salar_equal_20000 city_boston city_detroit city_none 10            2                 3                 2           1            2 20            1                 2                 1           2            0   table contains data like this   department_id   salary city 10              1000   boston 10              1000   boston 10              2000   detroit 10              2000    10              2000    20              1000   boston 20              2000   detroit 20              2000   detroit   I guess i have to use the pivot statement but i am not sure need some help on this

i need a report and i should use pivot table for it.Report will be group by categories .It is not good to use case when statement because there are many categories.u can think Northwind Database as sample and All Categories will be shown as Columns and Report will show customers preference among Categories.I dont know another solution and saw examples as Stored Procedures in Internet for Sql Server.Do u know a Solution except for using case when?  Thanks


I have recently come across awk seen option. I can see it is removing duplicates in files. But unsure how it works tried google but didnt find any results, need help in clarification for the same. cat tes 1 2 3 1 1 1 3 4  with awk seen output cat tes | awk '!seen[$0]++'  1 2 3 4

This one-liner removes duplicate lines from text input without pre-sorting.  For example:  $ cat >f q w e w r $ awk '!a[$0]++' <f q w e r $    The original code I have found on the internets read:  awk '!_[$0]++'  This was even more perplexing to me as I took _ to have a special meaning in awk, like in Perl, but it turned out to be just a name of an array.  Now, I understand the logic behind the one-liner:  each input line is used as a key in a hash array, thus, upon completion, the hash contains unique lines in the order of arrival.  What I would like to learn is how exactly this notation is interpreted by awk. E.g. what the bang sign (!) means and the other elements of this code snippet.  How does it work?


I have to prove that $X^{4}-10X^{2}+1$  cannot be put as a product of two irreducible polynomials  in $\mathbb{Z}[X]$ and show that is irreducible in $\mathbb{Q}[X]$ the exercise also requires finding every root in  $\mathbb{Q}[X]$  and in $\mathbb{R}[X]$.  For the second and third part I tried to "complete squares"...  \begin{align*} X^{4}-10X^{2}+1 & =\left(X^{2}-5\right)^{2}-24=\left(X^{2}-5\right)^{2}-\left(2\sqrt{6}\right)^{2}=\\  & =\left(X^{2}-5+2\sqrt{6}\right)\left(X^{2}-5-2\sqrt{6}\right) \end{align*}  The sum of irrationals is irrational and the square root of an irrational number is irrational so the polynomials above are irreducible in $\mathbb{Q}[X]$, I don't know the proper proof for, after doing that, conclude that $X^{4}-10X^{2}+1$ is irreducible in $\mathbb{Q}[X]$.  Obviously the irrational square roots are $X=\pm\sqrt{5-2\sqrt{6}}$ and $X=\pm\sqrt{5+2\sqrt{6}}$ which are in $\mathbb{R}[X]$ and not in $\mathbb{Q}[X]$. Any ideas?

How do I show that $x^4-10x^2+1$ is irreducible over $\mathbb{Q}$? Someone says I should use the rational root test, but I don't exactly know how that applies. Thanks for any input.


Consider the following custom crypto:   We have a signed message M1 with corresponding signature S. We have the 1024-bit modulus N and their small public exponent e (with an exact value of 3). The message M1 is too large to sign directly, so instead they sign the SHA1 hash (160 bits) of the message.  The SHA1 hash forms the least significant bits and the remaining 864 bits (i.e. 1024-160) are zeroes.   So far, so good. However, the signature verification is flawed:   To verify the signature, we calculate S^e mod N. We don't verify all of the padding is zeroes.  Instead, we XOR the 160 lowest and 160 highest bits, then compare that result with SHA1(M1).  If the results match, we trust the signature.   The XOR is so that if any of the high 160 bits are non-zero, the XOR would damage the results of the low 160 bits (the SHA1 hash).  Question: given this flawed signature verification, how would you go about forging a signature for a different message, M2?  If they key used a slightly larger public exponent, say 17, would the forgery be much harder?    Here's what I've come up with so far:  We don't need the forged signature to be perfect.  The obvious goal is to create a signature that, after exponentiation, results in (from most to least significant bits): [- 160 zero bits -] [---- 704 arbitrary bits ----] [- correct 160-bit hash -]  In practice, this means the forged signature needs to be:   Somewhat small, so after exponentiation, the high 160 bits are all zero.  (i.e. S^e mod M < 2^864) After exponentiation, it only needs to end with the correct 160 bits.  (i.e. S^e mod M mod 2^160 = SHA1(M2))   As the attacker, we can append random bytes to M2 to generate different hashes, but we cannot predict the resulting SHA1 hash.  This gives us the ability to create SHA1 hashes with desirable properties, although I'm not sure what properties would be helpful.  (Factors into small primes?)  In a perfect world, we would simply keep trying new messages until we generate a hash that has an integer 3rd or 17th root, but this seems extremely unlikely. Instead, I was thinking of taking the hash and prepending up to 704 bits so the resulting number does have a 3rd or 17th root. This seems like a good candidate technique given that the ratio of fixed bits (160) is small in comparison to the number of free bits (704). Unfortunately, I'm not sure how to construct such a number and brute force is too slow for a 2^704 search space.

I assume that most of you know this, but just for the sake of context; Bleichenbacher's signature forgery () basically abuses implementations that do not check that the PKCS#1 1.5 padding of a decrypted signature is correctly layed out. Most vulnerable implementations accept cases where the embedded hash is not right-justified. With a reduced padding, the hash can be moved forward (more to the left) then the remaining bytes can be treated as "garbage", which in turn make enough room for organizing so that this number is a perfect cube. In case of public exponent 3, it means that the cuberoot of the latter number is a valid signature as seen by the wrong implementation. Actually what happens is that you're basically good with the rounded cube root of a number of your choice of the form (line29, ), and cubing it only messes up the garbage digits/places anyway.  Now, I'm wondering about the case where an implementation does check that the hash is right-justified, but doesn't check the previous bytes at all. Assuming that we're still talking about exponent 3, someone could imagine that there might be a way to find a perfect cube that ends with that particular hash, thereby utilizing the more significant digits that are not checked by the code. On the other hand, the ending digits are already restricted just by the value being a cube number. Let hashlen be the length of the hash in bits, and rsalen the much bigger length of the signature. Giving up on forging a signature for a particular hash, my intuition would tell me that if you take the last hashlen bits of the possible cube numbers for the signature (for which there are possibilities on the order of 2^1/3*rsalen*) then this set would have a non-negligible intersection/overlap with the possible hash values of size hashlen. Is it possible to sign some message feasibly by somehow utilizing the structure of the particular hash in context of these (hash, perfect cube) pairs? Conversely, is there a quick and profound argument that shows that the outlined "signature checking" (looking at only the hash at the end) does not weaken the implementation?


On my mac os 10.6.6 I'm trying to persist env variable $JAVA_HOME but it doesn't stick!  $ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home   Once I restart it won't be set anymore. The GUI way to do that is to use the Property List Editor as documented by  and on . However, after a restart:  $ echo $JAVA_HOME  $

My variables are   LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64   How to save these variables permanently ?


I've just been through the massive long process this morning of trying to identify a running application. It was for the purpose of reporting a bug this morning, but I ended up posting a question about it to AskUbuntu instead.  I fluked finding the answer this time.  I tried starting gnome-system-monitor (published name: "System Monitor"), but I couldn't work out which was the application I was looking for.  I tried going to the application's menu > About but is doesn't show the actual name of the application there. Here's a screenshot of gnome-software > About, which only shows the published name of "Ubuntu Software".   I did a web search for "ubuntu software" to see if any search results showed the name of the application. I found  that says "Development was ended in 2015 and in Ubuntu 16.04 LTS it was replaced with GNOME Software instead". I followed the link to  but the name of the application is not shown there either.  Therefore I wasn't able to report the bug, so I came to AskUbuntu. I did a search for "ubuntu software" and saw the name "gnome-software" somewhere.  I opened a terminal, used the command gnome-software, and the correct application started.  I ended up asking a question in AskUbuntu instead of reporting the bug. However, I have had this same problem many times over the last 10 years or so, and I would dearly like to solve it once and for all.  Is there a quick and easy way to identify the actual name of a currently running application?  PS This question was marked as a duplicate "This question already has an answer here:  1 answer", which effectively answers "No" to my question "Is there a quick and easy way to identify the actual name of a currently running application?", but in actual fact the answer I received from @waltinator seems to provide a method (via xprop command).

This is the situation:     Working on (the next version of) a Unity Quick List editor, I would like to add a reliable way of "restarting" launcher icons. To do so, I need to remove the icon (editing gsettings) and replace it on the same position. So far no problem. However, if the application in question is running, user will possibly lose data, as the application will quit when it's icon is removed from the launcher. What I need is a reliable way to find an application's process name, to let the editor check in the list of running processes if the application is running, and send a warning message to the user that the icon can not be restarted if the application is running.  What I did so far is make the editor look into the desktop file, to read the command, also read the command, stripped from the directory section, and furthermore look into possible remote scripts the desktop file command might refer to, looking for strings starting with "./"  Although the method seems to work well with all applications I tested it on, I have the feeling there must be an easier way to cover the problem in an "all in one" way...  Is there?  Also suggestions to catch more exceptional situations are welcome!


I downloaded Chrome, opened with Ubuntu software, but when I press install - nothing happens. In the bottom I get a message - this software comes from a 3-rd party and may contain non-free components. What do I do to install? Is it something in system settings?

How do you install Google Chrome on Ubuntu?


If a and b are co-primes and $n$ is a prime then prove that $\frac{a^n + b^n}{a+b}$ and $(a+b)$ have no common factors unless $(a+b)$ is a multiple of $n.$   I am unable to proceed, please help.

How to show that     $$ \gcd\bigg( {a^n-b^n \over a-b} ,a-b\bigg )=\gcd(n d^{n-1},a-b ) $$    $a,b\in \mathbb Z$   where $d=\gcd(a,b)$?    Note $\ $ Some of the answers below were merged from . The answers (and their comments) may depend on context provided in that question.


I've been working on an ASP.NET/C# project and ajax, and now that my ajax call works I'd like to make it secure.  For now, it works like this :   [HttpPost] public ActionResult CheckReturn(TitreWrapper titreWrap) {     string titre = titreWrap.titre;      var contexte = new intranetEntities();     var ajax = contexte.evenementiel.SqlQuery("SELECT * FROM evenementiel WHERE titrebri_evenementiel LIKE '%'+titre+'%' ORDER BY datecreation_evenementiel DESC;");     ViewBag.ajax = ajax;      return PartialView(); }   which is, I know, extremely insecure.  So I searched, and read about parameterized queries, and tried this :  [HttpPost] public ActionResult CheckReturn(TitreWrapper titreWrap) {     string titre = titreWrap.titre;      SqlParameter[] param = new SqlParameter[1];     param[0] = new SqlParameter("@titre", titre);      var contexte = new intranetEntities();     var ajax = contexte.evenementiel.SqlQuery("SELECT * FROM evenementiel WHERE titrebri_evenementiel LIKE '%@titre%' ORDER BY datecreation_evenementiel DESC;");     ViewBag.ajax = ajax;      return PartialView(); }   which didn't work as intended :( It just changed the query (which is, in a sense, extremely secure now, you can't do anything else than getting the results of the premade query).  I don't know how to do it without deeply changing my code.   Anybody got any idea ?

I've heard that "everyone" is using parameterized SQL queries to protect against SQL injection attacks without having to vailidate every piece of user input.  How do you do this?  Do you get this automatically when using stored procedures?  So my understanding this is non-parameterized:    cmdText = String.Format("SELECT foo FROM bar WHERE baz = '{0}'", fuz)   Would this be parameterized?  cmdText = String.Format("EXEC foo_from_baz '{0}'", fuz)   Or do I need to do somethng more extensive like this in order to protect myself from SQL injection?  With command     .Parameters.Count = 1     .Parameters.Item(0).ParameterName = "@baz"     .Parameters.Item(0).Value = fuz End With   Are there other advantages to using parameterized queries besides the security considerations?  Update:  This great article was linked in one of the questions references by Grotok.


I saw the sentence like 'The president to agree with the opinion.'in the news paper. I can understand the meaning of the 'to' in the sentence. Maybe I think that 'to' means 'will'. Am I right? If I am wrong, What is the right meaning of 'to' in the sentence? Please, tell me.

I saw an article starts with: "A company to launch a new product", in a news paper. I just wonder what does it mean?  Is it a kind of usage of near future? (e.g. is to do something)


The Windows key is found between the Alt keys and Ctrl keys on both   sides of the spacebar. With some keyboard manufacturers they may   substitute the Windows logo for another picture, but they key still   functions the same.   Why do keyboards commonly have two Windows keys?

Why are there two sets of the Ctrl, Alt, and Shift modifier keys when only one of each is necessary?


I have a date that is generated from the user side. However this date is in string format Here is an example below: period = '12-4-2020' how can I convert it to datetime format?

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I want that multiple things appear simultaneously on a same slide, but I don't want to calculate the number of this slide. I try to save it for futher reuse.  I want to do that several times.  For example, tikzpicture stuff simultaneously with a list.  Hre is my non working try.  \documentclass{beamer}  \newcommand{\Slide}[1]{%  \expandafter\newcommand\csname Sl#1\endcsname{\thebeamerpauses}% }  \begin{document} \begin{frame}  \begin{enumerate}[<+->]  \item  \item \Slide{A} \item   \end{enumerate}  \onslide<\SlA->{Appears on slide 2;}  \end{frame} \end{document}

I have two-column slides where there is a tikz figure on the left, and itemization on the right. There is >10 overlays due to pauses in the itemization, and some pieces of the tikz picture are added/removed/modified accordingly (with \only<>) as are the items uncovered.  It is easy to break the code by adding one \pause, because all numbers have to be rewritten.  Is there a way (no hint in Beamer Manual, chap. 9) to assign the value of beamerpause counter to symbolic names, at the point when that part gets uncovered for the first time, something like (needs multiple passes to be resolved) the following?  \begin{column}{..}    \only</bar->{...}  % <2-> (use e.g. / to reference labels)    \only<-/baz>{...}  % <-3> \end{column} \begin{column{..}    \begin{itemize}       \item foo \pause       \item bar \firstUncoveredLabel{bar}\pause % assign 2 to label /bar       \item baz \pause[baz]       % nicer syntax; assign 3 to label /baz       \item end    \end{itemize} \end{column}   EDIT: minimal working example:  \documentclass{beamer} \usepackage{tikz} \begin{document}    \begin{frame}       \begin{columns}          \begin{column}{.5\textwidth}             \tikz{                \draw< -3>        (0,0) grid (3,3);                \draw<2-3>[red]   (0,0) -- (3,1);                \draw<3- >[green] (0,0) -- (3,2);                \draw<4  >[blue]  (0,0) -- (3,3);             }          \end{column}          \begin{column}{.5\textwidth}             \begin{itemize}                %%%% uncomment this item and all numbers above have to be shifted :-(                % \item important remark at the beginning \pause                 \item grid \pause                \item grid, red \pause                \item grid, red, green \pause                \item green, blue             \end{itemize}          \end{column}       \end{columns}    \end{frame} \end{document}   and this is what I dream of (does not compile):  \documentclass{beamer} \usepackage{tikz} \begin{document}    \begin{frame}       \begin{columns}          \begin{column}{.5\textwidth}             \tikz{                %% use symbolic names for overlay specificaiton                \draw<-/gridRedGreen>                (0,0) grid (3,3);                \draw</gridRed-/gridRedGreen>[red]   (0,0) -- (3,1);                \draw</gridRedGreen->        [green] (0,0) -- (3,2);                \draw</last>                 [blue]  (0,0) -- (3,3);             }          \end{column}          \begin{column}{.5\textwidth}             \begin{itemize}                %%%% uncomment and overlays are still correct :-)                % \item important remark at the beginning \pause                 \item grid                \pause[grid]                \item grid, red           \pause[gridRed]                \item grid, red, green    \pause[gridRedGreen]                \item green, blue                   \end{itemize}          \end{column}       \end{columns}    \end{frame} \end{document}


I am having problem in rasterizing a polygon shapefile: "island" polygons (I mean polygons which are totally included into a larger one) are ignored and do not appear in the raster. My code is:  seg <- readOGR(dsn="my path", layer="seg_10_9_5s")  map <- raster(map2007.tif) # import of raster of same extension than shape # the shape has only a field with a unique id for each polygon length(unique(seg@data$id))  # give me the right number of polygons (1568) print(seg@data)  # everything seem OK nrow(seg@data)   # 1568 idpol <- unique(seg@data$id)  # give me a vector of 1568 id values  # rasterize the polygons segr <- rasterize(seg,map,"id") writeRaster(segr, filename="seg.tif", mat="GTiff", overwrite=TRUE,datatype='INT2S')  # I  look for the values of grid cells freq <- freq(segr)  # freq has only 1492 rows! f <- freq[,1] f # I compare the list of value in vector and raster setdiff(idpol,f)  # id of polygons which are absent from the raster   In QGIS I display the shape and seg.tif, the polygons identified as lacking in raster were not rasterized, the cells get the value of the surrounding polygon.  Maybe the problem is with the original shapefile? but it seems OK.  I put the shape and the map in    Can anyone see what I'm missing here?

Similarly to this post    the rasterize function in the raster package is giving me problems with enclosed polygons. In my case, some enclosed polygons are rasterized with cell values equal to the enclosing polygons, as they were somehow 'merged'.   Here's my sample code  require(sp) require(rgdal) require(rgeos) require(raster)  ## set wd wd <- 'M:/foo' setwd(wd)  ## open shapefile sample.poly <- readOGR(dsn=wd, layer='sample')  ## rasterize resol <- 10 r <- raster(res=resol, ext=extent(sample.poly)) sample.r <- rasterize(sample.poly, r, 'Code')   ## export files writeRaster(x=sample.r, filename='sample.tif', format='GTiff') writeOGR(obj=sample.poly, dsn=wd, layer='sample', driver='ESRI Shapefile')   Here's the structure of table of attributes  str(sample.poly@data) 'data.frame':   11 obs. of  2 variables: $ OBJECTID: num  6249 14593 14614 15434 15683 ... $ Code    : int  33200 32110 33300 32410 32210 31210 33300 32110 32210 31210 ..   data$Code are CORINE LCM-like codes. I already tried to set them as characters instead of integers, but the same error occurred.  Here's how the sample shapefile looks like (in QGIS)    and here's the result of rasterize    As you can see, the enclosed polygon marked with yellow arrow is properly rasterized, while the one marked with the red arrow is 'dissolved' in the enclosing polygon.   Any suggestion? Is it a bug? This is just a sample taken from a larger shapefile, with dozens of such errors.


Am trying to get ubuntu-16.04-server-amd64.iso ISO file to boot from grub 2.02~beta2-9ubuntu1.7 found in Ubuntu 14.04 server.  menuentry "Ubuntu 16.04 Server AMD64" --class ubuntu {   set isopath="/boot/iso"   set isoname="ubuntu-16.04-server-amd64.iso"   set isofile="${isopath}/ubuntu/${isoname}"   echo "Using ${isoname}..."   loopback loop $isofile   linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${isofile}   initrd (loop)/casper/initrd.lz }   When writing ls in grub mode I can see that my file exist at (hd0,msdos1)/boot/iso/ubuntu-16.04-server-amd64.iso. How can I construct a grub menu entry so I can boot into that ISO file?  Please keep in mind that this is not the Live Ubuntu Desktop ISO file but the server version.

I found that it can be done with loopback as follows  menuentry "Lucid ISO" { loopback loop (hd0,1)/boot/iso/ubuntu-10.04-desktop-i386.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-10.04-desktop-i386.iso noprompt noeject initrd (loop)/casper/initrd.lz }   But it works only with ubuntu or its derivatives. How it should be written if I want to boot other live images like fedora, cent, opensuse etc. ?  Edit: I found some other entries but all of them are probably debian based.  menuentry "Linux Mint 10 Gnome ISO" {  loopback loop /linuxmint10.iso  linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/linuxmint10.iso noeject noprompt splash --  initrd (loop)/casper/initrd.lz }  menuentry "DBAN ISO" {  loopback loop /dban.iso  linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=/dban.iso silent -- }   menuentry "Tinycore ISO" {  loopback loop /tinycore.iso  linux (loop)/boot/bzImage --  initrd (loop)/boot/tinycore.gz }   menuentry "SystemRescueCd" {  loopback loop /systemrescuecd.iso  linux (loop)/isolinux/rescuecd isoloop=/systemrescuecd.iso setkmap=us docache dostartx  initrd (loop)/isolinux/initram.igz }   Edit2: How to chainload grub and syslinux from grub2?  Edit3: I want to boot other live images without any removable devices and use grub2 so need menu entries specific to grub2.


I have a problem in latex. I can't write like that picture.  how to write like that.   Please.

How can I strike through an expression (e.g. "2x") obliquely, e.g. from bottom left to top right, so as to indicate cancellation? With the \sout command from the ulem package, I can only strike horizontally.


I want to upgrade to Ubuntu 13.04 from Windows 7.   Will Ubuntu automatically install drivers by downloading them from the internet?

Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it?


As we have eigenspace , I have also read that eigenvector can not be a zero vector  , so how has it been possible to say eigenspace is there without null vector .

I've started studying Eigenvector and Eigenvalue.   It says in my book that 0 is excluded from being an eigenvector because it breaks the uniqueness of eigenvalue associated with each eigenvector.   But, there is a proof in my book showing that Eigenspace is a subspace. In order for it to be subspace, does that mean that there must be a zero element? But, Eigenvector can not be zero... Am I misunderstanding something?


I tried searching online for an answer, but the answer (if exists) is overshadowed by other applications of dot in shell scripting. So here goes.  EDIT: Turns out it's related to Fedora's default configuration of command_not_found_handle, so it's not related to bash source code. /EDIT  I found that while bash usually complains about lack of command, or even that whatever I input as command-line is a directory:  [root@localhost tmp] # mkdir test [root@localhost tmp] # test [root@localhost tmp] # nonexistent bash: nonexistent: command not found... [root@localhost tmp] # test [root@localhost tmp] # cd test [root@localhost test] # empty bash: empty: command not found... [root@localhost test] # . bash: .: filename argument required .: usage: . filename [arguments] [root@localhost test] # ..   The above are clearly valid and expected. But these:  [root@localhost test] # .... [root@localhost test] # ......................... [root@localhost test] # .whatever [root@localhost test] # ..........whatever [root@localhost test] # ......œę©æąðæćþóœ [root@localhost test] # .ignored [root@localhost test] # touch .whatever [root@localhost test] # .whatever [root@localhost test] # file .whatever  .whatever: empty [root@localhost test] # file .ignored .ignored: cannot open '.ignored' (No such file or directory) [root@localhost test] # .ignored [root@localhost test] # .whatever follows is just discarded [root@localhost test] #    are just silently ignoring whatever I happen to type.  And that's not what one would expect. Is there a reason for this behavior?  EDIT: I found a use case!   [root@localhost ~] # ...|cat [root@localhost ~] # ...|nonexistent bash: nonexistent: command not found... [root@localhost ~] # ...|nonexistent && echo works bash: nonexistent: command not found... [root@localhost ~] # ...|nonexistent || echo works bash: nonexistent: command not found... works [root@localhost ~] # ...|cat && echo works works [root@localhost ~] # ...|cat || echo works [root@localhost ~] #    It apparently allows one to check whether an executable is on PATH without trying to run it - you can see cat didn't block. It was never executed.  This is kind of ridiculous. Have fun!  [root@localhost ~] # LANG=en bash --version GNU bash, version 4.3.42(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>   EDIT2:  [root@localhost ~] # declare -f command_not_found_handle command_not_found_handle ()  {  local runcnf=1; local retval=127; [[ $- =~ i ]] || runcnf=0; [[ ! -S /var/run/dbus/system_bus_socket ]] && runcnf=0; [[ ! -x '/usr/libexec/packagekitd' ]] && runcnf=0; [[ -n ${COMP_CWORD-} ]] && runcnf=0; if [ $runcnf -eq 1 ]; then     '/usr/libexec/pk-command-not-found' "$@";     retval=$?; else     if [[ -n "${BASH_VERSION-}" ]]; then         printf 'bash: %scommand not found\n' "${1:+$1: }" 1>&2;     fi; fi; return $retval }

I just noted this on bash  4.3; exact version number is 4.3.42(1)-release (x86-redhat-linux-gnu).   $ .. $ ... $ .... $ .....   Why do the "command not found" is not prompted ?  $ ... $ echo $?  $ 127   I checked the $PATH and the alias nothing; The man is not helping neither. The bash run on Fedora Linux, but I think it is not related to the OS.   EDIT   I just noted this it the same for any dot starting command  .za .zaza ..za ..zaza


I have a State Water Hydro layer from our GIS county office that does not have georeferenced attributes (It is sitting on top of a State Plane county basemap). Looking at the XY to Line tool I need Start/End XY fields to run the tool. Problem is that there are no such attributes, and I'm looking at an entire county's worth of streams & rivers. Is there a way to determine these XY values without manually going through every stream feature? Also, I'm trying to suggest to my department why having all of our dept. specific features georeferenced is useful for future analysis, but I'm a bit green in the when it comes to justifying the ends to some of our work. Any suggestions on top of the XY to Line tool help would be great.

I have  a series of polyline shapefiles and I am trying to automate the process of calculating the X and Y coordinates of the line start and line end using Python.  I have added the 4 fields (startx, starty, endx, endy) in Python with the following code:  Arcpy.addfield_management ("Polyline","startx","DOUBLE")   I can perform this task by right-clicking the attribute and calculating geometry, but I want to automate this process for about 30 polylines.  I have the following code I've found that might be able to perform the desired task with some modification:  xExpression = "float(!SHAPE.CENTROID!.split()[0])" yExpression = "float(!SHAPE.CENTROID!.split()[1])"  arcpy.CalculateField_management("Polyline", "startx", xExpression, "PYTHON") arcpy.CalculateField_management("Polyline", "starty", yExpression, "PYTHON")   This code only calculates the coordinate at the centre of the shape I believe. Are their any expressions I can add to this code to calculate the X and Y coordinates of the start and end points of the polyline?  I am using ArcGIS 10.1 with ArcInfo license.


I have installed Ubuntu 14.04/Windows 8.1. I want to play couple rounds of some game in between tasks which I develop in Ubuntu. Games are running on windows, so each time I need to reboot, but it consumes too many operations.  Is there any way to load installed Ubuntu while in Windows? Any ideas or directions?  Thanks!  I already had some discussion on  which considered as offtopic (hi Cap)

Since making the full time move to using Linux (Fedora) from Windows, I've found the migration fairly easy and haven't had much disruption in how I do my work.  However, there are some games I like to play such as Football Manager and some older games which rely on 3D rendering (either software or hardware). At the moment I have a VirtualBox VM running Windows XP and 95% of the games I've installed on this have failed to run due to problems with the graphics card (the virtual graphics card).  What I would like to do is get the VM to use the laptop's actual physical graphics card directly, or something similar. I know there is a performance issue, but most of the games I play are over 5 years old and I'm not bothered about graphic quality etc. I just want it to work.  I don't have to use VirtualBox, I just used it because I'm used to it. If VMWare or another virtual technology is a better option than VirtualBox then I will use it.


I know there are a lot of websites there which are answering this, but as I was making video which is only 1.3 seconds long, it took 2.5 hours to render, also with all the tips I found. I am using CPU and Cycles engine for rendering. Are there any general tips for these engines to render faster? If this is not a good Question for this site, I will delete it.

Hi I should make a video for a project of a hydroponic containers but the rendering time is over 30 hours ... how can I reduce it while maintaining good graphics ? Thanks !


Let $x_n=(1+\frac{y}{n})^n$. It is well known that $x_n\rightarrow e^y$ as $n\rightarrow \infty$. Now, if we consider $X_n=\left(1+\frac{y}{n}+o(\frac{1}{n})\right)^n$, then it makes sense that $X_n\rightarrow e^y$, too, because $o(1/n)$ vanishes faster than $1/n$ as $n\rightarrow\infty.$ However, how can this be shown rigorously? Does this also hold more generally? I.e., if $f(1/n)\rightarrow z$, do we then also have $f(1/n+o(1/n))\rightarrow z$?

I'm trying to formalize the following limit:  $$\lim_{x \to \infty} \left[1+\frac{a}{x}+o\left(\frac{1}{x}\right) \right]^x= e^a$$ however I can't see how to rigorously show this identity.  Any suggestions?


I am new to Ubuntu and I am using it virtualized on mac (by virtualbox). When I tried a simple command on Terminal (eg. gedit) I get it open but... Terminal stays stucked. The user@computer:~$ doesn-t appear anymore. The only way is to close gedit application. Is that normal? What am I doing wrong?

I use dwm as a window manager on Ubuntu, I like tiled windows and I like them as few as possible. I sometimes need to run an application (let's say it's the pdf viewer mupdf in x11) from the terminal, the application will be launched in a new window but the terminal from which I launched becomes this prompt-less console for that application to log whatever.  I use dmenu to launch applications, but sometimes an application needs arguments (file names) to start. I use uxrvt within x11 managed by dwm.


If $1 \leq r \leq n,\;$ then there are $\quad\dfrac{n(n-1)\cdots(n-r+1)}{r}\quad r$-cycles in $S_n$.   I think that I used induction to prove this, but I don't know how to prove this. Thanks in advance!

Show that if $n>m$, then the number of $m$-cycles in $S_n$ is given by $$\frac{n(n-1)(n-2)\cdots(n-m+1)}{m}.$$  My doubt Suppose I wish to count the number of $m-$cycles. Then I will get $\binom n m$ ways of choosing such cycles. And the cycles which have the same representation must be divided so I will get $$\frac{\binom n m}{m}$$ What am I doing wrong? Kindly help me.