I am building model in R. Can you help me how to interpret this results. For example what is Pr(>|t|) and others...Thanks!   Call: lm(formula = Cn ~ B10_75mean + b5_75mean + ui75mean + tvi75mean)  **Residuals:**     Min      1Q  Median      3Q     Max  -6.3655 -3.7021 -0.3621  2.9530 12.5155  **Coefficients:**              Estimate Std. Error t value Pr(>|t|) (Intercept)  24.08902  228.38548   0.105    0.917 B10_75mean   -0.04073    0.75413  -0.054    0.957 b5_75mean   -39.98091   42.28717  -0.945    0.355 ui75mean     20.71277   20.59630   1.006    0.326 tvi75mean    32.69517   42.33715   0.772    0.448  Residual standard error: 4.826 on 22 degrees of freedom Multiple R-squared:  0.2408,    Adjusted R-squared:  0.1027  F-statistic: 1.744 on 4 and 22 DF,  p-value: 0.1763

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(>|t|)     (Intercept)       3.30843    0.06210  53.278  < 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all.


Whats the best pattern for singleton? I frequently use  + (SomeManager *)shared {     static SomeManager * _SomeManager = nil;     if (_SomeManager) {         return _SomeManager;     }      _SomeManager = [[SomeManager alloc] init];      return _SomeManager; }   Is this thread safe? If not, hot to make it safe?

My singleton accessor method is usually some variant of:  static MyClass *gInstance = NULL;  + (MyClass *)instance {     @synchronized(self)     {         if (gInstance == NULL)             gInstance = [[self alloc] init];     }      return(gInstance); }   What could I be doing to improve this?


A born Jamaican lady, who is also a US citizen was recently prevented from boarding a Southwest flight from the USA to Jamaica because of not having a return ticket to the USA. This lady had traveled from the USA to Jamaica on many occasions on  one-way tickets via Southwest and other airlines and it was never an issue.  Is Southwest acting on a new policy?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


In some situations, it will be very useful to save the state of a process to file and to be able to load the state at a future point in time to continue from exactly the state which was saved. Is it possible to save Windows process state to file and after restarting it to load the same state?

VM software does a great job of saving state when you "turn it off," allowing instant and immediate return to that previous state.  Is there some application for Windows that allows me to do the same thing, for any arbitrary software? It would allow me to save/restore state, possibly via a shell command or button that it appends to every window.  Edit: For clarity, there are two types of apps: those that save their own states, and those that save others' states. Those that save their own state are like Chrome, which on load, reloads the windows you had open last time.  That's not what I'm asking about; I'm asking for an app that can save the state of other apps, kind of like VM software does; but for any app. (A trivial test would be load notepad++, type a bunch of stuff, and save-state; on reset-state, you should be able to multi-level undo a lot of what you wrote, as if you  never shut down the application.)


I'm working with Pattern and Matcher in Java. I have the following code:  String searchString = "0,00,0"; String searchInText = "0,00,00,0" Pattern p = Pattern.compile(searchString); Matcher m = p.matcher(searchString); while(m.find){   ...  }   My Problem is that the Matcher only finds one match from the first zero to the 4th zero. But there should be another match from the 3rd zero to the last zero.   Can someone help me? Is there a workaround?

I can't seem to find an answer to this problem, and I'm wondering if one exists. Simplified example:  Consider a string "nnnn", where I want to find all matches of "nn" - but also those that overlap with each other. So the regex would provide the following 3 matches:   nnnn nnnn nnnn   I realize this is not exactly what regexes are meant for, but walking the string and parsing this manually seems like an awful lot of code, considering that in reality the matches would have to be done using a pattern, not a literal string.


LHC is currently capable of accelerating a batch of atoms faster than $0.5 \, c$.  What if we made a second LHC that intersects the original at, lets say the atlas chamber, but that runs in the opposite direction. Assuming that the batches actually front-collide (which is a long shot I know), isn't the energy (not the relative speed) involved in the collision higher than that in a batch hitting a static object?

I understand that nothing can move faster than light due to time dilation. I want to build upon my understanding of Einstein's theory of Special Relativity, so I came up with this hypothetical problem for myself:  If both particles are moving at 0.9c towards each other (according to an observer on Earth), what speed does each particle have relative to the other?  I'm stumped since I am only familiar with Newtonian classical mechanics to solve this (which would be wrong). I am aware of Lorentz' factor $\gamma =\frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}$ and the time dilation equation $t_m = \frac{t_o}{\sqrt{1 - \frac{v^2}{c^2}}}$, but I'm not sure how to apply it in this instance. I'm just looking for a gentle push in the right direction. Edit: My prior research:  This article, ,  talks about the effect of a baseball thrown at 0.9c would have as it traveled towards a batter. This is not what I'm looking for since it doesn't explain the math behind finding the collision speed between two high velocity entities.  This question on Yahoo, , asks a similar question to mine, but no math is involved to demonstrate the calculations behind the reasoning.  This question on Physics.SE, , does not answer my question either. I have not been able to find a similar Physics.SE question which can provide me to clues to my own hypothetical question.  I have also Googled the following phrases:    i. "collision faster than the speed of light" ii. "collision of high speed particles" iii. "lorentz transformation in a collision" iv. "collision analysis at light speed"


Why does adding </script> in a comment break the parser? Is this a bug or is there something in the documentation I've overlooked?  I've tested this in Chrome, Firefox, Opera, Internet Explorer and they all produce the same result.  Single-line comment:    function Foo(){   // </script>   alert("bar"); };  Foo();     Multi-line comment:    function Foo(){   /*       </script>   */   alert("bar"); };  Foo();

Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the <script> and/or </script> tags up within document.write() calls?  I noticed that Amazon does this as well, for example:  <script type='text/javascript'>   if (typeof window['jQuery'] == 'undefined') document.write('<scr'+'ipt type="text/javascript" src="http://z-ecx.images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.pack._V265113567_.js"></sc'+'ript>'); </script>


This is my first post so please don't be critical with me if I do something wrong.  So what is my case - Everyone knows the standard method to visualize the working hours of business:    But what is if the working hours for business are not always on the same day? For example, business works from Mon 4 am - Tue 1 am, Tue 4 am - Wen 1 am... and so on. It's a little confusing for the user when you present information like this:    BTW: I show current time and status of the business (open/closed), but I'm not sure are this solve problem with visualization.   So folks, what do you think on this case?

I'm designing a website for a client that has some irregular trading hours. Some days they remain open until 2am, others they close at 10pm. They want these hours displayed on their landing page, so visitors can see what time they open & close at a glance. The trouble is I have to work with an API that returns integers only. Based on these integers and the current time, I can display a currently open or currently closed flag accordingly. As it stands currently, this isn't possible. I can't use custom text anywhere, only integers (24 hour time). I'm having some difficulty working out how to display the time. Currently the client displays their hours like this;  Mon 8am - 2am Tue 8am - 2am Wed 8am - 10pm Thu 8am - 2am Fri 8am - 10pm  However I don't think this is correct, and looks quite confusing (what is 8am - 2am?) shouldn't it be;  Mon 8am - 12am & 12am - 2am Tue 8am - 12am & 12am - 2am Wed 8am - 10pm Thu 8am - 12am & 12am - 2am Fri 8am - 10pm  Admittedly, this also looks quite confusing! Any ideas how I can achieve this in the most user friendly way possible, without using custom text?


When trying to upgrade to 9.3.1, the terms of service come up for the upgrade, and when clicking agree (twice -- there's two popups about agreeing), I'm redirected to the home screen and nothing else happens. Note: I had this problem with 9.3, and at the time, the 9.3 update was not signed, but as of today,  says this device's update is signed and available, yet the problem remains, even after a restart.  A power cable is attached to the device (with ~80% life). I also tried closing all open applications. Still same result.  Any ideas on how to get the update installed?

I saw an update for my iOS 9.2.1 device to iOS 9.3.  However, it said that the update cannot be verified, although it was downloaded.  I even deleted all data and applications from the device, but I still cannot update the device to 9.3; it just says "Your software is up to date" on iOS 9.2.1.  Can you force an update to 9.3?


Say, I have this list: ['1', '1', '0', '1', '1', '1', '0', '0', '0', '0', '1', '0'] My expected output: [['1', '1', '0', '1'], ['1', '1', '0', '0'], ['0', '0', '1', '0']] I got the expected output this way: from collections import deque as de a = '110111000010' a = list(a) que = de(a) a = [] l = [] n = 0 while que:     item = que.popleft()     l.append(item)     n += 1     if n == 4:         a.append(l)         n = 0         l = [] print(a)  I wanted to know is there a more efficient and simpler way to achieve this which can be described as elegant, understandable and most importantly pythonic.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Context: I am trying to shoot images that bear a black background /low-key. So I'm trying to understand this subject better.  Edit: I would like to emphasize that this question is being asked with a specific end-result in mind, low-key/ black bg.  I have ready that 'increasing the shutter speed helps control ambient light whereas the aperture helps control the strength of the external flash reaching the sensor.'  I am thus trying to think along these lines. Hope someone can help.

I know digital cameras have ISO options, and that ISO is the camera's sensitivity to light, but if you set  higher ISO then you can get a noisy image. I also know there are two other camera options, shutter speed and aperture.   What is the relationship of between them? Is there any equation, or something like that?  For example, if I set the ISO to 640, then how should I set the shutter speed and aperture?


Let $H$ be a subgroup of a group $G$, and let $\rho:H\rightarrow GL(V )$ be an irreducible representation of dimension $d$. Prove that there is an irreducible representation of $G$ whose dimension is at least $d$.  This is a homework problem I would appreciate it if someone could give me a hint on how to begin. I am assuming I have to apply properties of induced representation, but I am not sure where to begin.

Let $H$ be a subgroup of a group $G$, and let $\rho :H\to GL(V)$ be an irreducible representation of dimension $d$. Prove that there is an irreducible representation of $G$ whose dimension is at least $d$.  This is a homework problem I would appreciate it if someone could give me a hint on how to begin. I am assuming I have to apply properties of induced representation, but I am not sure where to begin.  It should be noted we have covered both Frobineus reciprocity and Mackey's irreducibility criterion.  I tried taking the induced representation of $\rho$, since that is all I can do. But the problem is that it may not be irreducible. I want to use Mackey, but I don't feel like I have enough information to apply it. Again any help would be great.


Is there any place on the internet which lists the historical release dates for Winter, Spring and Summer, for every year and every Salesforce instance?

I have some production functionality that has recently stopped working and I am looking for "proof" that it happened due to the winter '15 release.  Is there any place where the release dates for past release (such as  the winter 15) are still available?   They are no longer under scheduled maintenance.


I am using Linux first time. I have installed Ubuntu 12.04, but after installing it, it is not showing me the drives or my data. In Disk Utility it is not showing any partition.  Actually i just want to know that my data has been lost or not.  I am unable to show you through screenshot because of repuatations.  Output of sudo parted -l:  Model: ATA SAMSUNG HM641JI (scsi) Disk /dev/sda: 640GB Sector size (logical/physical): 512B/512B Partition Table: msdos  Number  Start   End     Size    Type     File system     Flags  1      1049kB  2463MB  2462MB  primary  fat32           hidden, lba  2      2463MB  636GB   633GB   primary  ext4            boot  3      636GB   640GB   4204MB  primary  linux-swap(v1)   will somebody help me to recover my data through remotely..?

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


Determine the units of the ring $A= \mathbb Z[X]/(X^3)$ and the structure of the group $A^*$  I've only managed to show that the free coefficient of any unit in $A$ is a unit in $\mathbb Z$.

An exercise from Dummit & Foote:      Determine the units of the ring $A = \mathbb{Z}[X]/(X^{3})$ and the structure of the unit group $A^{\times}$.   Help would be great.  Thanks!


XmlTextReader -> XmlTextReader.NodeType == XmlNodeType.EndElement   The above written does not return true case of Self enclosing Element Like:  <Default Name= "One"/>   Can any body tell the alternate solution for it. I am able to achieve the desired result by using the XmlTextReader.IsEmptyElement property.  Is there any other way to achieve the desired result?

I am using XmlReader in .NET to parse an XML file using a loop:  while (xml.Read()) {    switch xml.NodeType {      case XmlNodeType.Element:       //Do something      case XmlNodeType.Text:       //Do something      case XmlNodeType.EndElement:         //Do something    } }   I was wondering if it was normal that the following XML code does not produce some EndElement nodes? Please note the missing space before the /> but I don't think that's the problem.  <date month="November" year="2001"/> <zone name="xml"/>   Is there a different NodeType or property to indicate a self-closing element?


My PC with Windows Vista had some wireless problems 3 years ago, so I bought a wireless adapter, which worked fine. But a few days ago, it suddenly didn't connect anymore; the network manager says it is "connected with limited access". So I brought a new wireless adapter (TL-WN823N), but the error does still occur. When I look at the problem it says there are driver or hardware issues, but it is the same on both adapters except the name.  Thanks in advance!  Note: It does work on other PC's.

My windows 7 network will show limited access or unidentified network after coming up from hibernation.  In the office I normally use LAN connection, I turn-off my wireless card (DELL Latitude has on/off switch for the wireless card). When I back at home I will turn on the wireless card, but it will take about 15 seconds to detect my home WIFI and then show limited access. I will have to restart the notebook and it will be able to connect to my WIFI and internet.  The problem will be solved if I restart the notebook, but that defeats the purpose of hibernation doesn't it?  I have tried uninstalling the wireless card driver but still does not solve it. I also tried updating my network card driver but windows says I am using the latest driver. On support.dell.com also showing I am using the latest driver.


I have set up an Ubuntu server with 2 network cards as a basic router using dnsmasq as the DNS and DHCP server and I'm using ufw to control iptables.  Everything works and I think I have a pretty good basic understanding of what is going on.  However, in order to forward packets I have to set DEFAULT_FORWARD_POLICY="ACCEPT" in /etc/default/ufw. The config file states that I probably also want to adjust my rules.  I adjusted /etc/ufw/before.rules and added:  *nat :POSTROUTING ACCEPT [0:0] -A POSTROUTING -s 192.168.0.0/24 -o enp0s3 -j MASQUERADE   So my question is:  Is it bad to set the default to "ACCEPT"? Can I not just leave the default policy as "DROP" and add a forward rule with UFW?  I added a forward rule but it didn't actually forward packets.  sudo ufw route allow in on enp0s8 out on enp0s3 to 0.0.0.0/24 from 192.168.0.0/24

I realize UFW is mainly just for enabling/disabling access on particular ports, but I'm trying to forward one port to another. I want any connection to port 1724 to be forwarded to 1723.   The file /etc/default/ufw already has DEFAULT_FORWARD_POLICY="ACCEPT". And I believe I need to uncomment net/ipv4/ip_forward=1 in /etc/ufw/sysctl.conf. Finally I need to edit /etc/ufw/before.rules to add an iptables rule.   And here is where I get lost because I can't find any documentation for this file. Where do I add the rule? And how exactly?  In particular:   On exactly which line do I add the rule? Do I put anything before or after it?


At level 6,  gain the Mantle of Majesty feature (XGtE, p. 14):     At 6th level, you gain the ability to cloak yourself in a fey magic that makes others want to serve you. As a bonus action, you cast command, without expending a spell slot, and you take on an appearance of unearthly beauty for 1 minute or until your concentration ends (as if you were concentrating on a spell). During this time, you can cast command as a bonus action on each of your turns, without expending a spell slot.   However it doesn't really mention at what level you cast command at. Do you use it as a level 1 spell, or at the highest spell slot you can cast at your level?

There are ways to cast spells without expending a spell slot such as:  Master Transmuter (PHB 119):     Restore Life. You cast the raise dead spell on a creature you touch   with the transmuter’s stone, without expending a spell slot or needing   to have the spell in your spellbook.   Armor of Shadows (PHB 110):     You can cast mage armor on yourself at will, without expending a spell slot or material components.   Whispers of the Grave (PHB 111):     You can cast speak with dead at will, without expending a spell   slot.   See also: Channel Divinity: Read Thoughts (PHB 59-60), Mystic Arcanum (PHB 108), Beast Speech (PHB 110), Chains of Carceri (PHB 110), Eldritch Sight (PHB 110), Fiendish Vigor (PHB 111), Mask of Many Faces (PHB 111), Master of Myriad Forms (PHB 111), Misty Visions (PHB 111), Otherwordly Leap (PHB 111), Signature Spells (PHB 115), Spell Mastery (PHB 115), Shapechanger (PHB 119), Boon of Spell Mastery (DMG 232) and Boon of Spell Recall (DMG 232).  What level are these spells if you cast them without expending a spell slot?


im new in the latex program and im having a problem thats puzzling me... I introduced 2 figures inside a section, but these images appears outside that section.      Thanks guys

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


I have this desktop computer im not using. I want to use it for file storage for all types of files. I also want to share these files to windows computers and stream video to tablet and phones. The streaming will be only localy  What software do i need and how would i go about this?

In our company we would like to install Ubuntu server for file sharing, is it possible to use Ubuntu as file server for windows based client Operating systems.  what is the procedure to make Ubuntu file server, and i have installed Ubuntu 12.4 server.


I am trying to establish the following partial sum equivalence: $$\sum_{n=1}^{N}\cos (n\pi u) = \frac{1}{2}\left[\frac{\sin(N+\frac{1}{2})\pi u}{\sin(\pi u)/2} - 1\right]$$  with a hint that the series $$x + x^2 + x^3 + \ldots x^m= \frac{1-x^{m+1}}{1-x}$$  My approach is to represent $$\cos(n\pi u) = \frac{1}{2}\left[e^{in\pi u} + e^{-in\pi u}\right]$$ and then letting $x = e^{i\pi u}$ I can reduce this to $$\cos(n\pi u) = \frac{1}{2}\left[x + x^2 + \ldots x^{N} + x^{-1} + x^{-2} + \ldots x^{-N}\right]$$ Now, I notice that the first and last terms sum to $$x + \frac{1}{x^N} = \frac{x^N + 1}{x^N}$$ likewise, the second and the second-to-last sum to $$x^2 + \frac{1}{x^{N-1}} = \frac{x^N + 1}{x^{N-1}}$$ so that the first sum is $x$ multiplied by the second. Now let $$a = \frac{1 + x^N}{x^N}$$ and we reduce this series to $$\cos(n\pi u) = \frac{1}{2}\left[a\left(1 + x + x^2 + \ldots x^{N-1}\right)\right]$$ which is equivalent to $$a\left[\frac{x}{1-x}\right]$$ Then, using the value of $a$, I get $$\cos(n\pi u) = \frac{1}{2}\left[\frac{x^2}{1-x}\right]$$  I am, however, not sure if I have proceeded in the right direction. Thanks

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


I need to workout a way to test a string contains some words or not, doesn't matter uppercase or lowercase.  E.g    String ppe1 = "Mask" String ppe2 = "mask" String ppe3 = "MASK"   then when I do   return ppe1.matches("[A-Za-z]*mask")  // it should return true   or  return ppe2.matches("[A-Za-z]*mask")  // it should return true   or  return ppe3.matches("[A-Za-z]*mask")  // it should return true   I know above regex is totally wrong,, but just wish to demo my idea for what I need,  In a simple word,  as long as string contains term 'Mask' , doesn't matter 'MASK' or 'mask'  or 'mASk' or 'masK' or whatever combo,  regex should detect the term and always return true. Please suggest with code example. Thanks

Say I have two strings,  String s1 = "AbBaCca"; String s2 = "bac";   I want to perform a check returning that s2 is contained within s1. I can do this with:  return s1.contains(s2);   I am pretty sure that contains() is case sensitive, however I can't determine this for sure from reading the documentation. If it is then I suppose my best method would be something like:  return s1.toLowerCase().contains(s2.toLowerCase());   All this aside, is there another (possibly better) way to accomplish this without caring about case-sensitivity?


I want to define a Gaussian distribution function and plot it in python using the mode and two points parameter values instead of using the mean and standard deviation. For example, I have mode=110 and two points : (40, 160) for asymmetrical points. Or mode=100 and two points = (50,150) for symmetrical points. I tried with this code below, but I don't how I can add the second point to the formula which is returned by the function? Since I have two points, and I don't know how to define a function that depends on two points and mode. import numpy as np import matplotlib.pyplot as plt    def gaussian(x, mode, inf_point):     return 1/(np.sqrt(2*np.pi)*inf_point)*np.exp(-np.power((x - mode)/inf_point, 2)/2) x = np.linspace(0,256) plt.plot(x, gaussian(x, mode, inf_point))

I want to define a Gaussian distribution function and plot it in python using the mode and inflection points parameter values instead of using the mean and standard deviation. For example, I have mode=110 and two points : (40, 160) for asymmetrical points. Or mode=100 and two points = (50,150) for symmetrical points. I tried with this code below, but I don't how I can add the second point to the formula which is returned by the function? Since I have two points, and I don't know how to define a function that depends on two points and mode. Thanks in advance for your help! import numpy as np matplotlib.pyplot as plt    def gaussian(x, mode, inf_point):     return 1/(np.sqrt(2*np.pi)*inf_point)*np.exp(-np.power((x - mode)/inf_point, 2)/2) x = np.linspace(0,256) plt.plot(x, gaussian(x, mode, inf_point))


I have a potential exploit for the association bonus awarded and the bounty system. Primarily, it deals with reputation-inflation. Initiation and motivation:  Most of us at least have 200 reputation on multiple sites. Assume a person with intentions to raise a child account and make it a spoilt child or freely promote their content on Stack Exchange. Steps:  Have at least 200 reputation to get the association bonus. Create an account A_1 on any X.stackexchange.com (X of choice). Receive an association bonus on joining. Ask a mediocre-good question (to avoid closure/duplicates), wait two days and put out a 100 reputation bounty. Create a puppet/child account C_1. Answer that question with the child account. Award yourself (child) the bounty (and of course upvote and mark as correct) (Fun part) Delete A_1 :) Re-create A_1, while True: repeat step 3 to 6  Apart from the spoilt-child exploit, one might also use it for free promotion of their questions and may not create a child. Also related  and  (but this method is far more detectable unless multiple IP address bounce nodes are used).

I figured out a method to abuse the Association Bonus, however I'm unsure whether or not this is a serious issue. Are there anti systems in place that prevent this?       Prerequisites: 1 account with the Association bonus, and 1 account with 100 reputation on a different site.      Step 1: Create a bounty on the first account using the association bonus on the site on which the second account has 100 reputation, and award it to the second account.  The second account now has 200 reputation and will receive the Association Bonus.    Step 2: Abuse the bounty system to give the association bonus from the second account back to the first.    Step 3: Create a third account, and again abuse the bounty system to gift 200 reputation to it from the second account.  Step 4: Repeat steps 2 and 3 in order to gain infinite reputation.    Step 5: Give the 200 reputation back to the first account.    Please don't actually do this.


I got my Forge server ready. My IP and everything, but it has this error:   [17:51:01] [Server thread/INFO] [FML]: Holder lookups applied [17:51:01] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]:  Loading properties [17:51:01] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]:   Default game type: SURVIVAL [17:51:01] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]:  Generating keypair [17:51:02] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]:  Starting Minecraft server on 192.***.***.***:25565 [17:51:02] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer]:  **** FAILED TO BIND TO PORT! [17:51:02] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer]:   The exception was: java.net.BindException: Cannot assign requested address: bind [17:51:02] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer]:  Perhaps a server is already running on that port?     I went to the CMD too and where should I get my IP from? I got mine from under my Default Gateway under Wireless LAN. Thanks!

I made a server and used my IPv4 address for the IP. I decided to scratch that server and make a Bukkit server so I can use plugins. I tried to use my IPv4 address which I used for my other server but I keep getting the message [17:31:15 WARN]: ****FAILED TO BIND TO PORT!  Is there any thing I can do to get a new address to use or is there a way to delete the old server? Do I need to use a different computer? Please help! I've don't know how to fix this problem. If you have any suggestions please tell me and I'll give it a try.


When I render or go into camera view the object I'm trying to render is partially cutoff.  Here's what it looks like when not in camera view/rendered.  Is there a way to fix this? FYI: here's the tutorial I followed.

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


I'm a Windows man, I don't know which subdirectories I can clean from system directory

My Ubuntu cloud server has left only 900MB of disk space.   I'll just empty the directory /tmp and wondering if there is any other location to clean up.


Prove if $7\mid a^2+b^2 \longrightarrow 7\mid a$ and $7\mid b$  What I did:  I found the possible remainders for $a^2$ are $0, 1, 2$ and $4$.  I think I should say $r_7(a^2)+r_7(b^2)$ can't equal any multiple of $7$ unless both of them are $0$?  And if both of them are $0$, that implies $r_7(a)=0$ and $r_7(b)=0$  Am I correct? How can I explain this in mathy terms?

For my proof I distinguished the two possible cases which derive from $7 \mid a^2+b^2$:   Case one: $7\mid a^2$ and $7 \mid b^2$ Case two (which (I think) is not possible): $7$ does not divide $a^2$ and $7$ does not divide $b^2$, but their sum.  I've shown that case $1$ implies $7\mid a$ and $7\mid b$, so I just have show that case 2 isn't possible - I'll be happy for any input.  MfG, Karl


I have a website with database that works fine in my computer, all special characters displayed correctly - I made sure to save all pages and CSS in Western European format and declare charset ISO-8859-1.  Nonetheless, when I upload the project to a web server, all accented/latin/whatever-you-call-them characters, such as ~, ^, ´, etc., are replaced by question marks.  I don't know what is causing this, but I suspect it is due to my files using lots of PHP includes: 1 for heading section, 1 for footer section (since heading and footer look the same in all pages, I wanted to save some space by reusing the code).  My second hypothesis is that it has something to do with the web host. But honestly, I'm lost and have no clue what to do. If you guys could give me a solution, I'd really appreciate it.  Update: my question was marked as duplicate, BUT idk how this can be an duplicate, since I've searched this site through and through and nothing solved my problem. I did all people generally recommend: changed database collation, saved every file in ISO-8859-1 encoding, declared the correct <meta charset> in header section and it had no effect.

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


I have read about many great researchers in various fields who were not involved in academia throughout their lives. Some were involved in academia only part of their life, but almost invariably, their greatest work came after a period of solitude and isolation from others. In fact, most great mathematicians, for example, were rather isolated figures. Bernhard Riemann and Isaac Newton come to mind, but others like James Clerk Maxwell were also isolated during their periods of research. More recently, Andrew Wiles isolated himself for around 7 years and didn't speak about his work to anyone while he was busy solving Fermat's Last Theorem. (I have mentioned only mathematicians because those are the ones I have read about the most.)  Hence, I am failing to see how being in academia/a university position aids one as a researcher, practically speaking. It seems as though the greatest research must come from within the individual due to an intense and personal love and desire for the subject, rather than due to collaborating with others or being given a better position or whatever. In fact, such things seem to be the opposite: detrimental. They would make the person focus not on the subject but on paltry things like gaining more and more money or a better reputation.  My question is simply: How does being in university position (e.g. professor) aid the researchers who are at the highest level in their field? I do not mean being involved in academia, because one can be involved (eg attending seminars and lectures) without having a position (please correct me if I am wrong, as I myself am not actually in academia).

This is a follow-up question to  and probably an even more naive question. If I'm understanding the answer correct, professors need funding to do research, but once they get it, the university takes some of the grant as overheads (to pay for office space, electricity, etc), and the cut the university takes is substantial.  Given that then, why do professors need universities? One could just apply for the grant as per normal, and once one gets it, buy a slightly bigger house and convert one of the rooms into a lab. One loses nothing to overheads, gets to work from home, has zero teaching duties, can choose to settle anywhere (no two-body problem!), and can even monitor an experiment 24/7. This gets even easier if one works in a field that doesn't need a physical lab. Further, presumably the grant covers postdoc salaries, so one would still be able to pay for postdocs (although probably not PhD students since a professor without a university will not be able to award a degree).   The obvious answer is that one cannot apply for a grant without a university, but Google indicates that's not the case, e.g.  only looks at one's previous accomplishments & potential applications of the research result, both of which are independent of the university. I suppose one could lose journal access, but there's always stuff like arXiv / ResearchGate, emailing the authors of the desired paper, or even Scihub (oops). It's conceivable that not working for a university loses one some prestige, since one can no longer claim to be a professor. However even then I'd expect at least some academics to choose this path, valuing the convenience & extra research funding over prestige.  If the answer to this varies from field to field, I'm most interested in the sciences.


How can I see my favourite question in the Android App? I can favourite questions but don't know how to see them.

I haven't been able to find my favorite questions in the official Stack Exchange Android app.  Looking at my accounts page gives nothing on them.


I am using Ubuntu 16.04.  Whenever I try to access any of the TTY  Alt+Ctrl+F(1-6), it asks me for my username. I enter my username and press enter then I am supposed to type my password. However, after pressing enter at the first time (after typing my username), it keeps hitting enter like forever. I do not even have a chance to enter the password.  So, the scenario goes as follows:   I enter my username Press enter Requests password and immediately it acts as if an enter  is pressed It keeps going like this until it reaches the maximum number of login attempts. All of that happens without even touching my keyboard after the first enter hitting.   So, how to solve this problem?  Edit: I entered recovery mode and ran package fix successfully.

I upgraded from 16.04 to 18.04. When I press Ctrl+Alt+F3 I get the terminal which prompts for the username. When I type my username and press Enter, it doesn't wait for my password (its as if I pressed Enter without entering anything). Even if I enter something, the text shown in plaintext and then it keeps on saying my password is wrong. After few times, the screen is cleared and it prompts for my username again and the same loop goes on.


Let $\scr{C}$ be a collection of subsets. Prove that if $A \in \sigma(\scr{C})$ (sigma algebra generated by $\scr{C}$), then there exists a countable subcollection $\scr{C}_A$ of $\scr{C}$ such that $A \in \sigma(\scr{C}_A)$  If $\scr{C}$ is finite, I think the result is immediate. Assume $\scr{C}$ is infinite. Then I know that $\sigma(\scr{C})$ is uncountable (infinite sigma algebra is always uncountable). That all I know. I think that it is impossible to have a clear form of a set belonging to a given infinite sigma algebra. So it is really no clue how to do it. I try contradiction, but no further development for the case when $\scr{C}$ is uncountable.  Any suggestion please ?

Given a collection of sets $\mathcal{C}$ and $E$ an element in the $\sigma$-algebra generated by $\mathcal{C}$, how do I show that $\exists$ a countable subcollection $\mathcal{C_0} \subset \mathcal{C}$ such that $E$ is an element of the $\sigma$-algebra, $\mathcal{A}$ generated by $\mathcal{C_0}$?    The hint says to let $H$ be the union of all $\sigma$-algebras generated by countable subsets of $\mathcal{C}$....although I don't know why.


I'm Turkish however my english not so good :D Ok , I was installed Ati Radeon Mobility Xpress Driver , After that I restarted . After enter password , screen get dark and I seed background image and desktop elements but I couldn't  see menu on left and top menu :/ here so you understand you're going good :) Do you can help me  Thanks  LlS|DarkBOY

I installed Ubuntu 12.10 and at first when I go to check the system information I used to have (unknown) on the graphic card section, I used the synaptic manager and downloaded the fglrx, after that I restarted my laptop and now I don't have any menus, all of them are gone.  Now I am only using the keyboard shortcuts to use Ubuntu. My graphic card is AMD ATI.  What can I do to bring the menus back?


I would like to reset equation numbering after each section or subsection. Right now I use  \setcounter{equation}{0}   I saw in another page you could also reset it by adding the following line to the preamble.  \numberwithin{equation}{subsection} \renewcommand\theequation{\arabic{equation}}   But this doesn't seem to work. The equation counters just increment across subsections. It's the same across sections if we changed the preamble to   \numberwithin{equation}{section}

I would like for equations to share the same counter as subsections. For example if my document is:  \documentclass{article} \begin{document} \section{A} \begin{equation} 1+1=2 \end{equation} \subsection{X} \begin{equation} 1+1=2 \end{equation} \begin{equation} 1+1=2 \end{equation} \subsection{Y} \begin{equation} 1+1=2 \end{equation} \end{document}   I would like this output (produced here through a sneaky use of \tag):   Something similar to how theorems of amsthm can be "siblings" with another counter. I am aware of the \numberwithin command of amsmath, but this is not what I want. I am also aware of the aliascnt package, but since "equation" is an existing counter, it doesn't work.


I am using 18.04 and currently when I control + Left-click it is actually just producing a single right-click.  This is a fresh install and I would ideally like it to use the default control + left-click behaviour.  It is a MacBook Pro 2018 running Ubuntu inside a VM, VMWare Fusion.

I struggled with this over the weekend, and need to remap my mouse buttons.


I'm getting Too many SOQL queries: 101 in a VF page, Could you please advise how I can fix it?  for (OpportunityLineItem opline: opp.OpportunityLineItems)         {                Opwrap = new OppProductWrapper();                       Opwrap.OppId = opp.Id;            if(opp.ContractId!=null){                 Opwrap.Contract = opp.ContractId;                  Con = [Select Total_Amount__c,Name,StartDate,EndDate,Status from Contract Where Id =: opp.ContractId limit 1];                  Opwrap.StartDate = Con.StartDate;                  Opwrap.EndDate = Con.EndDate;                  Opwrap.ContractStatus = Con.Status;                Opwrap.ContractName = Con.Name;                Opwrap.ContractAmount=Con.Total_Amount__c;                            }

I received the following error:     Error: Invalid Data.    Review all error messages below to correct your data.   Apex trigger ISOTrigger caused an unexpected exception, contact your administrator: ISOTrigger: System.LimitException: Too many SOQL queries: 101   In the debug log I've found the following:  15:11:56.0 (762902111)|SOQL_EXECUTE_BEGIN|[94]|Aggregations:0|SELECT Id, OwnerId, IsRecurrence, RecurrenceActivityId FROM Task WHERE (IsClosed = FALSE AND (IsRecurrence = TRUE OR RecurrenceActivityId = '') AND AccountId = :tmpVar1) 15:11:56.0 (762942801)|EXCEPTION_THROWN|[94]|System.LimitException: Too many SOQL queries: 101 15:11:56.0 (763220286)|FATAL_ERROR|System.LimitException: Too many SOQL queries: 101  Class.AccountHandler.beforeUpdate: line 94, column 1 Class.TriggerFactory.execute: line 95, column 1 Class.TriggerFactory.createHandler: line 29, column 1 Trigger.AccountTrigger: line 3, column 1  15:11:56.0 (763234604)|FATAL_ERROR|System.LimitException: Too many SOQL queries: 101   Here is the code in method beforeUpdate and AccountHandler class:  public void beforeUpdate(SObject oldSo, SObject so) {     for(SObject bu :Trigger.new) {        Account a = (Account) bu;         List<Task> tasksFromDatabase = new List<Task> ([SELECT Id, OwnerId, IsRecurrence, RecurrenceActivityId FROM Task WHERE IsClosed=false AND (IsRecurrence = true OR RecurrenceActivityId = '') AND AccountId = :a.Id]);         String agentName = a.Agents__c;        String recruiterName = a.Recruiter__c;//TO DO ::: delete, not used         if(agentName != null) {            List<ISOs__c>isoName = [SELECT Name, Recruiter_ID_num__c, Active__c FROM ISOs__c WHERE Id IN (SELECT ISO_Company__c FROM Agent__c WHERE Id = :agentName)];            if(isoName.size() > 0) {                if(isoName[0].Active__c == false) {                    a.ISO_Name__c.addError('The selected agent is linked to an inactive Iso');                }             a.ISO_Name__c = isoName[0].Name;            a.ISO_recruiter_id__c = IsoName[0].Recruiter_ID_num__c;            }        } else if(agentName == null) {            a.ISO_Name__c = '';            a.ISO_recruiter_id__c = '';        }         for(SObject sob :Trigger.new) {            Account ab = (Account) sob;            Account oldAB = (Account)Trigger.oldMap.get(ab.id);            if (ab.Status__c != null && oldAB.Status__c!=null) {                       if(ab.Status__c != oldAB.Status__c) {                       statusmail mail = new statusmail();                    mail.setAccountInfo(ab);                    mail.SendAccountEmail();                                if(ab.Agents__c != null)                        mail.sendAgentEmail();                    if(ab.Recruiter__c != null)                        mail.sendRecruiterEmail();                }            }        }            } }   Please advise how to avoid this error?


I have dual citizenship South African and Italian.  My South African husband and I are planning to go to Italy in May 2017 for a visit.  We have already been on a two-week visit in October 2010 but were not married at the time and my brother in Italy sent an invitation letter.  Now that we are officially married, does the same invitation process applies or he can travel with a spouse visa?  Is a visa easier to obtain this time around as he has already obtained one Schengen Vvsa previously?

This is my second trip to Italy with my wife who is an Italian citizen. First trip was in 2011 for a duration of two weeks but at that time we were not married.  I am currently unemployed and worried they might refuse the visa. I will be able to prove that I have funds to sustain me for the duration of the visit but cannot prove I am permanently employed as I am basically freelancing. For my last application the Travel Agent, who is an accountant, gave a letter stating he is the bookkeeper of the sole-proprietor business I owned (a restaurant at the time) and they accepted it.  Will I be able to do it the same way?  As background, I am South African and the marriage is legitimate. We have even applied for an unabridged marriage certificate but only in November last year and apparently it takes up to eight months to obtain. In the previous visa, we submitted our Islamic Marriage Certificate.  We might travel to Germany as well, where my wife's sister resides. In theory, I would like to stay in Europe. I am 59 and my wife and I have known each other 30 years but never got married. We made  in 2009 and registered at Home Affairs in 2016; otherwise, I would hold an EU passport by now.  Should I rather apply for a spouse reunification visa, as my wife is applying for emigration from South Africa?  She has dual citizenship, so as to be able to cash her retirement annuity before the age of maturity.  I was thinking of applying for a spouse visa for a one month visit, and then remain in Italy for the 90 days and thereafter apply for a longer visa.


It is a fact that a thing is existing now because it had already been created. So why don't we take this to account to redefine law of conservation of energy.

Did the law of conservation of energy apply to the earliest moments of the Big Bang? If so, what theoretical physics supports this?   I hear that Einstein's theory of relativity disputes the law of conservation of energy- so does that mean the law is false, or only some aspect of it?


In the following image, the polygon without filling and the polygon with the red filling are two different layers. In my atlas I would like that only those red Polygons are represented that are inside the polygons with no filling.     The atlas is iterating over the polygons with no filling.

In QGIS 2.14 is there any way of just showing features within the atlas from another layer. In the image the atlas feature is the red "Estates" layer and the blue buildings are the "buildings" layer.  I have created over 30 plans showing different estates. I wish to only see the buildings that are within the estates boundary and none of the others. Is this possible?


These look the same to me but why do they produce different outputs? I'm new to Java so bear with me!  This swap function works  //Swap 1 Output is "4,8" public class SampleSwap { public static void main(String[] args) {        int a=8;     int b=4;     int temp;      temp=a;     a=b;     b=temp;     System.out.println("a:" +a);    System.out.println("b:" +b); } }   This swap function does not work  //Swap 2 Output is "8,4"  public class Swap { public static void main(String[] args) {     int a = 8, b = 4;     swap(a, b);         System.out.print(a + "," + b);     System.out.println(); }  public static void swap(int a, int b) {     int tmp = a;     a = b;     b = tmp; } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


In Zermelo-Fraenkel set theory do there exist sets $a,b$ such that $a \in b$ and $b \in a$. I think that no such sets exist but I am not sure how to prove why this is the case.

Is it possible in ZFC that you have a cyclic containment of sets, e.g., a inclusion like $A \in B$ and $B \in A$?  I never took set theory classes, I am just curious.


What do you call a word with the same spelling and the same meaning, but different pronunciation if it is a verb or a noun?  It doesn’t fit the definition of homonym, homophone,  or homograph.     Take “rebel” as an example. As a noun it’s pronounced one way and differently as a verb, but it has the same spelling and same root meaning.   Also, are there any other examples of this occurrence?

I'm talking about words like:   construct: CON-struct(n.), cun-STRUCT(v.) present: PRE-sent(n.), pre-SENT(v.) record: RE-cord(n.), ri-CORD(v.)   They are pronounced differently based on whether they are a noun or a verb.  Here are the terms I DON'T think would apply:   Homograph: same spelling, different meanings: for example, bark (the sound of a dog) and bark (the skin of a tree). Homophone: same pronunciation, different meaning: for example, to and two Homonym: same pronunciation and spelling, different meanings: for example: bank (river bank or savings bank) Heteronym: same spelling,  different pronunciations and meanings: for example bow (the front of a ship) and bow (a ranged weapon)   Bow is particularly interesting. It is a heteronym based on the two nouns I described. But in the sense of the body movement, the noun and the verb are pronounced alike (rhyming with wow), thus, not belonging to the category I've explained.  In fact none of the terms explained  satisfy my requirement.  I'm looking for the term for words that have same (or related at best, NOT different) meanings, same spelling and different pronunciation.  Specifically, different pronunciation depending on the part of speech. As against the words which have the same pronunciation in different parts of speech like bill, turn, case (or bigger ones like manoeuvre)  TL;DR:  Fill in the blank:     The noun and verb forms of construct are pronounced differently   because the word construct is a _____   or      The noun and verb forms of construct are pronounced differently   because they are _____s.


I read a short story (I think, but it might have been a novel), where most races discover a very easy way to travel faster than light at a certain point in their technological development.   What I remember:   The guys in wooden ships bounced around subjugating the people without FTL travel. Earth had never figured out the FTL, and so had poured its effort in a different path, achieving present day technology. The aliens were freaking out about handing the humans FTL travel. The story was told from the point of view of the aliens. I read it in the last 10 years, but there is no telling how old it actually was, although I do remember them mentioning F-18s or F-14s.

There is a sci-fi book whose premise is that a FTL drive is very primitive technology discovered by most alien races some time between their equivalents of the Bronze Age and Middle Ages.  Once FTL is developed, advances in other technologies slows or ceases.  The galaxy is rife with what amounts to ancient Romans flying through space conquering each other.  Occasionally, a race reaches the Victorian era before developing FTL travel. They become the big kids on the block, conquering willy-nilly.  For whatever reason, Earth never stumbled upon FTL on their own.  Confined to their single planet, Humanity developed advanced technologies: Metallurgy, Medicine, Mechanics, Radioactives, Computers. Warfare. Modern Earth.  In a galaxy filled with ancient Romans.  One day, Earth is invaded by a fleet of bronze spaceships.  A bunch of crossbowmen pour out and are immediately eradicated.  Earth now has FTL technology.  You can guess what happens next.  The book takes place countless thousands of years later when the galaxy spanning Terran empire has collapsed millennia ago.  Can you point me to the book?


I have been scratching my head over this, as both sound like they could be correct, I just can't figure out which one is more so:     I had a choice between apples and oranges.   Or     I had a choice between apples or oranges.   I feel like the first is probably correct, but is the second wrong, or just not preferred?

Today I heard somebody say:     This (technology) can be the difference between life or death.   And I winced.  While “life or death” can be used as an adjective (e.g., modifying “situation” or “decision”), I believe that “between X or Y” is wrong, because “between” should always be used with “and”. (Or an implied “and” , as in “between jobs”.)  Is “between X or Y” ever acceptable?


how to compute $\displaystyle I=\int\limits_{0}^{\pi/2}\frac{x}{\tan x}\,dx$  i made $f(x)=\frac{x}{\tan x}$ and then i see that  $$\begin{align} \lim_{x\to0}f(x)&=\lim_{x\to0}\frac{x}{\tan x}\\ &=\lim_{x\to0}\frac{x\cos x}{\sin x}\\ &=\lim_{x\to0}\frac{\cos x}{\frac{\sin x}{x}}\\ &=\frac{\lim\limits_{x\to0}\cos x}{\lim\limits_{x\to0}\frac{\sin x}{x}}=1\\ \lim_{x\to\pi/2}f(x)&=\lim_{x\to\pi/2}\frac{x}{\tan x}=0 \end{align}$$  we have that $f(x)$ is decreasing into $(0,\pi/2)$ and $f(x)\in(0,1)$ for $x\in(0,\pi/2)$, then i think that  $$0<\displaystyle \int\limits_{0}^{\pi/2}\frac{xdx}{\tan x}<\frac{\pi}{2}$$  i think the primitive can not be expressed in terms of elementary functions, then i think that other method like residue theorem or power series would be used, but i dont know how to use any of these, how i compute this integral?

$$\int_{0}^{\frac{\pi }{2}}x\cot(x)dx$$   I tried integration by parts and got $\dfrac{1}{2}\int_{0}^{\frac{\pi }{2}}x^{2} \csc^{2}x dx$ which doesn't help at all. I don't really know what to do. Any help will be greatly appreciated.


I need a bootable DVD to install a desktop from scratch. The default 16.04 distribution .iso is not bootable. Where could I find an bootable image that has files shown in following web page?

I have downloaded an ISO file recently.  How do I burn it to a CD or DVD or mount it?


I want to be able to use taskwarrior at work.  But the computers at work don't allow me to install anything, they all run Win XP, and IE...  So, I would like to somehow SSH to a linux box at home, and do it through a browser.  I should mention that I'd be working with a dynamic IP.  Is this possible? If so, what is the simplest way to do this?

I'm in kind of a tight spot right now. I wanted to know if someone has seen a HTML, or PHP web ssh client as both my company and school block everything besides port 80. I'm a control freak when it comes to my servers so yah. I have found things like gateone but here's specifically my issue.  I have access via port 80. I host websites on port 80 if my server. I can run PHP scripts via Apache. I cannot visit sites via encryption. I cannot change the ssh port (trust me, I've tried) I have root access to the server.  Any help or Ideas would be appreciated. If worse comes to worse, I can write my own in PHP.


I am writing a script to replace three lines for input in a C++ code.This is the snippet of the C++ code whose inputs I want to change: char outputFileName_ForBlueEdge[50] = "BlueEdge_SetA_PeriodRange1.dat"; //File with model parameters on the blue edge     char outputFileName_ForPositiveGrowthModels[50] = "PostiveGrowth_SetA_PeriodRange1.dat"; //File with model parameters that have positve growth rates     char log_directory_prefix[30] = "LOGS_A/LOGS_A"; //Prefix to log_directory, suffix is model number. This is where LINA file should be  And here is a minimal reproducible version of the bash script: dir=$PWD cplusplus_plotter="$dir"/BlueEdge_Plotter_V7.cpp  #Set B   sed -i \     -e "s/^\([[:blank:]]*char outputFileName_ForBlueEdge[50]\).*/\1 = "BlueEdge_SetB_PeriodRange1.dat"/i" \     -e "s/^\([[:blank:]]*char outputFileName_ForPositiveGrowthModels[50]\).*/\1 = "PostiveGrowth_SetB_PeriodRange1.dat"/i" \     -e "s/^\([[:blank:]]*log_directory_prefix[30]\).*/\1 = "LOGS_B/LOGS_B"/i" \     "$cplusplus_plotter"  However, the C++ file never changes and I keep getting the error: sed: -e expression #3, char 59: unknown option to `s'

I am looking for a way to replace a string in a file with a string that contains a slash by using sed.  connect="192.168.100.61/foo" srcText="foo.bar=XPLACEHOLDERX" echo $srcText | sed "s/XPLACEHOLDERX/$connect"   The result is:  sed: -e Expression #1, Character 32: Unknown option for `s'


I encountered the use of // opertor in place of / in a python tutorial I was going through. What is the difference between / and // operator in Python?

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


I have a presentation where I have section and subsection headings that are displayed at the beginning of each section/subsection. I am trying to get these to be in two columns. I have managed to get the original TOC in two-column format, but the subsequent displays of TOC at section/subsection headings do not come out in two-column. I would appreciate some help  Another issue that I am noticing is that the two-columns on the first TOC are not aligned -- the second column is higher than the first. Cant' figure out why.  Here is a MWE:  \documentclass[table,xcolor=pdftex,dvipsnames]{beamer} \usetheme{Madrid} \usecolortheme{whale} \beamertemplatenavigationsymbolsempty  \usepackage{multicol}  \AtBeginSection[] { \begin{frame}<beamer> \frametitle{Outline} \tableofcontents[   currentsection ] \end{frame} }  \AtBeginSubsection[] { \begin{frame}<beamer> \frametitle{Outline} \tableofcontents[   currentsection,currentsubsection ] \end{frame} }  \begin{document}  \section*{Outline}          \begin{frame}              \frametitle{Outline}      \begin{multicols}{2}            \tableofcontents      \end{multicols}        \end{frame}  \section{Introduction -- Graph Types}  \section{Property Graph Processing}     \subsection{Classification}     \subsection{Online querying}     \subsection{Offline analytics}  \section{Graph Analytics Approaches}     \subsection{MapReduce \& Variants}     \subsection{Classification of Native Approaches}  \section{Graph Analytics Systems}     \subsection{Vertex-Centric BSP}     \subsection{Vertex-Centric Asynchronous}     \subsection{Vertex-Centric GAS}     \subsection{Block-Centric BSP}     \subsection{Edge-Centric BSP}  \addtocontents{toc}{\newpage}  \section{OLAP-Style Analytics}     \subsection{Graph Summarization}     \subsection{Snapshot-based Aggregation}     \subsection{Graph Cube}     \subsection{Pagrol}     \subsection{Gagg Model}  \end{document}

In my LaTeX  presentation I have a long Table of Contents, which has been split across two columns by using the  package. The problem is that I have not found any way to control vertical alignment in the multicols environment. Right now the left column starts lower than the right column, which looks weird. Instead, I would like the left column, or both columns, to be vertically aligned to the top.  I've found some related questions but nothing that solves my problem.  Look at the MWE shown below. As you can see right before Section 3, I tried adding a \vfill along a manual column break, but it didn't help... (The manual column break was added in order to keep Section 3's subsections together with the section in ToC).  Do you have any tricks?  Screenshot of the ToC slide:    MWE:  % MWE showing problems with vertical spacing in multicol ToC \pagenumbering{arabic} \documentclass[compress,14pt,t]{beamer} \usepackage[latin1]{inputenc} \usepackage{multicol} \usepackage{charter} \frenchspacing  \begin{document}  \begin{frame}     \frametitle{Outline}     \begin{multicols}{2}         \tableofcontents     \end{multicols} \end{frame}  \section{Section 1} \begin{frame}Test\end{frame}     \subsection{Subsection 1}     \begin{frame}Test\end{frame}     \subsection{Subsection 2}     \begin{frame}Test\end{frame}     \subsection{Subsection 3}     \begin{frame}Test\end{frame}     \subsection{Subsection 4}     \begin{frame}Test\end{frame}  \section{Section 2} \begin{frame}Test\end{frame}     \subsection{Subsection 1}     \begin{frame}Test\end{frame}     \subsection{Subsection 2}     \begin{frame}Test\end{frame}     \subsection{Subsection 3}     \begin{frame}Test\end{frame}  \addtocontents{toc}{\newpage}           % Splits manually the ToC into 2 columns %\addtocontents{toc}{\vfill\newpage}    % No difference \section{Section 3} \begin{frame}Test\end{frame}     \subsection{Subsection 1}     \begin{frame}Test\end{frame}     \subsection{Subsection 2}     \begin{frame}Test\end{frame}     \subsection{Subsection 3}     \begin{frame}Test\end{frame}  \section{Section 4} \begin{frame}Test\end{frame}     \subsection{Subsection 1}     \begin{frame}Test\end{frame}     \subsection{Subsection 2}     \begin{frame}Test\end{frame}     \subsection{Subsection 3}     \begin{frame}Test\end{frame}     \subsection{Subsection 4}     \begin{frame}Test\end{frame}  \section{Section 5} \begin{frame}Test\end{frame}     \subsection{Subsection 1}     \begin{frame}Test\end{frame}     \subsection{Subsection 2}     \begin{frame}Test\end{frame}  \end{document}


I just discovered the I shoudn't be using \\ as paragraphe separator, so I replaced it with \par.  I wanted also a slight space between paragraphes so I set \setlength{\parskip}{1em} and it's lovely but Latex put an extra space litteraly everywhere! So my table of contents is spread through 5 pages, and what is worst my \expex exemples are also very wide.   How can I control it? Is there a command that allows me to have this blank space in texte only?

Sorry, because I think it's a many times asked topic. But I don't find an example which help me to understand how to create a white space between paragraphs.  I think parskip is the package I need to use but I don't know how to use it.  I have this sample of LaTeX trying to understand how to use parskip package. What am I doing wrong?  \documentclass{report}  \usepackage{parskip}  \begin{document} \setlength{\parskip}{0pt} % 1ex plus 0.5ex minus 0.2ex} \setlength{\parindent}{0pt}  \section{Section Headings}  We explain in this section how to obtain headings for the various sections and subsections of our document.  \subsection{Headings in the `article' Document Style}  In the ``article'' style, the document may be divided up into sections, subsections and subsubsections, and each can be given a title, printed in a boldface font, simply by issuing the appropriate command. \parskip Lorem ipsum `comillas simples' sit amet, consectetur adipiscing elit. Fusce at augue nisi. Mauris vel metus velit. Nunc vitae augue justo, non euismod risus. Nullam et bibendum nisl. Vestibulum nec leo lectus. Phasellus non dui et ipsum malesuada venenatis vitae ut risus. Phasellus tincidunt erat sollicitudin leo auctor sed porta leo commodo. Nullam et adipiscing libero. Ut et mi ac dui facilisis faucibus. Fusce eget magna a quam volutpat accumsan. Duis dictum luctus ligula, at facilisis leo blandit sit amet. Phasellus congue ornare lectus scelerisque malesuada. Praesent et cursus nulla. Quisque aliquam felis ac nunc scelerisque a consectetur elit mattis. \\  \end{document}   Will this spacing work in the entire document?


In debugging a problem the application is throwing the error: Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them. In tracing through where it happens, I found that it is happening when calling an SP that is updating only a few records.  I saw comments related to this error being related to large where clauses or large volumes of data, but I can't understand why this error is happening in SQL 2019 for an SP that only updates a few records.  The logic essentially does:  Grab the information of the record into a temp table Create a new database record with that info Call another SP that returns a pre-formatted string Update the record with some other custom info later on Call another SP that is creating another singular record  That's all that it is doing, and I'm getting this error message and it is causing problems.  Any thoughts?

My problem (or at least the error message) is very similar to .  My customer is working with an SQL select-query, containing a where-clause with exactly 100,000 entries.  The query is failing with error 8632 and error message      Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.)   I find it very peculiar that this error message is thrown, exactly at 100,000 entries, so I wonder if this is a configurable value. Is this the case and in case yes, how can I increase this value to a higher one?  On , there is the proposal to re-rewrite the query, but I'd like to avoid this.  Meanwhile I've found out that the list of entries I'm talking about contains natural numbers, quite some of them seem to be sequential (something like (1,2,3,6,7,8,9,10,12,13,15,16,17,18,19,20).  This makes the SQL where-clause something like:  where entry in (1,2,3,6,7,8,9,10,12,13,15,16,17,18,19,20)   I could transform this into:  where (entry between 1 and 3) OR       (entry between 6 and 10) OR       (entry between 12 and 13) OR       (entry between 15 and 20)   Can this be shortened by:  where entry in (1,...,3,6,...,10,12,13,15,...,20)   ...or something similar? (I know it's a long shot, but it would make software updates easier and more readable)  For your information: the data in the where-clause are the result of a calculation, done on another table: first the entries of that table are read and filtered at the beginning, then some extra processing is done (which is impossible to do using SQL), the result of that extra processing is more filtering and the result of that is used in the where-clause. As it was impossible to write the complete filtering in SQL, the mentioned method has been used. Obviously the content of the where-clause might change at every processing, hence the need of a dynamic solution.


First up, check out this question:    We're seeing the exact same thing on one of our Debian VPS servers - with one big difference, the regularity of said requests. We're seeing 5000+ requests per minute - sometimes as many as 100 requests per second - all for domains that we don't host - this is a big problem as apache is chomping up gigs of ram then crashing the server.  Ive taken a tail snapshot of the other_vhosts_access.log from apache and uploaded here:    Two examples of said log:  vps.XXXXXX.co.uk:80 216.244.68.216 - - [10/Apr/2014:14:57:15 +0000] "GET http://advs.adgorithms.com/ttj?id=2440545 HTTP/1.0" 404 527 "http://www.cashwargames.com/girls-games.htm" "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; Alexa Toolbar)" vps.XXXXXX.co.uk:80 192.157.246.54 - - [10/Apr/2014:14:57:15 +0000] "GET http://ads.yahoo.com/st?ad_type=ad&ad_size=300x250&section=5452138&pub_url=${PUB_URL} HTTP/1.0" 404 520 "http://www.verlyer.com/?p=866" "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5"   Even if we delete all virtual hosts - apache still goes mental replying with 404's to all these requests, and if we configure apache to deny all - it just starts replying with 403's  as a stop gap measure, we've used IPTABLES to block ALL traffic to the server except a few IP addresses of our primary users.  As you can see from the tail log though, these requests are coming from thousands of unique addresses - presumably some botnet has latched on to our server??  How can we stop this attack & re-instate public http access to the server??? (its been going on for over 48 hours now)  The VPS is hosted by a 3rd party and we have no control over the perimeter firewall / hypervisor.  The only thing the 3rd parties support people could recommend was using IPT to block all the IP's - we don't see how that's possible given the vast number of them?

On my web server I have a bunch of websites defined using VirtualHosts. Currently if I request a website from my webserver that is not defined as a virtual host, I will get back the first virtual host in the list.  I would like to make it so that any requests that ask for a website not defined in a virtual host will just close the connection, both for HTTP and HTTPS. I imagine this will involve creating default and default-ssl virtual hosts but I am unsure what exactly to put in them.


Sorry for the clumsy title, but SO wouldn't let me leave it at "implicit conversion not working as expected". Consider this trivial generic type: public class Foo<T> {     public T Bar;     public Foo(T bar) => Bar = bar;     public static implicit operator Foo<T>(T bar) => new(bar); }  Notice the implicit conversion that (at least in my mind) should allow me to create a Foo<T> directly from any T like so: int[] xs = new[] { 1, 2, 3 }; IEnumerable<int> ys = xs.AsEnumerable(); Foo<IEnumerable<int>> foo = ys; // CS0266  However the above will produce a compiler error:  CS0266: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<int>' to 'Foo<System.Collections.Generic.IEnumerable<int>>'. An explicit conversion exists (are you missing a cast?)  Funnily enough, the below code is working without problems: int[] xs = new[] { 1, 2, 3 }; Foo<IEnumerable<int>> foo = xs; // no error  And using an explicit cast "fixes" the compiler error, but crashes at runtime: int[] xs = new[] { 1, 2, 3 }; IEnumerable<int> ys = xs.AsEnumerable(); Foo<IEnumerable<int>> foo = (Foo<IEnumerable<int>>)ys; // InvalidCastException   InvalidCastException: Unable to cast object of type 'System.Int32[]' to type 'Foo`1[System.Collections.Generic.IEnumerable`1[System.Int32]]'.  What is going on here? I'm totally stumped and don't have the slightest clue. .NET Fiddle:

I have a generic class that I'm trying to implement implicit type casting for.  While it mostly works, it won't work for interface casting.  Upon further investigation, I found that there is a compiler error: "User-defined conversion from interface" that applies.  While I understand that this should be enforced in some cases, what I'm trying to do does seem like a legitimate case.  Here's an example:  public class Foo<T> where T : IBar {     private readonly T instance;      public Foo(T instance)     {         this.instance = instance;     }     public T Instance     {         get { return instance; }     }     public static implicit operator Foo<T>(T instance)     {         return new Foo<T>(instance);     } }   Code to use it:  var concreteReferenceToBar = new ConcreteBar(); IBar intefaceReferenceToBar = concreteReferenceToBar; Foo<ConcreteBar> concreteFooFromConcreteBar = concreteReferenceToBar; Foo<IBar> fooFromConcreteBar = concreteReferenceToBar; Foo<IBar> fooFromInterfaceBar = intefaceReferenceToBar; // doesn't work   Does anyone know a workaround, or can anyone explain in a satisfactory way why I shuouldn't be able to cast interfaceReferenceToBar implicitly to Foo<IBar>, since in my case it is not being converted, but only contained within Foo?  EDIT: It looks like covariance might offer salvation.  Let's hope the C# 4.0 specification allows for implicit casting of interface types using covariance.


Given the matrix $A∈M_3(Z_9)$ $$     \begin{pmatrix}     1 & 2 & 3 \\     2 & 3 & 0 \\     0 & 3 & 6 \\     \end{pmatrix} $$ By multiplying the third row by $3$ we have: $$     \begin{pmatrix}     1 & 2 & 3 \\     2 & 3 & 0 \\     0 & 0 & 0 \\     \end{pmatrix} $$ So the matrix is not invertible because there are all zeros in a row, am I right?

Establish if the matrix $A\in M_3 (\Bbb{Z}_9)$  $$     \begin{bmatrix}     1 & 2 & 3 \\     2 & 3 & 0 \\     0 & 3 & 6     \end{bmatrix} $$  is invertible, and if so, find the inverse matrix.


I would like to add my own custom basemaps to the BasemapGallery. Is there any way I can create my own BasemapGallery with only my maps? I am using the ArcGIS API for javascript.  EDIT: for clarity  I have already created a custom basemap that the answer  describes. The issue is that I would like to create a  but with my own basemap, not ArcGIS's. I hope this makes a little more sense now.

I'm trying to make a map using the Javascript API.  I want to use my own basemap, but I can't find the most simple code to do this.  I always see something like this:    function init() {     map = new esri.Map("mapDiv", {       basemap: "satellite",       center: [-97.395, 37.537],       zoom: 11     });   But I don't want to use the ArcGIS online basemaps.  What is the code to make a map service I am hosting my basemap?


I have 13.04 and I am trying to upgrade by cd to 14.04, because my update manager always says it cant find updates, but the option for upgrading is grey. what do I do?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I have two folders /var/first/app and /var/second/app. I have different files within both folders and few are same. I want to merge /var/second/app to /var/first/app. How can I do that?

I have multiple files in multiple folders under one directory that need to be in one folder. Is there a command line that can help me accomplish this?


What is the best way to display the contents of a text (.txt) as it updates?  The log is updated by a C++ program that outputs log/error messages to it, and the file persists between (and is present before) runs.    Currently, I just keep it open in Nopepad++, which asks to update whenever it detects changes were made.  But it requires window focus to do that, which makes debugging some situations difficult and tedius.

I'm looking for the equivalent of the Unix 'tail' command that will allow me to watch the output of a log file while it is being written to.


I'm trying to add a new font to my iOS app. I've followed the following steps :   Add my font file to my "res" folder Add my full font name to my plist file Add a UILabel subclass with the following code     Code:  - (id)initWithCoder:(NSCoder*)aDecoder {     self = [super initWithCoder:aDecoder];     if (self) {         [self setFont:[UIFont fontWithName:@"Gotham-Book" size:self.font.pointSize]];     }     return self; }   However the font is not displayed... I've try the following code to display all the fonts of my app and Gotham is not displayed...   for (NSString *familyName in [UIFont familyNames]) {         for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) {             NSLog(@"%@", fontName);         }     }   I don't understand why it doesn't work. So if you can help me !

I would like to have an app include a custom font for rendering text, load it, and then use it with standard UIKit elements like UILabel. Is this possible?


As the title mentions, is there any way to trigger a script or start/stop an app when the system has been idle for certain time? Similar to how screen is turned off from power settings etc.

I would like to run various cryptocurrency generators, "miners" as they are known as, whenever my main pc is idle more then 30 minutes (no mouse or keyboard activity, etc.).  How would I set this up?  edit: haven't picked what miners I'd use but I want to mine for bitcoin, litecoin, and namecoin right now.


The following problem is from Carothers' Real Analysis:     Suppose $f_n$ is a measurable sequence of functions such that $|f_n|\leq g\in L_1$ for all $n$. Prove that $f_n\to f$ almost everywhere implies $f_n\to f$ almost uniformly.   Thoughts/ Attempt:  At first glance, this looks like a mix of the Dominated Convergence Theorem and Egorov's Theorem.  A sequence of functions $(f_n)$ is said to converge almost uniformly on $D$ if:  $$\forall\epsilon>0\exists N\in\mathbb{N}:\forall n\geq N\implies \sup_{x\in D\setminus E}|f_n(x)-f(x)|<\epsilon \\\text{ (where $E\subset D$ is measurable and $m(E)<\epsilon$) }$$  It is clear that $f\in L_1$.   I tried a few things that didn't lead anywhere such as:  $f_n\to f \text{ a.e.} \implies \int f_n\to \int f \text{ a.e. }\implies |\int f_n-\int f|<\epsilon \text{ a.e. }\implies \int |f_n-f|<\epsilon \text{ a.e. }$  But doesn't lead anywhere about showing almost uniform convergence.  I think I have an idea on how to start now by somewhat imitating the proof of Egorov's Theorem, which defines a measurable set $$E(n,k)=\bigcup_{m=n}^{\infty}\left\{x\in D: |f_m(x)-f(x)|\geq \frac {1}{k}\right\}$$  and shows the measure of this set decreases to $0$ and then a subsequence $(n_k)$ is chosen such that $m(E(n_k,k))<\epsilon/2^k$. Then it is shown that $f_n\to f$ uniformly on $D\setminus E$, where $E=\cup_{k=1}^{\infty}E(n_k,k)$.  However I'm having trouble deciding how to define my set $E(n,k)$ given the hypotheses of the Dominated Convergence Theorem.  Any ideas on how to proceed would be appreciated. Hints are preferred over full solutions. Thanks!

I want to prove that if I omit the fact that $\mu (X) < \infty$ in Egorov theorem and place instead that our functions $|f_n| <g$ and $g$ is integrable, we still get the result of Egorov's theorem.  Fix $m$ a natural number.  I took $ w_{n} = |f_n-f|$ and thus by DCT $\int |f_{n} - f|$ goes to zero.  Then I took $\bigcup_n {( w_{n} \geq 1/m)}$. I need its measure to be finite. Its measure is less than the sum of the measures of each $ w_n\geq 1/m)$ varying $n$, and by Tchebychev, this is less than $m\int|f_{n} - f|$.  But I got stuck here.  Any help is appreciated. Thanks!


Currently some filetypes have their own quicklook associations already, e.g. .mp4 files quicklook with some lite quicktime player, and .jpg files quicklook as an image. How can I make every unassociated file quicklook as if it were text? Commonly I have lots of programming or markup sourcefiles that I want to quickly inspect contents of. I have installed QuickLook Stephen, but it only seems to work for the files it specifically says it works for (README, package.json,— it's NOT working for arbitrary unassociated files, in my case these are files like *.cs, *.csproj, *.yml)

I'm a programmer, and I find Mac's QuickLook a really great feature for quickly becoming familiar with a particular code base.  Basically, I open up a Finder window in the directory where my code files are, I push the spacebar (to evoke QuickLook), and then I arrow key up/down/left/right through all the files and scroll within QuickLook as needed.  The problem that I run into are files with no extension and files with unknown extension.  How can I convince the Mac to attempt to QuickLook these files as text files (which they usually are).  Also, it's really nice how QuickLook automatically colors the code based upon the type of code it thinks it is.  How can I extend the types of code files that the Mac recognizes?  For instance, I want to be able to QuickLook the code in a *.html.erb file or a *.js.erb file.


During the course of the Lord of the Rings, many people suggest using the One Ring against Sauron, for example Boromir, who proposes using it to defend Gondor. Likewise, more knowing characters such as Gandalf and Elrond are diligent to explain that using the Ring against Sauron himself is foolish and destructive.  However misguided Boromir's ideas about the Ring may have been, I'm intrigued: How did he think the Ring would have helped him protect Gondor? How did Boromir envision using its powers?

How could the One Ring help them? Leaving aside the evil inside the One Ring, how could the One Ring bring any help to Gondor?  It seems that one of the useful powers of the One Ring is that it could control the lesser Rings given to the Elves, Dwarves and Humans. But how could that help with their war?


The Last Leaf  In a little district west of Washington Square the streets have run crazy and broken themselves into small strips called "places." These "places" make strange angles and curves. One Street crosses itself a time or two. An artist once discovered a valuable possibility in this street. (suppose a collector with a bill for paints, paper and canvas should, in traversing this route, suddenly meet himself coming back, without a cent having been paid on account!)    I don't get its meaning clearly and also about the term "should" at the end of the sentence!   Is collector someone who collect money for somethings done that people should pay for them?   Could you write it in the other words to make it clearer?  Sorry my english is not so good. If I made some mistakes please correct me. Thanks in advance.

Can we use "should" instead of "" and vice versa? I've noticed that mostly they mean the same thing in the subjunctive and the conditional clauses. Especially when the "were to" isn't in the if-clause but an  instead.  What I mean to say is that these mean the same:   Should we get more money next month, we would be able to buy an oven. Were we to get more money next month, we would be able to buy an oven.   But my British friend says that "should + would" is incorrect grammar and "will" should be used instead. I cannot find a way to prove that my examples are correct. And he says the inversion is too formal and best be avoided. His variants are:   If we should get more money next month, we will be able to buy an oven. If we were to get more money next month, we would be able to buy an oven.   That makes them completely different in meaning.


I have this program which has a class Ant where:  The default constructor initialises the instance variables queens to only 1 queen named “Beth” and colonySize to 100,000.  The defined constructor takes in two parameters and initialises the corresponding instance variables.  The method display, shows the information about an ant in the format below:  This ant colony has the following queens: Queen 1: Beth The colour of the ants: black The approximate colony size: 100000   Here is what I have done:  public class Ant {  private String[] queens; private String colour= "black"; private int colonySize;   public Ant(){     queens[0]= "Beth";     colonySize= 100000; }  public Ant(String[] queens, int colonySize){     this.queens[0]= queens[0];     this.colonySize= colonySize; }  public void display(){     System.out.println("Queen 1: "+ this.queens[0]);     System.out.println("Colour of the ants: "+colour);     System.out.println("The size of the colony: "+ this.colonySize);    } }   The prob is arising when I am calling it in the main.  Main Class  public class MainAnts {      public static void main(String[] args) {         // TODO Auto-generated method stub         Ant obj= new Ant();        obj.display();      }  }   I am getting a Null Pointer Exception (because I suppose that's not the right way to call the display method in the main since it has an array variable).

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 know "If $G$ is cyclic, then $G/H$ is cyclic" is true, but I was wondering if it true if, "If $G/H$ is a cyclic group, then $G$ is a cyclic group"? I think this would be true since $H$ is a subgroup of $G$ then $G/H \in G$ and since it's cyclic then $G$ must be cyclic right? Do I have the right reasoning/is this this a true statement?

i) Does there exist a group $G$ with a normal subgroup $H$ such that $H , G/H$ are abelian but $G$ is not ?   ii) Does there exist a group $G$ with a normal subgroup $H$ such that $H , G/H$ are cyclic but $G$ is not ?


Can you tell me how to get the line count in a script?  PID_COUNT = 'cat /david/file1/test.sh | wc -l '   is not working, shows an error "illegal -l".

I want to assign the result of an expression (i.e., the output from a command) to a variable and then manipulate it – for example, concatenate it with a string, then echo it.  Here's what I've got: #!/bin/bash cd ~/Desktop; thefile= ls -t -U | grep -m 1 "Screen Shot"; echo "Most recent screenshot is: "$thefile;  But that outputs: Screen Shot 2011-07-03 at 1.55.43 PM.png Most recent screenshot is:   So, it looks like that isn't getting assigned to $thefile, and is being printed as it's executed. What am I missing?


I am a technical writer, tasked with producing a tutorial on PHP programming. In the latest work on the series, I've titled my article:  "An Overview of PHP Data Types and Variable Concepts"  The editorial team is asking whether the title should be "...Variable Concepts" or "...Variables Concepts". Which title would be correct both technically and grammatically?  Note: There are multiple types of "data" and multiple types of "variables" in the PHP Programming language.

When there are several cottages each with several tariffs (depending on the season), should the plural be "cottage tariffs" or "cottages tariffs"?  For context, this is to be a section title on a website renting out the cottages.  An explanation of the grammatical rules would be helpful.


I have a laptop. In said laptop I have windows 8.1 and 4 partitions.  My partitions list are as follows:    System Partition - Size:350 MB - simple driver Driver C (My windows 8.1) - Size:150 GB - simple driver Driver D - Size:390 GB - simple driver Driver E - Size:390 GB - simple driver   When I install Ubuntu on my laptop, my partitions are:   Unknown - Size: 1 MB because I install Ubuntu with my flash. Unknown - Size: 350 MB sda1 - Size: 150 GB sda2 - Size: about 800 GB   I want install Ubuntu on driver E or D but I can not see my drive E or D and drive D and E are sda2.

I would like to install Ubuntu alongside Windows 7 on a HP G62 Notebook. Although I have installed  Ubuntu in a dual-boot many times before, I found out that this model has already four partitions.    Partitions:   SYSTEM (NTFS, 199MB, used 66.59MB) Partition without any tag: NTFS (579GM, used 129GB)  RECOVERY (NTFS 16.74 GB, used 2.42GB)  HP_TOOLS (FAT32, 103.34 MB, used 13.23MB)   Since I am not an expert with partitions I would like to get advice on how to do this.  My first idea is this one:   Free some space from /dev/sda2 (I don't know if could also free some other space) delete the HP_Tools partition (I have already created a backup) create an extended partition with the free space in #1 containing three parititions: swap (1gb); / (EXT4, 30GB);  /home (EXT4, 120GB)   Another option is to use wubi instead.  What do you think? Is there any other way to achieve this?  PS: I really think this HP policy of using 4 partitions is not a coincidence  PS: I tried using gparted from the live CD and I got a warning message saying that if I freed some space from /dev/sda2 I could create serious issues in the system


First, here is what I'm talking about (I changed the contrast to make it more visable, since it's not really visible in still images):    Ingore the chat box, I was spamming buttons to see which one took a screenshot :P  Hopefully you can see clearly what I'm talking about. Basically, those lines in the sky (they're only visible in the top part of the image). This seems to occur for me any time I use a still object and move lighting across it (the faster the light, the more the lines are visible to the player). What causes this? It seems to happen in lots of games though (especially in the sky, since it's pretty much still). Is there any way to remove them (I'm not looking for API specific because it seems to occur in all APIs)?

I noticed that in very soft gradients, the 24-Bit colordepth is not enough as you can see the transitions of the color. This pops out the most in dark scenes or night skies.   Why doesn't anybody change the colordepth to two bytes per channel? I know that would be alot of work and a lot of hardware would have to be repalced, but I find it a bit annoying. I really don't think that the technology of the hardware isn't mature enough.   So why is no one doing that?   Here's a picture of "The War Z" where you can see what I mean:


In my AsyncTask, I have doInBackground return an arrayof Movie objects. After searching on how to achieve that, I found  and implemented the solution suggested by the marked answer. The only difference is that as oppose to running the AsyncTask in my onCreate method in the MainActivity, I have the AsyncTask running in the onOptionsItemSelected method in MainActivity.   I was not quite certain solution meant in his implementation of the processFinish method, so I implemented mine like so ( in MainActivity). The list_of_movies variable is a global variable that I intend to pass into a GridView later.   @Override public void processFinish(Movie[] movies){     for(int i = 0; i < movies.length; i++){         list_of_movies[i] = movies[i];     } }   To check that I actually have all the movie objects within list_of_movies, I did a quick loop of Log after I execute the AsyncTask in my onOptionsItemsSelected  public boolean onOptionsItemSelected(MenuItem item) {     int id = item.getItemId();      if (id == R.id.action_popular) {         FetchMovieTask movieTask = new FetchMovieTask();         movieTask.delegate = this;         movieTask.execute("popular");          for(int i = 0; i < list_of_movies.length; i++){             Log.v("Loop Logging", list_of_movies[i].getTitle());         }          return true;     }      return super.onOptionsItemSelected(item); }   Which returns me a java.lang.NullPointerException  I've tried the following  1) I thought maybe I was not allow to call this operation within onOptionsItemSelected, so I tried the same operation in onCreate instead. Also the same error  2) I simply set list_of_movies = movies in the processFinish method, but that does not work either  What am I doing wrong here?   I thought maybe it's because I added the public to the processFinish method, but without public Android Studio would not let me compile due to some clashing issues. Another theory is that list_of_movies is pointing at nothing, but I thought that's the whole point of using interfaces to transfer the Movie[].   Sorry if I'm simply misunderstanding some fundamental concepts of Android, just started learning a few weeks ago. Thanks.


How many triplets $\left(m,n,p\right)$ where $p$ is prime satisfy $m^2-3mn+p^2n^2=12p$?  I've tried taking both sides of the equation modulo 2, 3, and 4, but it hasn't gotten me very far.

Suppose $m,n$ are integers and $p$ is a prime number. Find $(p,n,m)$ if $m^2-3mn+n^2p^2 = 12p$.  I have tried to use the quadratic formula on m,n,p but the three turned to be really messy. Also I tried to factor and take advantage of the fact $p$ is prime but that didn't really help.


From the information I gathered from the H/P Wiki, it says that the veil is a barrier between the land of the living and the land of the dead.  Just wondering on this but what was the prime directive for keeping the veil? How did the Ministry of Magic come across it, and more importantly what information were the Department of Mysteries hoping to acquire since the Department of Mysteries is like the FBI and work on very top secret, undercover missions of some sorts and work of confidential nature.  Is this question answerable through in canon references? That would be highly appreciated. :)

Was the veil created by someone or was it always there in HP? What is its purpose? If one can't communicate with the dead through the veil, then what/how do unspeakables learn from the the veil? (except investigating how does it flutter,I suppose,,,,)


For which digits $a$ does there exist an integer $n \geq 4$ such that each digit of $\dfrac{n(n+1)}{2}$ equals $a$?    I was first thinking of looking at $\dfrac{n(n+1)}{2} \pmod{100}$, but it doesn't look like it has a small period so it may be hard to arrive at a conclusion. Is there an easier way to solve this question?

For which $x$ exists sum $1 + 2 + 3 + \ldots + n$, where $n > 3$, which has notation $xxx\ldots x$?   In other words, I am looking for a sum of natural numbers which gives a result which has all same digits, e.g. $5555555$ or $22222222222222222$, or whatever else.  How to find this series and how to proof it for all possible series?  I have found the following examples:   $1 + 2 + 3 + \ldots + 10 = 55$ $1 + 2 + 3 + \ldots + 11 = 66$ $1 + 2 + 3 + \ldots + 36 = 666$     And what about next series which ends with (different) repeating $x$? Hot to find and proof it?


Why is it common practice to take the log of the dependent variable Y? To be clear, I understand that under appropriate circumstances that taking the log can help normalize the distribution/linearize the model and I have read other threads discussing this. What I am confused about is why is it okay to transform and normalize/linearize Y and make it falsely 'appear' normal instead of using the real, raw data? Don't we want to train the X variable(s) to be able to predict/determine Y as it is, so why are we altering Y?  Additionally, when exactly in the modeling process do we do this? Would I log Y in the linear model lm(log(Y) ~ X, data = df)? Would I do it when calculating RMSE? Thanks in advance!

Say I have some historical data e.g., past stock prices, airline ticket price fluctuations, past financial data of the company...  Now someone (or some formula) comes along and says "let's take/use the log of the distribution" and here's where I go WHY?  Questions:   WHY should one take the log of the distribution in the first place? WHAT does the log of the distribution 'give/simplify' that the original distribution couldn't/didn't? Is the log transformation 'lossless'? I.e., when transforming to log-space and analyzing the data, do the same conclusions hold for the original distribution? How come? And lastly WHEN to take the log of the distribution? Under what conditions does one decide to do this?   I've really wanted to understand log-based distributions (for example lognormal) but I never understood the when/why aspects - i.e., the log of the distribution is a normal distribution, so what? What does that even tell and me and why bother? Hence the question!  UPDATE: As per @whuber's comment I looked at the posts and for some reason I do understand the use of log transforms and their application in linear regression, since you can draw a relation between the independent variable and the log of the dependent variable. However, my question is generic in the sense of analyzing the distribution itself - there is no relation per se that I can conclude to help understand the reason of taking logs to analyze a distribution. I hope I'm making sense :-/  In regression analysis you do have constraints on the type/fit/distribution of the data and you can transform it and define a relation between the independent and (not transformed) dependent variable. But when/why would one do that for a distribution in isolation where constraints of type/fit/distribution are not necessarily applicable in a framework (like regression). I hope the clarification makes things more clear than confusing :)  This question deserves a clear answer as to "WHY and WHEN"