Given the following class class sq():     def __init__(self,func,x):         self.func = func         self.x = x      def square(self):         return self.func(self.x)**2      y = lambda x,p: x + p p_ls =  range(1,11) x = 0  objects = [sq(lambda x: y(x,pi),x) for pi in p_ls] squares = [sq(lambda x: y(x,pi),x).square() for pi in p_ls] #[1, 4, 9, 16, 25, 36, 49, 64, 81, 100] squares1 = [obj.square() for obj in objects] #[100, 100, 100, 100, 100, 100, 100, 100, 100, 100]  i can't understand why squares are not equal to squares1. Its seems like all objects in objects list are using p = p_ls[-1]. Is there a way to "store" func each time the class is called ?

While I was investigating a problem I had with lexical closures in Javascript code, I came along this problem in Python:  flist = []  for i in xrange(3):     def func(x): return x * i     flist.append(func)  for f in flist:     print f(2)   Note that this example mindfully avoids lambda. It prints "4 4 4", which is surprising. I'd expect "0 2 4".   This equivalent Perl code does it right:  my @flist = ();  foreach my $i (0 .. 2) {     push(@flist, sub {$i * $_[0]}); }  foreach my $f (@flist) {     print $f->(2), "\n"; }   "0 2 4" is printed.  Can you please explain the difference ?    Update:   The problem is not with i being global. This displays the same behavior:  flist = []  def outer():     for i in xrange(3):         def inner(x): return x * i         flist.append(inner)  outer() #~ print i   # commented because it causes an error  for f in flist:     print f(2)   As the commented line shows, i is unknown at that point. Still, it prints "4 4 4".


TL;DR minor bug: a question's showing up on our site that's attributed to nobody at all on the front page. RPG Stack Exchange just now had this happen:   was migrated to our site, belonging to a user (“Light”) who doesn't yet have an account on our site so they show up as anonymous. The question was closed as off topic since we only deal with tabletop games. The question was accordingly locked and the migration was rejected.  Now the question is showing up on our front page with a timestamp but attributed to nobody, not even Community or the anonymous “Light” user. The front page as I see it:  The question page itself:  Possible cause The timestamp on the frontpage appears to correlate exactly to  so presumably this would happen to any migrated question, even if it wasn't closed:  Curiously it has its attribution on the /questions page:

The active tab on  just showed this:    Normally I can see what caused that question to popup in the active list. But for migrated questions a friendly text is missing. I could only find out by .  Is the default behavior for migrated posts to show no label for the user action? It kind of would make sense as migration is not a single user action. For UX consistency I would prefer the label migrated for those cases.  User  found another similar glitch on April, 5th 2020 when a question is  to a child-meta, in this case . The active list on IPS Meta shows:        Notice that both action and user are missing here. The user did have an account on the migration date on both sites, so that is not the root cause  Can this be fixed?


This is very likely to be a probabilitic problem，just noting that  $$E[1/X]=\sum_{k=n}^{\infty} \frac{1}{k}\binom{k-1}{n-1}p^n(1-p)^{k-n},$$ where $X$ is the random variable of Negative-Binomial Distribution. Thus the present limit is the very $$\lim_{n \to \infty} nE[1/X].$$ How to go on from here? Can it be solved just by calculus without probability?

How to calculate this limit  $$ \lim_{n\rightarrow+\infty} np^n \sum_{k=n}^{+\infty} \frac1k \binom{k-1}{n-1} (1-p)^{k-n} ,\quad\,where\;0<p<1 $$


How do I add multiple clocks with different time zones in Ubuntu 19.10.   Solution:   Install clock using sudo apt install gnome-clocks Open Clock app and add required timezones Restart the PC   Important: Do not install using snap or using software installer, this have permission issue to clock and multiple timezones won't appear.  Ref:

I looked everywhere but I couldn't find a way to display multiple clocks in GNOME 3. In classic GNOME and Unity, it is possible. Also, for some strange reason, additional timezones cannot be added to the clock using the time-date applet in classic GNOME. Any solutions?


This is related to  and .  Consider a purely commercial conference, run entirely to make money. A US company pays a steep fee as a 'sponsor'. In return, the company receives a speaking slot. The company instructs a US citizen and resident to travel to the UK for a weekend to speak at the conference.  Based on the answers to those two questions, it seems as if this person would need to apply for a visa in advance, or else risk being trebuchetted right back to the US. Am I missing something?

In the last few days, a friend-of-a-friend who was due to give a talk at a tech conference in the UK was denied entry at Heathrow and sent back. Their full story . It seems that, in the last few days, the  has been changed. (Compare the  with )  Understandably, with a comparatively well known tech speaker being turned back at the border before a talk, there's been a lot of "WTF"'s and "surely that's not right" on social media from those in and around the UK / US / EU tech scene.  Rather than rely on bits of www.gov.uk which appear to change quite often at the moment (possibly related to many of the people attending the conference in question having the personal phone numbers of people working on the gov.uk site!), I was wondering what the rules and guidance actually said?  If you hold a passport from one of the countries that normally entitles you to request "leave to enter" on arrival in the UK, and you're coming over to give a talk at a conference, what are the rules on if you need to get a visa in advance? And does it vary depending on if the conference organisers are paying for your flights/hotels or not? Or if they're giving you a small fee or not? Or if the conference organisers are a UK or EU registered company?


I am trying to reduce the amount of memory footprint a huge data table (array) occupies during execution.  For that I am using JCMD to print the histogram.  However I found something funny here:   num     #instances         #bytes  class name ----------------------------------------------    1:      28409956      454559296  java.lang.Float    2:       3156662      227280584  [Ljava.lang.Integer;    3:       3156660      227279520  [Ljava.io.Serializable;    4:        526110       21044400  [[Ljava.io.Serializable;    5:        233936       17436808  [C    6:        241719        5801256  java.lang.String    7:         54517        3684696  [Ljava.util.HashMap$Node;    8:         93867        3003744  java.util.HashMap$Node    9:         74535        2981400  java.util.LinkedHashMap$Entry   10:         38269        2143064  java.util.LinkedHashMap   11:           190        2108240  [[[Ljava.io.Serializable;   12:         29416        1411968  java.util.HashMap   13:          5345        1400312  [B   You see that I have 28409956 instances of Float, and that the total RAM it takes is 454559296 bytes. If it divide the bytes / instances, I will get 16 bytes per Float...! This means each Float occupies 128bits!?  What am I missing?  How can I further reduce the memory these Floats (and the Integers -- I can't use Short) take?  Or better, how can I force Kotlin to use primitives (I only found out how to do it in arrays with IntArray, FloatArray, etc)?  Thanks!

Is the memory space consumed by one object with 100 attributes the same as that of 100 objects, with one attribute each?  How much memory is allocated for an object? How much additional space is used when adding an attribute?


What is a person called who uses:   Complicated vocabulary when a simple answer would be sufficient? Uses complex vocabulary to make others think they are highly educated Is unnecessarily verbose

Possible Duplicate:          There are people who are blessed with a remarkable knowledge of vocabulary and diction – people who can come up with beautifully crafted sentences and expressions on most subjects at the drop of a hat. But some times, one tends to go overboard with a desire to show off the abundance of words one has at one's disposal and the result of that might create some confusion for a middling English speaker like me.  Of course, what appears confusing to me may not do so to others. Besides, I believe there is no clear line or distinction between using and overusing one's rich vocabulary. So, this post is not about what you would think showing off one's vocabulary is, but rather what you would call it.  To cut it short, I am looking for a word or phrase to describe  1) someone with an exceptional knowledge of vocabulary and diction 2) using of words and idiomatic expressions by someone in a way that appears to be more a show off and less necessary.


I would like to know if you guys would know a tool that allows to know what's actually going on during the installation of a software on Windows. I would like to know which files have been created/modified, which/where binaries have been copied, and which registry keys have been created/modified.

Several months ago I saw someone using an application that showed him files on the computer being modified in real time.  Basically there was an application that wasn't working correctly, so he installed the program, ran the application, and saw all the various files that the application either read from or wrote to.  He found out the application was writing a large debugging file it shouldn't be, which ended up being the problem.  I don't remember the application or the name of the person who used it, but I believe it's a freeware application.  Does anyone know what this program might be?


i had windows8 os in my laptop HP Pavilion G series.it was partitioned in c: d: e: drives.i installed ubuntu 14.04.all the partitions are gone and ubuntu is showing a single disk.i last all the data can i recover that data.

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.


i am trying to install ubuntu 14.04.2 LTS......i booted via usb .....when i start the installation process, i select the language,then tick for "download third party appications" and "check for updates while downloading" and then i get to choose what should i opt for ...so i select "install ubuntu alongside windows 8" and as soon as i click "continue", the computer restarts with windows 8....what should i do? i tried rebooting and also tried to reinstall "wubi" on my pendrive but the same situation occurs....

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


Notification settings   I can't seem to enable Plasma notifications. I never explicitly installed 'knopwob dunst' but after upgrading it somehow became the default. How can I get Plasma notifications working again?

I was testing i3wm (sudo apt-get install i3 is what I ran, and chose i3 from the log in screen) on my machine and after a while, decided to switch back to Unity. Upon switching back, I noticed that notifications came in the top right corner similar to i3 even though I was using Unity.  I'd really like it to use the normal Unity notification bubbles instead.  I looked into it and turns out instead of notify-osd, dunst is being used.   I tried using sudo vim /usr/share/dbus-1/services/org.freedesktop.Notifications.service and editing the file, but it has the correct line (i.e. Exec=/usr/lib/x86_64-linux-gnu/notify-osd) as expected.  I also tried unity-tweak-tool --reset-unity but that didn't do anything.  Is it possible for me to return to the normal notifications? Any help would be greatly appreciated. Thanks :)  Edit: I was able to return to the normal notifications by removing i3wm itself (and dunst). What I am actually asking is: is it possible to change to normal notifications while still keeping i3 and dunst on my system?  Note: This is NOT a duplicate of . The solution there is to remove dunst and I would like to keep dunst and have that work when I choose i3, and have notify-osd work when I choose Unity.


I am trying to add an item to a list of card objects, and I get a nullpointer exception if I run this code. I believe I can't add to a 'null' list, but how do I fix this? (The error occurs at 'cards.add(...);')  public class Deck {      private List<Card> cards;     public Deck(String[] ranks, String[] suits, int[] values) {         for (int i = 0; i < ranks.length; i++) {             for (int j = 0; j < suits.length; j++){                 cards.add(new Card(ranks[i], suits[j], values[i]));             }         }     }

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 am using the following jquery code to get data from database-  $.get('loadTaskDetails' + $taskId, {taskId: $taskId}, function(data) {                     $.each(data, function(i, data) {$('#ddl_Deliverables').find('option[value=data.tasks_deliverable_id]').attr('selected', true);                     });                 }, 'json');   I have a a dropdown (ddl_Deliverables) which already contains many options. I want the option value to be set selected with the macthing value coming from database through $.get method.

I have a drop-down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery.  Using regular JavaScript, I would do something like:  ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it too.   However, I need to do this with jQuery, because I'm using a CSS class for my selector (stupid  client ids...).  Here are a few things I've tried:  $("._statusDDL").val(2); // Doesn't find 2 as a value. $("._statusDDL").children("option").val(2) // Also failed.      How can I do it with jQuery?     Update  So as it turns out, I had it right the first time with:  $("._statusDDL").val(2);   When I put an alert just above it works fine, but when I remove the alert and let it run at full speed, I get the error     Could not set the selected property. Invalid Index   I'm not sure if it's a bug with jQuery or Internet Explorer 6 (I'm guessing Internet Explorer 6), but it's terribly annoying.


I wonder if there is a general formula for Reflexive Relation ?  I wonder how to prove it if there is one.

Problem:  If a set $A$ has $n$ elements in it, how many reflexive relations can be defined on it?  My solution  Is the answer  summation of (n^2 - n)C(i)  for i=0 to n^2 -n  $$\sum_{i=0}^{n^2-n} C(n^2-n,i) = \sum_{i=0}^{n^2-n} \binom{n^2-n}i$$  How? well if i make a matrix $n\times n$  now the diagonal elements have to be selected,out of remaining $n^2-n$ any number of elements can be selected.


What if I assume an ideal gas in a cylinder having frictionless piston and perfectly insulated walls with a perfectly conducting base is kept on a reservoir at temperature $T$ which is greater than the temperature of gas. The gas inside the cylinder would expand due to heat gained and the piston would rise in proportion to keep the temperature constant. All I essentially did was describe an isothermal process which is mathematically, $dU = dQ - dW$ Which in our case would be, $dQ = dW$ Since the temperature stayed constant and thus the internal energy as it is an ideal gas. Does it not mean that all of the heat that I'm supplying to the system is being used to do work which is a direct violation of the statements:  All of the heat can never be converted to work. Or 100% of heat can never be converted to work. (Which is just one of the variations of second law of thermodynamics I suppose, nevermind if not)  Or is there something else I need to know.

According to 2nd law of thermodynamics, it is not possible to convert heat 100% into work.   Well, investigating about the Carnot Cycle, I have found out that in the first step, the process is to heat a gas without rising its temperature, this is, converting all the heat into work. Isn't this a violation of the 2nd law?  I clearly don't understand something about the law or about the Carnot Cycle. I would like to know where I'm failing in my understandig. Thank you.


I need to find explicitly the following summation  $$\sum_{n=1}^{\infty}\frac{H_{n+1}}{n(n+1)}, \quad  H_{n}=1+\frac{1}{2}+\cdots+\frac{1}{n}$$  From Mathematica, I checked that the answer is $2$. The same result is .  A thought from afar: $$ \begin{align} \frac{H_{n+1}}{n(n+1)} &=H_{n+1}\left(\frac1n-\frac1{n+1}\right)\tag1\\ &=\color{#C00}{H_{n+1}}\color{#090}{(H_n-H_{n-1})}-H_{n+1}(H_{n+1}-H_n)\tag2\\ &=\color{#C00}{\frac1{n+1}}\color{#090}{\frac1n}+\color{#C00}{H_n}\color{#090}{(H_n-H_{n-1})}-H_{n+1}(H_{n+1}-H_n)\tag3\\ &=\frac1n-\frac1{n+1}+\frac{H_n}{n}-\frac{H_{n+1}}{n+1}\tag4\\ &=\frac{H_n+1}{n}-\frac{H_{n+1}+1}{n+1}\tag5 \end{align} $$ What was done: $(1)$: partial fractions $(2)$: used $\frac1n=H_n-H_{n-1}$ and $\frac1{n+1}=H_{n+1}-H_n$ $(3)$: used $\color{#C00}{H_{n+1}=\frac1{n+1}+H_n}$ and $\color{#090}{\frac1n=H_n-H_{n-1}}$ $(4)$: partial fractions and $\frac1n=H_n-H_{n-1}$ and $\frac1{n+1}=H_{n+1}-H_n$ $(5)$: combined terms  Now this looks like Clement C's hint.

I am interested in the proof of $$\sum_{n=1}^{\infty}\frac{H_{n+1}}{n(n+1)}=2, \quad  H_{n}=1+\frac{1}{2}+\cdots+\frac{1}{n}$$  This result can be verified by Mathematica or   This series can be found as  in the book Ovidiu Furdui: . Problems in Mathematical Analysis, Springer, 2013, Problem Books in Mathematics; where it is stated in the form  $$\sum_{k=1}^\infty\left(1+\frac12+\frac13+\dots+\frac1{n+1}\right)\frac1{n(n+1)}=2.$$  Some related thoughts:   It is relatively easy to show that the series converges, the $n$-th term is approximately $\frac{\ln n}{n(n+1)}$. So we could use  with the series $\frac1{n^\alpha}$ for any $\alpha\in(1,2)$. If the numerator is one, the series sums to $1$:  Here we expect larger result.


Is It possible to get images from godaddy and use in visualforce page ,if it possible can You tell me syntax for that in visual force page.

Hi is it possible to get images from go daddy  to visual force pages.if it possible can you explain clearly how the process is.


After watching a few videos on  and , I am a little confused.  The way things are explained, is that light is just the same as electromagnetic radiation I thought this would be strange as then microwaves and radios would also be called light. Plus, I am not sure of the origin of the word photon, but in Japanese which I use it is 光子 which kind of translates to light molecule.  I found an answer to this:     electromagnetic radiation to which the organs of sight react, ranging in wavelength from about 400 to 700 nm ()   However, after searching the web it seems that this is approximately the same spectrum for humans. So, is there a difference between light and visible light? If not, why use visible light?

Somebody mentioned on Freenode chatroom for physics that All  are delivered in form of Photons not just light.   Is it true? Does that mean if we get a THF electrical oscillator to emit the frequencies that are visible to the eye, do we see light coming out of the circuit?


It is well known that there is no set of all sets. The argument goes as follows:  Define:  $$\mathcal{C}:=\{X: X\ \textrm{is a set and}\ X\not\in X\}.$$  If $\mathcal{C}$ was a set then $$\mathcal{C}\in \mathcal{C}\Leftrightarrow \mathcal{C}\not\in \mathcal{C}.$$  I am asking myself why this would show there is not a set of all sets.   Well, I think if there was a set of all sets it should be equal to $\mathcal{C}$, right? But this would rely on the fact that every set is NOT a member of itself, but what would justify that?  I am not even sure if I understand the definition of $\mathcal{C}$ anyway.  Can anyone give me further clarifications?  Thanks.

I've heard of some other paradoxes involving sets (i.e., "the set of all sets that do not contain themselves") and I understand how paradoxes arise from them.  But this one I do not understand. Why is "the set of all sets" a paradox?  It seems like it would be fine, to me.  There is nothing paradoxical about a set containing itself. Is it something that arises from the "rules of sets" that are involved in more rigorous set theory?


I saw sed 's=.*/==' in context of sh script and I'm puzzled. I could not find in sed manual or web search (for sed s=) how s is used, not s///. Apart from s I see only one potential command here = (Print the current input line number), but in such case what the rest is doing...   Running the command in shell produces same output as input for e.g echo 'jkfdsa=335r34',  whereas echo 'jkfdsa=335r34' | sed 's/=.*/==/' does replacement as per manual. Also slightly modifying command to e.g. echo 'jkfdsa=3' | sed 's798=.*/==/' gives sed: -e expression #1, char 11: unterminated 's' command, so original should have some correct meaning. What is it?

I found line sed 's~ ~~g' in a shell script on a Linux system. What is this ~?


I'm responsible for most of the copy editing at my job.  While it goes pretty smoothly most of the time, there is one area that keeps creating a bit of cognitive dissonance for me:   decisionmaking decision-making decision making   I almost want to go German on it and make it into a compound word as in the first choice, but then I start thinking that a space would be more readable.  Then the hyphen appears out of nowhere as a less-than-satisfying compromise between the two.  No matter how I decide to go, I really haven't been able to find any peace on the matter.  Are there any official declarations from any of the major style guides on this matter?  For what it's worth contextually, the final customer for a lot of my writing is the US Federal Government.

Some compound words are written without hyphens (nonaggression, nonbeliever), some with hyphens (well-intentioned), and others with spaces (post office).  Is there a rule or good guide as to which option should be used?


Time likely had a beginning, because of the big bang theory. But will time ever end?

The Big Bang looks like a lower bound to the "size" of the universe in the time dimension. Could it also have an upper bound, some furthest point in time from the Big Bang?


I still have doubts about the subject. I need help.  Are there really open axioms?  I do not think so. What exists, in fact, I think, are seemingly open axioms, with some implicit quantifier.  For example, when it is stated that x = x is an equality axiom, it seems to me that the following statement is implicit: for every x, x = x.  Am I right?

I have a doubt. I need help.  Can the basic axioms of equality be presented as "open axioms"?  I) (reflexivity) $\qquad x = x$              II)  (Substitutivity) $\qquad (x = y) \to \big(F (x, x) \to F (x, y)\big)$


It is known that if we use the constraint $R_{\mu\nu}(P^{a})=0$ , i.e. the curvature of local translations vanishes, then we can modify general coordinate transformations (gct) to a covariant generalisation thereof (cgct) in such a way that these cgct include local translations. Rephrasing this, local translations can be thought of covariant diffeos.  If   a. LOCAL Lorentz covariance corresponds to the statement that there is no preferred inertial reference frame on curved space.  b. GLOBAL translation invariance corresponds to the statement that a NON-GRAVITATIONAL theory does not distinguish different points in spacetime, and  c. diffeomorphism invariance corresponds to the statement that the coordinate system chosen does not matter  THEN my questions are   Is it safe to assume that LOCAL translation invariance is just the curved space generalisation of the GLOBAL translation case, such that they still correspond to not having a preferred origin, but in curved manifold parlance? Or do they mean something completely different? What does it mean to say that LOCAL translations are eaten up by covariant gct? I assume that the theory is still invariant under them, in the sense that there is no preferred origin. But somehow now this statement comes from diffeos?   In a way I have always been confused about this, as I fail to clearly see the difference between diffeo invariance and the "no preferred reference frame" of local Lorentz. Now I am even more confused because diffeo invariance seem to contain both 'no preferred origin' and "no preferred reference frame".  Notation:  $R_{\mu\nu}(P^{a})=\partial_{[\mu}e_{\nu]}^{a}+2\omega_{[\mu}^{ab}e_{\nu]b}-\frac{1}{2}\overline{\psi}_{\mu}\gamma^{a}\psi_{\nu}$  $P^{a}$ is the generator of local translations.  References:   D.Z. Freedman & A. Van Proeyen, SUGRA, 2012; p. 225

A global Poincare transformation on a scalar field induces  $$\delta(a, \lambda)\phi(x) = [a^{\mu}+\lambda^{\mu\nu}x_{\nu}]\partial_{\mu}\phi(x). \tag{11.46}$$  In curved spacetime we replace $a^{\mu} \rightarrow \xi^{\mu}(x)$, but I read that in fact this new spacetime dependent parameter $\xi^{\mu}$ eats up the effect of the "orbital part of global Lorentz", so that in fact $\xi^{\mu}(x)=a^{\mu}(x)+\lambda^{\mu\nu}(x)x_{\nu}$, and we effectively have to treat $\xi^{\mu}$ and $\lambda^{ab}$ (the spin part of Lorentz) as the basis for gauge transformations.  I don't understand why this should be, any comments that might help? Why does the new local translation parameter include the effect of what globally used to be rotations/boosts?  References:   D.Z. Freedman & A. Van Proeyen, SUGRA, 2012; p. 225.


It seems that newer versions of bash have the &> operator, which (if I understand correctly), redirects both stdout and stderr to a file (&>> appends to the file instead, as Adrian clarified).   What's the simplest way to achieve the same thing, but instead piping to another command?  For example, in this line:  cmd-doesnt-respect-difference-between-stdout-and-stderr | grep -i SomeError   I'd like the grep to match on content both in stdout and stderr (effectively, have them combined into one stream).  Note: this question is asking about piping, not redirecting - so it is not a duplicate of the question it's currently marked as a duplicate of.

I want to redirect both stdout and stderr of a process to a single file. How do I do that in Bash?


I have to prove $F^2_{n−1} = F^2_n + F^2_{n−1}$ for any $n >=1$ by induction (for the Fibonacci sequence).  For the basis step, I have:  $n = 1; $  $F_{(1)-1} = F^2_{(1)} + F^2_{(1)-1}   ->$  $ 1 = 1^2+ 0$  As the base case holds, we can then assume that $n=k$:  $F_{2(k)-1} = F^2_{(k)} + F^2_{(k)-1} $  Next, this has to be proven for k + 1:  $F_{2(k+1)-1} = F^2_{(k+1)} + F^2_{(k+1)-1} $  I know that you have to somehow used the statement derived on the LHS of the equation in the previous step ( i.e. $F_{2(k)-1}$ ) when proving for $k+1$, but I'm not really sure how to apply the logic here since I've normally seen it used in cases where there is a summation on the LHS.   I currently have worked this out:  $F_{2(k+1) - 1} = F^2_{k + 1} + F^2_{(k+1) -1} ->$  $F_{2k + 1} = F^2_{(k+1)} + F^2_k$  and with some manipulation (I was thinking), you could factor out the $F^2$ from both terms on the RHS resulting in this:  $F^2_{(2k +1)}$, but even after doing this, the term on the LHS is:$F_{2k + 1}$ so even though both sides are similar, they differ by the squared term on the LHS.   Is my logic wrong in the inductive step? If so, how should I go about the proof?

Using induction, how can I show the following identity about the fibonacci numbers? I'm having trouble with simplification when doing the induction step.  Identity: $$f_n^2 + f_{n+1}^2 = f_{2n+1}$$  I get to:  $$f_{n+1}^2 + f_{n+2}^2$$  Should I replace $f_{n+2}$ using the recursion? When I do that, I end up with the product of terms, and that just doesn't seem right. Any guidance on how to get manipulate during the induction step?  Thanks!


Have two older PC's (laptop and desktop, both Dells, both running XP Pro) and various peripherals, none of which I plan to replace in the near future.   The two machines currently share an older HP Officejet K60 printer/scanner/fax (requires swapping USB cables each time) - as the two machines are never in use at the same time, I'd like to be able to plug the peripherals (above mentioned printer, 21" flat panel monitor, external USB1 hard drive and digital camera card reader) into a hub / a/b switch and have access to the peripherals on whichever machine I'm using without having to swap cables every time I change machines.  From what I can tell from the a/b switch product descriptions I find on the web, it appears that most a/b switches are designed to run two peripherals from one USP port, rather than swapping one or more peripherals between two pc's.  While I'm not unwilling to spend a bit of $$ to acquire the necessary hardware if this is doable, I am on a limited budget, and do not want to buy equipment that may or may not work, and cannot be returned once used.  I should also mention here that my technical capabilities are limited, so any feedback that strays far from layman's terminology is likely to go over my head and be functionally useless.  Thanks in advance for any input anyone can provide........

I want to share a printer to two computers sitting next to each other. Now I plug in the USB printer cable when one wants to print. Is there a cheap and better solution which allows two computers to access this printer (maybe not at the same time)?  I know that I can buy a new router with print-server capability but I already have a working wireless router-modem. My friend told me too that I can just plug the printer in one machine and share it over network, but then I have to boot that PC up before the other can access the printer. That's a little bit inconvenient to me.  Then I came up with this solution by myself. A normal USB hub has one plug and many receptacles. Instead I want the exact reverse, (at least) one receptacle for my printer and many plugs for many computers, but I have found none of such thing in any stores. Have you seen one?  Can you think of other solutions? Thanks.


I'm trying to install the latest vesion of KDE.   ~ $> sudo apt-add-repository ppa:neon/kf5 Cannot add PPA: 'ppa:neon/kf5'. Please check that the PPA name or format is correct.   It seems that ppa:neon/kf5 does not exist?  Is there any other way to install the kde 5?  I'm using Ubuntu 14.04 3.13.0-40-genericx86_64 x86_64

I am attempting to install kubuntu-plasma5-desktop on Kubuntu 14.04 amd64, following    sudo apt-add-repository ppa:neon/kf5 sudo apt update sudo apt install project-neon5-session project-neon5-utils project-neon5-konsole  sudo apt-add-repository ppa:kubuntu-ppa/next sudo apt-add-repository ppa:ci-train-ppa-service/landing-005 sudo apt update sudo apt install kubuntu-plasma5-desktop   Unable to locate package kubuntu-plasma5-desktop  How can I fix this error?


I am really looking for the answer. I will be happy to hear your answers. Thanks Question:  She brought her three friends, none of .... I have ever met before.  who which whom whose

I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly?


So right now I'm doing the Discerning The Transmundane, and the Lexicon Receptacle is not there. I've reloaded my game and everything and nothing has worked. What can I do without having to restart my entire game?

I am level 24. Got the Blank Lexicon and Attunement Sphere from Septimus. Both of these items are in my inventory, so clearly I can't drop them.   For whatever reason, the actual pedestal that you're supposed to place the Blank Lexicon in isn't there... I obviously haven't gotten the Elder Scroll yet, because I need to use the Lexicon to do so (but again, I can't because the freaking pedestal isn't physically there...). I have both Elder Knowledge and Discerning the Transmundane in my quests.   Have no idea what the problem is.. On top of that, my last Save (not quick save) is from when I was like level 5, so if I load I have a hell of a lot to make up. I always quick save because I'm an idiot I guess.   I play on PS4 and use mods, but nothing I use should affect the game this tremendously.


On my site i have hundreds of 50-100 mb audio files. I allow client to download files using this method only:  example.com/downloader.php?file=audio_123.mp3   then PHP file executes readfile (or something like this) to start file downloading.  I am interested, will it reduce (any significant) overload for server CPU, if I would change download links to direct links, i.e. example.com/file.mp3, instead of my current download method?

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


I'm trying to send emails using phpmailer but every mail that i sended, finish in the spam folder.  This is the code  require("phpmailer/class.phpmailer.php"); // or wherever you put phpmail.class  $username="xxx"; $password="yyy";  $mail = new PHPMailer; $mail->isMail(); $mail->IsHTML(true); $mail->SMTPDebug = 4; $mail->setFrom('news@lexvirtual.cl', 'Lexvirtual'); $mail->addAddress("roasdf@gmail.com", "hola"); $mail->Subject = 'Nueva postulación lexvirtual.cl'; $mail->AddEmbeddedImage('../assets/img/common/lexvirtual_logo.png', 'logoimg', '../assets/img/common/lexvirtual_logo.png');  $body = file_get_contents('email_templates/register.php');  $body = str_replace('%username%', $username, $body); $body = str_replace('%password%', $password, $body); $message = $body; $mail->msgHTML($message);  if ($mail->send()) { echo "email enviado"; } else { echo "email no enviado"; }   I'm sending the email from my domain that is lexvirtual (the same domain that i'm using to send the email (news@lexvirtual.cl)).  Now i'm using a template using html but when i send a email using only text, still send the email to spam. I tried reading other questions about this problem,but still can't fix the issue.  Someone can help me please?

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


I need to apply Liouville theorem ("entire bounded complex functions are constant") to prove that an entire function satisfying:  $$f(z)=f(z+1)=f(z+i)$$  for all complex numbers $z$ is constant. I'm really not sure on how to proceed, I've tried expanding in Taylor series but I've got confused with calculations and I can't proceed any further.

Let $f: \Bbb C \to \Bbb C$ be an entire (analytic on the whole plane) function such that exists $\omega_1,\omega_2 \in \mathbb{S}^1$, linearly independent over $\Bbb R$ such that: $$f(z+\omega_1)=f(z)=f(z+\omega_2), \quad \forall\,z\in \Bbb C.$$Prove that $f$ is constant.   The intuition seems clear to me, we have the three vertices of a triangle given by $0$, $\omega_1$ and $\omega_2$. All points in the plane are one of the vertices of that triangle under a suitable parallel translation. The constant value will be $f(0)$, fine. Throwing values for $z$ there, I have found that $$f(n\omega_1) = f(\omega_1) = f(0)=f(\omega_2) = f(n\omega_2), \quad \forall\, n \in \Bbb Z.$$  I don't know how to improve the above for, say, rationals (at least). Some another ideas would be:   Checking that $f' \equiv 0$. I don't have a clue of how to do that. Write $w = a\omega_1+b\omega_2$, with $a,b \in \Bbb R$, do stuff and conclude that $f(w) = f(0)$. This approach doesn't seem good, because I only have a weak result with integers above. Finding that $f$ coincides with $f(0)$ on a set with an accumulation point. This seems also bad: the set on with $f$ coincides with $f(0)$ by which I found above is discrete.    Nothing works and this is getting annoying... And I don't see how analyticity comes in there. I'll be very thankful if someone can give me an idea.  (On a side note.. I know that this title is not informative at all. Feel free to edit if you come up with something better.)


Question. Let $\mathfrak{g}$ be a real semisimple Lie algebra admitting an invariant inner-product. Is every connected Lie group with Lie algebra $\mathfrak{g}$ compact?   I know that the converse is true: If $G$ is a compact connected Lie group, then the Haar measure may be used to give an invariant inner-product on $\mathrm{Lie}(G)$. Also, semisimplicity is necessary since $\mathrm{Lie}(\mathbb{R})=\mathbb{R}$ trivially admits an invariant inner-product.

I am trying to answer the following question:     Which Lie groups have a Lie algebra admitting an $\text{Ad}$-invariant inner product?   First of all, all compact Lie groups satisfy this condition because one can average an arbitrary inner product on the algebra over the group.  This means that all Lie groups that have the same Lie algebra as some compact group also satisfy the condition. Indeed, the group is then locally isomorphic to a compact group, and taking "the same" inner product on the Lie algebra, we see that this inner product is invariant under all $\text{Ad}_g$ for $g$ in some neighbourhood of the identity, but this neighbourhood generates the whole group, from which the claim follows. Another approach would be to show that an inner product is $\text{Ad}$-invariant precisely if it is $\text{ad}$-invariant (like , although there may be an issue with connectedness of the group) and conclude that the Lie algebra completely characterizes whether or not an invariant inner product exists.  I suspect these are all the Lie groups that answer the question, because  (the second property, at "this property characterizes compact Lie algebras"). However, the reference given is just "SpringerLink", which is of no use.     Could somebody confirm that the answer to the above question is "all Lie groups with a compact Lie algebra"?   I have consulted multiple sources, but none of them completely establish the result I'm looking for. For example, Lie groups beyond an introduction by Knapp establishes what I already know (that it works for groups with a compact Lie algebra), and establishes the converse only in case the inner product is actually the Killing form.


I have imported what appears to be a clean SVG into Blender (works fine for 2D) but when I try to extrude it, I am seeing spikes appear. Can anyone tell me what is the issue and how I can fix it?  Many Thanks]

I exported an svg 1.1 file from Adobe Illustrator CS6. I joined all the shapes by pressing Ctrl+J. I set the curve shape to 2D. Then I extruded using the right hand side panel:    So far so good. But when I try to apply even a slight bevel, all hell breaks loose:    It does get less insane if I bring the bevel down by multiple factors of 10... But then I really don't have much of a bevel.  Am I doing something wrong? Am I using the wrong kind of object? Should I be doing this with meshes? Do my curves just need cleaning up?


I want to compare the first element of list with all the consecutive elements and increment the first character and then compare again.  if elements have the same character then i remove the second occurance of the element  al =["a1","a","1a","ab"]  a1 and 1a have the same characters and i want to remove 1a   a1 = ["a1","a","ab"]    This is the code i've written to iter through the elements   while(iter.hasNext()){         current = iter.next();       while(iter.hasNext())       {         String next = iter.next();         if(check(current,next))           a.remove(next);         }       }    On implementing this i get this error   Exception in thread "main"           java.util.ConcurrentModificationException         at java.util.ArrayList$Itr.checkForComodification(Unknown Source)         at java.util.ArrayList$Itr.next(Unknown Source)         at anasub.ana(anasub.java:51)         at anasub.main(anasub.java:81)   I tried using a for loop but when i remove the element inside the loop I get ArrayIndexOutOfBound exception.  Please review this code or provide an alternate solution.

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I am writing some thesis in Latex and I use some template, which I placed at the bottom. I have got problem with references. I would like to put the links to references in order of appearance, not in alphabetical order. The first link to reference should have [1] the second [2]. Now I have got situation that reference is ordered in alphabetical order, e.g. the first link to reference is not [1], but e.g. [4], because of fact that this follows from the alphabetical order.  Below a simple visualization:  Now: text text[3] text text[1] text text[2] reference: [1]Adam Simson [2]David Johnson [3]Jessy Hoffman   I would like to have:  text text[1] text text[2] text text[3] reference: [1]Jessy Hoffman [2]Adam Simson [3]David Johnson   This is the template, which I am using:    In folder Classes there is a file "PhDThesisPSnPDF.cls" and there is something like is printed below. I tried to modify it, change style to "plain", but it didn't help. How can I solve it? Very thanks for help.  % ******************************* Bibliography ********************************* \ifPHD@authoryear \ifPHD@biblatex \RequirePackage[backend=biber, style=authoryear, citestyle=alphabetic, sorting=nty, natbib=true]{biblatex} \setBiBLaTeXtrue \else \RequirePackage[round, sort, numbers, authoryear]{natbib} %author year \fi \setBibtrue \else      \ifPHD@numbered      \ifPHD@biblatex      \RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}      \setBiBLaTeXtrue      \else      \RequirePackage[numbers,sort&compress]{natbib} % numbered citation      \fi      \setBibtrue      \else          \ifPHD@custombib          \setBibfalse          \ifPHD@biblatex              \setBiBLaTeXtrue          \fi          \else              \ifPHD@biblatex                  \RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=none, natbib=true]{biblatex}                  \setBiBLaTeXtrue              \else                  \RequirePackage[numbers,sort&compress]{natbib} % Default - numbered              \fi          \setBibtrue      \ClassWarning{PhDThesisPSnPDF}{No bibliography style was specified. Default numbered style is used. If you would like to use a different style, use `authoryear' or `numbered' in the options in documentclass or use `custombib` and define the natbib package or biblatex package with required style in the Preamble.tex file}          \fi      \fi \fi

I'm facing a problem with biblatex citation order.  Using this configuration:  \documentclass {article} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \hyphenation{es-ta-bi-li-da-de} \usepackage{setspace} \singlespacing \usepackage[natbib=true,style=numeric]{biblatex} \addbibresource{frameworks.bib}   Being frameworks.bib this:  @Article{JONHSON88, author = {Ralph Johnson, Brian Foote}, title = {Designin Reusable Classes}, journal = {Journal of Object-Oriented Programming SIGS}, year = {1988}, key = {Johnson:88}, volume = {1}, number = {5}, pages = {22-35}, month = jun }  @book{UML-F:00, author = {Fontoura M., Pree W., Rumpe B.}, editor = {Addison-Wesley}, title = {The UML Profile for Framework Architectures}, year = {2000}, }   The PDF is generated with a text like:  Something about something[4], and moo foo other children[1].   This citation [4] is the first in all text. How can I order this correctly to [1]...[2] ...?


In zsh with oh-my-zsh, I like how I can, within this directory for instance:  mydir/   app.component.html   app.component.ts   app.module.ts   app-routing.module.ts    type ./html<tab> and have it automatically expanded as ./app.component.html, even though the filename doesn't actually start with html, but it is a part that is characteristic.  Also, I can ./rout<tab> to get ./app-routing.module.ts with a middle clue.  If I use something ambiguous, like ./ts<tab>, the experience is a bit weirder, since   1. it first expands to the longest common part ./|.ts (where | represents my cursor's position). 2. on a second press to <tab> (why not the first?), I get a list of options displayed below:   $ ./|.ts app.component.ts       app.module.ts    3. on a third press to <tab> (why a third?), the first item of the list get selected. 4. then, after one last <tab>, I finally get my expansion to ./app.module.ts.   I understand that zsh needs more input since my initial clue was ambiguous, but I'm sure that 2 <tabs> would have been saved in the above process if the first <tab> directly resulted in 3. instead of 1. Is there anything I can configure about this?  Finally, if I use a non-terminal ambiguous clue, things start feeling clumsy. For instance ./mod<tab> results in   1. ./|d.module.ts (not sure where this d comes from). 2. a second <tab> just shifts the cursor to the end: ./d.module.ts|. +∞. pressing <tab> does not change anything from this point on, or propose a list of options like it did before. So I end up scrolling back and fixing the filename myself.   I would have expected a list of options to be offered in only one <tab>, like in the previous case.  Is this expected behaviour? Have I not understood quite well the way autocompletion is supposed to work? Is this something I can configure, and how?

Currently ZSH displays a menu when I first hit tab and the completion is ambiguous. So, if I have 'cd ' in the command prompt and I hit tab, it will show the different available completions. If I hit tab again, it will select the first available completion.   I would like to merge these two steps into a single press of the tab key. So, if I'm at 'cd ' and I tab, I would like ZSH to insert the first available match (when ambiguous) and display the menu, which I can then tab through if the first match wasn't the directory I had in mind.  The ZSH setup tool put this in my .zshrc, in case any of this is affecting the behavior of my shell:   zstyle ':completion:*' completer _expand _complete _ignored zstyle ':completion:*' list-colors '' zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' zstyle ':completion:*' menu select=5 zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle :compinstall filename '/home/robb/.zshrc'


I have an error with my app. I want to put viewPager in fragment. But there are some problem when do the setCurrentItem on viewPager.  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setCurrentItem(int)' on a null object reference   this is error message  public void clickBottomToolbar(View view) {     viewPager viewPager=new viewPager();     int position=0;     switch (view.getId()) {         case R.id.map:             position=0;             break;         case R.id.customerList:             position=1;             break;         case R.id.captureNameCard:             position=2;             break;         case R.id.captureDocument:             position=3;             break;         case R.id.documentList:             position=4;             break;     }     viewPager.setPosition(position);     FragmentTransaction fragmentTransaction=fm.beginTransaction();     fragmentTransaction.replace(R.id.fragment,viewPager);     fragmentTransaction.addToBackStack(null);     fragmentTransaction.commit(); }   Upper is code in main_activitiy.java and Lower is viewPager.java  public class viewPager extends Fragment {     ViewPager viewPager;      @Nullable     @Override     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {         View view=inflater.inflate(R.layout.viewpager,container,false);         viewPager=(ViewPager)view.findViewById(R.id.viewPager);         viewPager.setAdapter(new viewPagerAdapter(view.getContext()));         return view;     }     public void setPosition(int position){         viewPager.setCurrentItem(position);         return;     } }   This is viewpager.xml  <RelativeLayout     android:layout_height="match_parent"     android:layout_width="match_parent"     xmlns:android="http://schemas.android.com/apk/res/android">     <android.support.v4.view.ViewPager         android:id="@+id/viewPager"         android:layout_width="match_parent"         android:layout_height="match_parent"         xmlns:android="http://schemas.android.com/apk/res/android">     </android.support.v4.view.ViewPager> </RelativeLayout>

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?


My attempt:   $P_m$ and $P_n$ satisfy the Legendre equation, so   (1)  \begin{equation} \label{1} (1-x^2)P_m''-2xP_m'+m(m+1)P_m=0 \end{equation}   (2)   \begin{equation} (1-x^2)P_n''-2xP_n'+n(n+1)P_n=0 \end{equation}  Multiplying (1) by $P_n'$ and (2) by $P_m'$ and adding and simplifying gives me:  $\frac{d}{dx} [(1-x^2) P_n' P_m']=2xP_n'P_m'+m(m+1)P_mP_n'+n(n+1)P_nP_m'$  I see that integrating from $-1$ to $1$ twice will give me desired LHS, but I can't prove RHS is $0$. Please help!

Let $P_n, P_m$ be Legendre polynomials with $n \neq m$ then: $$\int_{-1}^1 P'_m(x) P'_n (x) (1-x^2) dx=0$$  I already know that $\int_{-1}^1 P_m (x) P_n (x) dx=0$, using that $P_n$ and $P_m$ are solutions of Legendre equation then:  $$ [(1-x^2)P'_n]' +n (n+1)P_n=0 $$ $$ [(1-x^2)P'_m]' +m (m+1)P_m=0 $$  Then if we integrate $(Equation 1)P_m - (Equation 2)P_n$ we obtain:   $$\int_{-1}^{1} P_m[(1-x^2)P'_n]' - P_n [(1-x^2)P'_m]' dx + [n (n+1) - m (m+1)]\int_{-1}^1 P_n P_m dx =0 $$  If we use integration by parts we obtain that the first integral is $0$, then $\int_{-1}^1 P_m(x) P_n (x) dx=0$  I want to use a similar method to prove that $\int_{-1}^1 P'_m(x) P'_n (x) (1-x^2) dx=0$ but I don't know where to start.


I try to do the configuration again but i coudl not do it     Now I see my Services Stopped bu I can't start again because in Action is not possible  I'm trying to open a page but I'm getting the next error:     An unexpected error has occurred.   Troubleshoot issues with Microsoft   SharePoint Foundation.   Correlation ID:   8005fa8b-6fc9-4a11-9ecb-9e8fba160035  Date and Time: 11/6/2013   12:07:01 PM   I couldn't open any page and I really don't know why. I can only open SharePoint 2010 Central Administration, that is all. I confirmed the event viewer and I only find the next message but I don't know if this is the root cause of the trouble.     "There are no instances of the User Profile Service started on any   server in this farm. Ensure that at least one instance is started on   an application server in the farm using the Services on Server page in   Central Administration."   Edit:  Central Administration : Services on Server: SERVER   The Microsoft SharePoint Foundation Database Status = Started   [EXTRA COMMENT] I don’t know the root cause of the trouble I only did a copy of the server (Virtual Server) but I don´t know if this action generated the problem and the lost setting

We recently added a new SharePoint server to the farm and to my surprise the server is not showing any actions in The Page Manage Services on Server .Please see the attached screenshot for further details    After Stopping SharePoint Foundation Web Application Service


I am in Nepal and my father is in America. When we talk with him it is our morning and his evening. Now how can I greet him and how can he greet me saying, where one would typically say 'good morning' or 'good evening'?

When I'm talking to a person in opposite time zone and the person greets with "Good morning" or Good evening/afternoon as per his time, is it ok to reply "Good afternoon" (as per my time-zone) when he said "Good Morning", and similarly replying as per my time zone, at other times?


My understanding of electrical resistance is, it arises due to the collision of the electrons with atoms in the path or in other words phonons. From the time of my undergrad years, I have been searching for a reason so as to explain why is there an electrical impedance of vacuum. I don't understand what provides this electrical impedance! There is no matter in vacuum to cause any collision. Also, the impedance is constant and does not have any dimensional part in it. That is confusing too. Is the explanation connected to the finite energy of vacuum or something else related to quantum field theory?

I cant understand that. If there isn't a material that makes it hard to pass, why there is a  in vacuum?


The elements in $$S_{n}$$ have the following orders: 1,2,3,...,n I'm thinking about a specific case of $$S_{7}$$ Now, to find how many elements of order 6, for example, I look at the following permutations: $$\alpha = (a b c d e f),$$ $$\beta = (a b)(c d e),$$ $$\gamma = (a b)(c d e)(f)$$  For $\alpha$, there are 5! elements, for $\beta$, there are $\frac{5*6}{2}*\frac{3*4*2}{3} = 120 $ etc. My question is, do I have to count $\gamma$ ? Because if I proceed in the same way, I get more elements than 7!

I need to find how many elements of order $k$ are in $S_n$ (where $k \leq n$).   So if $k$ is prime, it's easy: $k$ can't be the $\mathrm{lcm}$ of any integers besides itself and one's (which we're omitting). So the length of the cycle then must be $k$, and the number of elements with $k$-length cycle representation in $S_n$ is given by $$\dbinom{n}{k}(k-1)!$$ But it gets really tricky when $k$ is not a prime number... I need to consider every set of integers that can divide $k$, and then, for every set, I need to find how many elements of that form are there... Or maybe I'm missing something here?  I need help figuring that out. thanks in advanced!


What are the distinct differences, if any, between Coherent Light, Light that is In Phase, and Polarized Light?  Also: I have found conflicting definitions of coherent light, where one definition is "constant phase difference" but another stating the waves must be all in-phase. I've attached two photos. The first photo shows that two waves are in phase as long as phase difference is constant. The second photo indicates that the waves must be in-phase in order for them to be coherent. Which is correct?

I know, by definition, that  means that a pair of waves have constant phase difference. What does this mean?   Does it mean they always have a 360 degrees, or 0 degrees phase difference? Or could they have 40 degrees or any constant phase difference?  In order to have constant phase difference must they have the same wavelength and frequency?


I have the following document:  \documentclass[a4paper,10pt]{article}  % -------- Packages \usepackage{marvosym} \usepackage{enumitem} % \usepackage{fontspec}              \usepackage{xunicode,xltxtra,url,parskip}  \RequirePackage{color,graphicx} \usepackage[usenames,dvipsnames]{xcolor} \usepackage[big]{layaureo}               % \usepackage{fullpage} ** \usepackage{supertabular}                \usepackage{titlesec}                    \usepackage{tabularx}  \usepackage{hyperref} \usepackage{helvet} \definecolor{linkcolour}{rgb}{0,0.2,0.6} \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}  \titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] \titlespacing{\section}{0pt}{1pt}{1pt} % -------------- margins     \addtolength{\oddsidemargin}{-.75in}     \addtolength{\evensidemargin}{-.75in}     \addtolength{\textwidth}{1.25in}      \addtolength{\topmargin}{-.575in}     \addtolength{\textheight}{1.75in}  %-----------WATERMARK TEST  \usepackage[absolute]{textpos}  \setlength{\TPHorizModule}{30mm} \setlength{\TPVertModule}{\TPHorizModule} \textblockorigin{2mm}{0.65\paperheight} \setlength{\parindent}{0pt} %-------------------------------------------------------- %--------------------BEGIN DOCUMENT---------------------- \begin{document}  \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}  \pagestyle{empty} % non-numbered pages  \font\fb=''[cmr10]'' %for use with \LaTeX command  %--------------------TITLE------------- \par{\centering         {\LARGE Eduardo Flores Lomas     }\par}  % ------------ Work Experience  \section{Work Experience}  \begin{tabular}{L{14cm}R{2.7cm}}  \noindent\textbf{  Farmacias del Ahorro  }  - \scriptsize{Largest retail pharmacy chain in Mexico (1,300+ stores)} & \scriptsize{Jan 15' - Current} \\  Data Science Coordinator  - \scriptsize{Technology and Projects Department}   \\  % \footnotesize{   \multicolumn{2}{p{16.7cm}}{  Responsible for finding and implementing data science methods to solve a wide range of business problems.  }   But I want to avoid that ugly indentation at "Farmacias del Ahorro" when I bold it...    When I remove the \textbf at the beginning of "Farmacias del Ahorro" it aligns perfectly:     As can be seen, I've tried \noindent ... what am I missing?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


when I create a sapling or geometry, I noticed on the tutorials I watch a settings dialog appears where you can change vertex, branches of a tree, etc, how do I get that box? -thanks. -Steve.

The tutorial I read is based on 2.79. So I'm not sure if it's still the same name in 2.8. But I can't find anything providing similar functionalities.


Do touch spells like shocking grasp or ranged spells like freezing ray get extra damage from rolling a natural 20 on their attack roll?

According to PHB p. 194 you always score a critical hit on any attack roll.  Does this rule also apply to magical attacks, e.g. the  spell?


Most of you if not everybody will agree that the stronger the gravitational pull, the faster an object will fall. For example, on a planet with 50 times the gravity of Earth, any object will hit the ground on that planet much quicker than it would on Earth. So taking all of these into the equation, does it mean that at a blackhole, an object will fall at an infinite speed because of the infinitely strong gravitational pull of the blackhole?

In Newtonian mechanics, if we throw an object in against direction of gravity with speed $v$ and it achieve max height of $h$. Now if we allow object to fall from that height $h$, it will eventually attain speed $v$ when it reach position where we launch it.   Now applying same idea to a black hole in general relativity. Speed require to escape black hole gravity is greater than $c$, so if we throw something into black hole with almost the speed of light, the object speed will exceed speed of light $c$ before hitting black hole surface! How relativity explain this? Can space-time curvature reduce speed of this freely falling object from attaining speed of light?


First of all, I'm sorry for duplicating but I don't want any issues.  Hi, I want to install Windows 10 without any dual boot on my laptop (HP 250 G5), beacuse I want to update my BIOS, and the only way to update it is to run an exe.   How can I backup everything, from softwares installed, packages, repositories to settings, wallpapers, etc; and restore it, after reinstalling Ubuntu 16.04.   I have an 1TB external HDD if that helps.

If I want to make a backup of everything I have done since the fresh install of Ubuntu, what are the possible options? What all should I backup? I want to get all the settings that I changed, all the packages I installed, etc.


Show that $$\sup_{x\in [a,b]} f(x) = \lim_{n\rightarrow\infty} \left(\int_a^b (f(x))^n \;dx\right)^{\frac{1}{n}}$$ for f continuous and positive on [a,b].  I can show that LHS is greater than or equal to RHS but I can't show the other direction.

Let $f(x)$ be a continuous real-valued function on $[a,b]$ and $M=\max\{|f(x)| \; :\; x \in [a,b]\}$. Is it true that: $$ M= \lim_{n\to\infty}\left(\int_a^b|f(x)|^n\,\mathrm dx\right)^{1/n} ? $$  Thanks!


I have ubuntu installed, I originally only had an SSD to install the OS on, now I want to add 1 and later 2-3 more regular HDDs. I am not sure if I did the first try right, I connected it and formatted it EXt4 and it shows that it is "mounted" and is a "device" the area I think I want it to be in is called places. how can I move it. my goal is to use this 2TB HDD and 1 or 2 others for media and keep the SSD for the OS and essential programs. When I go to the folder my media is in, it doesn't show but if I move it to videos under the place home it does show. What if anything can I do?

I have a wonderful running Maverick Meerkat install going on right now. I want to move my /home to another partition as per many suggestions.   How can I go about doing this without reinstalling the entire Ubuntu system? Can I simply create the partition with gparted and then change the mount point of /home in fstab to reflect it or is it a bit more difficult?


, I was unable to post my simple and brief and relevant question to the meta page.  This response stood between me and posting it:  "The question body does not meet our quality standards. Please make sure that it completely describes your problem - including what you have already tried - and is written using proper grammar."  This is totally bogus.  Why does this exist in Stack Exchange and what can be done about it?

While trying to ask a question, I got the error message     This question body does not meet our quality standards. Please make sure that it completely describes your problem - including what you have already tried - and is written using proper grammar.    Why am I getting this message? What can I do to get the system to accept my question? Can you be more specific? What are good resources on how to ask high-quality questions?      For more information, see  in the .


I am trying to unit test method that is responsible for retreiving data from text file.  Here is how the class with that method looks like:  package contentfile;  import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.stream.Stream;  public class ContentFileRetrieverService implements ContentFileRetriever {      @Override     public String[] getContentFile(String pathName) {          Stream<String> contentFileStream;         try {             contentFileStream = Files.lines(Paths.get(pathName));         } catch (IOException e) {             throw new IllegalArgumentException(e);         }          return contentFileStream.toArray(String[]::new);     } }   Here is how the test looks like:  package contentfile;  import org.junit.Rule; import org.junit.jupiter.api.Test;  import static org.junit.Assert.*;  class ContentFileRetrieverServiceTest {      private ContentFileRetrieverService contentFileRetrieverService;  //    @Rule //    TemporaryFiles temporaryFiles = new TemporaryFiles();      @Test     void getContentFile() {         String pathFile = "tekst.txt";         String[] testedContent = contentFileRetrieverService.getContentFile(pathFile);         String[] expected = {"la", "la"};         assertArrayEquals(expected, testedContent);     } }   Unfortunately, I got NullPointer while calling getContentFile method. Here is stacktrace:  java.lang.NullPointerException     at contentfile.ContentFileRetrieverServiceTest.getContentFile(ContentFileRetrieverServiceTest.java:18)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   Content file  Line1 a Line2 b c Line 3

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?


If the set $B={\{e_1,...e_n\}}$ is a basis of a finite dimensional vector space $V$ then the set $D=\{\epsilon_1,...,\epsilon_n\}$ where $\epsilon^i(e_j)=\delta_j^i$ is a basis for the dual space $V^*$    If $B'={\{e'_1,...e'_n\}}$ is a different basis for $V$ and then we get a different basis for the dual space $D'=\{\epsilon'_1,...,\epsilon'_n\}$  I am trying to work out how to relate the change of basis matrix from $B$ to $B'$ to the change of basis matrix from $D$ to $D'$  That is, there is to be a matrix $M$ such that $e'_i=M_{ij} e_j$ and a matrix $N$ such that $\epsilon'_i= N_{ij} \epsilon_j$ but I feel like there should be a close relationship between the two things because $\epsilon_i$ depends on $e_i$.  Can anyone help me with this?  (Also, this is my first question so I apologise if I have made errors here and there!)

If $B_1 = \{v_1,\ldots,v_n\}$ and $B_2 = \{v_1',\ldots,v_n'\}$ are basis for a vector space V, and $D_1= \{\delta v_1,\ldots, \delta v_n\}$ and $D_2 = \{\delta v_1',\ldots, \delta v_n'\}$ are the corresponding dual bases of $V^*$ prove that, if $P$ is the change-of-basis matrix from $B_1$ to $B_2$, then $(P^{-1})^T$ is the change-of-basis from $D_1$ to $D_2$  (this is a theorem from Schaum's outline of theory and problems of linear algebra)  My knowledge of linear algebra is not great, but so far I have that   \begin{align} \text{For any }v \in V, [v]_{B_1}&=P[v]_{B_2}\\ \text{so } (\alpha_1,\ldots,\alpha_n)(v_1,\ldots,v_n)^T&=P(\beta_1,\ldots,\beta_n)(v_1',\ldots,v_n')^T \end{align} for some $\alpha_1,\ldots,\alpha_n,\beta_1,\ldots,\beta_n \in F$ (where $F$ is a field)  How do I use the fact that $D_1$, $D_2$ are dual basis to further this proof? And also, where does the transpose of $P^{-1}$ come in? Can I use that $D_1 = \delta B_1$ and $D_2 = \delta B_2$ (where I am guessing $\delta$ is the kronecker delta?)  Any hints or suggestions are greatly appreciated, I know that my knowledge is quite limited with regard to this, links to text or sources that could explain a problem like this would be great.


Why won’t this code throw an exception? Have tried a lot of things but when I test it with a JUnit class like this, for example, it won’t throw an exception:   Vehicle e = new Vehicle('C', 'G', "A1234");     // Constructor public Vehicle(char kType, char dType, String regNr) {     String temp0 = regNr.substring(0, 2);     String temp = regNr.substring(2);     boolean finish = false;      if ("" + kType == "C") {         for (char c : temp0.toCharArray()) {             if (Character.isDigit(c)) {                 throw new IllegalArgumentException("3");             }         }          if (temp.length() == 5) {             finish = true;         } else {             finish = false;             throw new IllegalArgumentException("4");         }          try {             Integer.parseInt(temp);         } catch (NumberFormatException nfe) {             finish = false;             throw new IllegalArgumentException("5");         }     } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I flagged a question recently, and as i realised that i flagged in under the wrong type, my flag was rightfully declined.  Is it possible to change a flagtype once its been flagged, or even cancel it?

I recently made an "oops" when I flagged a valid comment as off-topic, when I had meant to flag the question as an off-topic question that should be migrated. Unfortunately, unlike upvotes, downvotes, and other such features, there doesn't seem to be a way for the original flagger to remove an accidental flag.  Is there any mechanism to do this? Since human error is always a factor in any system, it seems like there should be a way for a flagger to undo such a mistake, especially in cases where the error is immediately recognized.


We have an application that consists of a light weight Launcher while most of the functionality is in a dll. The Launcher regularly check for updates and download a new dll if there is one. The new dll is started using code like this (MsqApplication is a dynamic):  MsqAssembly = Assembly.LoadFile("path/msq.dll")); MsqApplication =  Activator.CreateInstance(MsqAssembly.GetType("Msq.Program")); MsqApplication.Start();   It works fine except the that we don´t know how to kill the old dll when a new one is started. Is there any good way to do that?

I would like to know how to unload an assembly that is loaded into the main AppDomain.  I have the following code:  var assembly = Assembly.LoadFrom( FilePathHere );   I need/want to be able to unload this assembly when I am done.  Thanks for your help.


i have this code:  >mat_equazioni[]                                      intercetta_iperpiani [1,] -0.1172197 0.3516591 -0.1562929           -0.7033182 [2,] -0.1172197 0.3516591 -0.1562929            0.5860985 > sum(berek1[8,vettvar]*mat_equazioni[1,][-4]) [1] 0.7033182 >sum(berek1[8,vettvar]*mat_equazioni[1,][-4])+mat_equazioni[1,4] intercetta_iperpiani          1.110223e-16  > sum(berek1[43,vettvar]*mat_equazioni[1,][-4]) [1] 0.7033182 > sum(berek1[43,vettvar]*mat_equazioni[1,][-4])+mat_equazioni[1,4] intercetta_iperpiani                     0    i don't understand why same result 0.7033812 sum to mat_equazioni[1,4] that is equal to -0.7033812 one time give me 0 and other time give me 1.110223e-16

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Let $\{e_n\}$ be an orthonormal basis for $l^2$ and $\{\alpha_n\} \in \ell^{\infty}$. Define $Ae_n=\alpha_n e_n$ on $l^2$. Find the condition for $A$ to be compact. My work: I want to show that in order for $A$ to be compact, we must have $\alpha_n \rightarrow 0$. Suppose the contrary. Then there exists some $\epsilon >0 $ such that we can find some sequence $(\alpha_{n_k})_k$ such that $(\alpha_{n_k})_k> \epsilon$. I want to show that in this case, we can't find a convergent subsequence for $(Ae_{n_k})=(\alpha_{n_k}e_n)_k$. And I got stuck here. Not sure how to show that there doesn't exist a convergent subsequence. I feel like I'm missing some facts in real analysis. Any help is appreciated! Thank you.

Let $p\in[1,\infty]$, $a\in\ell^\infty$ and $$T:\ell^p\to\ell^p\;,\;\;\;x\mapsto ax.$$ Note that $\left\|T\right\|=\left\|a\right\|_{\ell^\infty}$. It's easy to see that if $a\in\ell^1$, then $T$ is nuclear and hence compact.  Can we more generally conclude that $T$ is compact?  Assume $p<\infty$. The intuitive approach would be to define $$T_n:\ell^p\to\ell^p\;,\;\;\;x\mapsto(a_1x_1,\ldots,a_nx_n,0,\ldots)$$ for $n\in\mathbb N$ and to show that $\left\|T_n-T\right\|\to0$. Now, $$\left\|(T_n-T)x\right\|^p=\sum_{i=n+1}^\infty|a_ix_i|^p\tag1$$ for all $x\in\ell^p$ and $n\in\mathbb N$. The right-hand side of $(1)$ clearly converges to $0$ as $n\to\infty$, but this only yields convergence in the strong operator topology. On the other hand, if $(a_n)_{n\in\mathbb N}$ would be nonincreasing and $a_n\to0$ (e.g. $a_n=\frac1n$), then $$\left\|(T_n-T)x\right\|^p\le|a_{n+1}|^p\left\|x\right\|_{\ell^p}^p\tag2$$ for all $x\in\ell^p$ and $n\in\mathbb N$ and we could immediately conclude $\left\|T_n-T\right\|\to0$. EDIT: Maybe the general result can be obtained from the convergence in strong operator topology (which holds by $(1)$) by noting that $\ell^p$ has the approximation property; but I'm not sure whether this is true.


I am trying to submit the login on pressing the Enter key, earlier everything was under a form tag so it would work on pressing the Enter key. But now it won't, could someone please give me a fix for this.  HTML:

Please Sign In

                                                   <input type="text" name="user" id="user" placeholder="Username" class="form-control" required/>

                                                   <input type="password" name="pass" id="pass" placeholder="Password" class="form-control" required/>

         <input type="submit" value="Sign In" id="submit-login" onclick="save()" />

I have one text input and one button (see below). How can I use JavaScript to trigger the button's click event when the Enter key is pressed inside the text box?  There is already a different submit button on my current page, so I can't simply make the button a submit button. And, I only want the Enter key to click this specific button if it is pressed from within this one text box, nothing else.  <input type="text" id="txtSearch" /> <input type="button" id="btnSearch" value="Search" onclick="doSomething();" />


I'd like to cut a mesh by giving two points (in order to form a line). For example, I would be able to easily cut the mesh in the picture below (which is an arch) instead of roughly bringing each vertex to the hypothetical diagonal line.    Am I missing the tool or are there similar ways to achieve the same result?

I wanna cut a mesh by specifying the angle, but knife mode only cut 45° with C key.  I want to cut by the angle around specifying the vertex.


Am I allowed to cross the Canada-US border by sea or land if I am not a citizen of either country?  I have a valid Australian passport and have entered both countries by air. I have a USA-ESTA and Canadian eTA but no visa.  From Citizen and Immigration Canada:     Your application for an Electronic Travel Authorization (eTA) has been approved. You are now authorized to travel to Canada by air.   This seems to imply there is another way to authorize travel by land or water.  The website for the Clipper ferry says that to pass US customs (from Victoria to Seattle), one requires a "US passport" or other enhanced ID which seems to be only available to Canadian citizens.  Edit: At the risk of broadening the question, I am planning to ferry to the US and back, then drive to the US again. I am not committed to the Clipper ferry specifically, though I expect I will take it. The core of the question is to confirm which land and sea options are available to me. Word of mouth suggests that it's okay for me, but I'm not sure.  I'm planning a trip where I ferry (or train) from Canada to the US and back, then drive to the US.

I am thinking of visiting Victoria, BC in Canada and then going to Seattle, WA in the US, with the .  I am a national of a country under the Visa Waiver Program. I think that if I enter by air, I need to fill an ESTA form. If I enter by car, I don't need one, I can fill a form when crossing the border.  With the ferry, what is the procedure? Should I necessarily have an ESTA?


I am preparing to make a significant investment into a new desktop computer. It will be used for work and play. I would like to see if any embers of the community have used any of the components and if anyone can let me know if these will work ok with Ubuntu.  The system is to support 3 screens as one giant desktop rather than 3 separate desktops. Windows should be able to be moved from screen to screen.  If anyone can suggest superior alternatives(and why they would be superior) that would also be apprecaited  Here then are the components I am buying   Intel Core I5-760 (2.80GHZ)/8MB L3 Cache LGA1156 Processor CI-EVGA P55 LE Motherboard 2 Seagate 1Terabyte SATA Hard Drives Liteon IHAS-224 24x SATA Lightscribe DVDRW CI-EVGA GTX465 1GB DDR5 256Bit Dual DVI HDMI Videocard Creative SB X-FI Xtreme Audio (sound card)   will a sound card enhance music/movie audio or is it a waste?  3 LG 20" (possibly larger) LED (1600/900) %MS/DVI Widescreen   Are LED better than LCD? How large a screen is 'to large' when it comes to work (I am a web programmer)  DLINK DWA-525 150MBPS PCI Wireless Network Adapter Need good advice on a quality webcam that will work without difficulty on Ubuntu Need good advice on a brand of PC speakers that gives exceptional sound quliaty   I should say, I am not overly familiar with the innards of a PC so I have no idea if I have been oversold. I am also limited on the parts I can get (for example the sound card is the only sound card that shop had in stock) though I can order parts if I know what to order.  I need to be able to   Have a multiscreen (3 screen) setup with the ability to move windows between all 3 screens Run compiz fusion Listen to music Watch Movies/DVD Write code

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I am not familiar with the posting mechanism of SO. My questions are answered quickly most of the time.  Recently, I've ran into some questions that are not very well known to people, or are too much trouble to follow. Anyway, I haven't been answered for days on that one.  So I posted another question. Since I've kept working on the problem, it moved on a little, so the new question is a bit different, though it is highly related to the last one.  Then someone came up and asked me not to post duplicate questions. I fully understand his/her point, and I didn't mean to do it. Actually, I found SO is very helpful and I like it a lot. I would like to contribute to it.  My question is, given the massive amount of questions posted on SO everyday, and since we should not post duplicate questions, how to draw attention from potential respondents and not let the question sink?

I asked a question almost as soon as I got my account. I got a few decent answers, but none of them helped solve my problem. The question has long since become buried by newer questions, and there's still no accepted answer. Unfortunately, because there are quite a few answers with votes, to a casual observer it probably looks like the question was answered and I just neglected to mark an answer as accepted, and the system does not consider it "unanswered".  Or, I asked a question that was a bit more difficult to answer. After waiting for some time, I received no answers, little or no comments, and only a few views. The question does show up in the "unanswered" list, but no one has answered my question.  In either case, what's the protocol for me to try to get this question answered?  I see several options:   Post the question a second time, possibly linking to the original, to get attention for the original question. This is encouraged on sites like Reddit.  However, it's probably not appropriate here, since we're encouraged to check for duplicates and not submit a question that's already been asked by someone else, so this probably falls under that heading. Wait for some kind of wiki-like talk page to be implemented, then post a plea on the talk page for input and hope that activity on the talk page bumps up the question. Edit the question, but do nothing further on the Stack Exchange site. If I edit my post to say that I haven't accepted any of the current answers but am looking for more, then the question might get answered eventually by people browsing through old questions to find something they can answer. Post the question on other sites, but link to my original question on Stack Exchange. People will either answer here, or they'll answer on the other site and I can post the accepted answer here myself.  This might be considered spamming, so it might be better to do this without the link.      For more information, see the "" page in the .


I can't seem to port this line to QGIS 3.0 API     QObject.connect(self.dlg.ui.chkActivate,SIGNAL("stateChanged(int)"),self.toggle_activate)   Any ideas? I believe QObject is deprecated.

A while ago I made a plugin for QGIS for myself.  This worked until version 2.18. Now I have version 3.0 and would like to use this plugin here too. But I get some error messages. I have been able to solve most of them fairly easily. Only I can not do this. Perhaps there is someone among you who can help me in this.   This is the code that I used before.   def initGui(self):     """Create menu entries and toolbar icons inside the QGIS GUI."""      icon_path = ":/plugins/BFVWtools/"      """Create the menu entrie Configuratie and toolbar icon inside the QGIS GUI."""     self.add_action(icon_path + "/icon.png", text=self.tr(u'Configuratie'),      callback=self.run, parent=self.iface.mainWindow())     self.action = QAction( QIcon( os.path.dirname(os.path.realpath(__file__)) + "/icon.png" ), "Configuratie",      self.iface.mainWindow() )     QObject.connect(self.action, SIGNAL("triggered()"), self.run)   The error message I get is the following  AttributeError: type object 'QObject' has no attribute 'connect'  Traceback (most recent call last):   File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 345, in startPlugin plugins[packageName].initGui()   File "C:/Users/Automatisering/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\BFVWtools\bfvw_tools.py", line 212, in initGui QObject.connect(self.action, SIGNAL("triggered()"), self.run) AttributeError: type object 'QObject' has no attribute 'connect'   Apparently there is no attribute 'Connect' in QObject    After your explanation, I have converted everything to PyQt5 and changed the connect to slot. The strange thing is that I now get all the entrys from the menu one after the other.


I work at a warehouse where we re-pack plastic sheets. Every single day I get shocked when I touch the aluminum foil and even the plastic sheets. What are some useful tips to prevent this from happening?

sometimes I get "charged" and the next thing I touch something that conducts electricity such as a person, a car, a motal door, etc I get shocked by .  I'm trying to avoid this so if I suspect being "charged" I try to touch something that does not conduct electricity (such as a wooden table) as soon as possible, in the belief that this will "uncharge me".   Is it true that touching wood will uncharge you? How and when do I get charged? I noticed that it happens only in parts of the years, and after I get out of the car...


\documentclass{beamer}  \setbeamercolor{block title}{fg=white,bg=red} \setbeamercolor{block body}{fg=black,bg=gray} \setbeamercolor{background canvas}{bg=yellow}  \addtobeamertemplate{frametitle}{\vspace*{-1.0ex}}{\vspace*{-1.0ex}}  \setbeamersize{text margin left=3mm} \setbeamersize{text margin right=3mm}  \begin{document}  \begin{frame}[t] \frametitle{Frame Title} \color{blue}\vrule width\textwidth height\textwidth \end{frame}  \begin{frame}[t] \frametitle{Frame Title} Text \end{frame}  \begin{frame}[t] \frametitle{Frame Title} \color{blue}\vrule width\textwidth height\textwidth \end{frame}  \begin{frame}[t] \frametitle{Frame Title} \begin{block}{Block Title} Block Text. \end{block} \end{frame}  \end{document}        I want to have a constant vertical spacing between the frame title and   the top line of the "arbitrary" content (text, block, ...). The reason is, that I do not like the   "dancing" when I go to the next slide.

According to section 3.10 of the beamer manual, the t option top-aligns either every frame (when used as a class option) or a single frame (when used as optional argument of a frame environment). According to section 12.7, t can also be used to top-align the columns of a columns environment (a multi-column area within a frame). However, I didn't succeed to combine the two tasks, i.e. to top-align columns within a top-aligned frame. Did I miss something? How can the correct alignment be achieved?  Note: For columns, there's also a T option that (quoting section 12.7) should be tried "[i]f strange things seem to happen in conjunction with the t option". Adding T to the second column comes close to the desired result, but doesn't achieve it (the second column is positioned somewhat higher than the first column).  \documentclass{beamer}  \begin{document}  \begin{frame}[t]{Frame title}   \begin{columns}[t]     \begin{column}{0.5\textwidth}       \begin{itemize}       \item First column, first item       \item First column, second item       \end{itemize}     \end{column}     \begin{column}{0.5\textwidth}% Alternative A doesn't work %     \begin{column}[T]{0.5\textwidth}% Alternative B comes close       \begin{itemize}       \item Second column, first item       \end{itemize}     \end{column}   \end{columns} \end{frame}  \end{document}   EDIT: Thanks to Stefan for posting a workaround solution. I'm still interested in why such a workaround is necessary resp. why top-aligned columns work within centered frames by default. Is this a bug in beamer?


Today when i was seeing the source code of the HashMap class in java i saw that the Entry class in HashMap whcih is used to record the key value pair is static.   static class Entry<K,V> implements Map.Entry<K,V> {  }   As far i know that static member of the classes only have one value for all the instances of the class .How this phenomena is applicable in the case of static nested classes.  I also read some discussions in the StackOverFlow can not come to exact point.Below is the link of some explanations that why the Entry class is static.

I was looking at the Java code for LinkedList and noticed that it made use of a static nested class, Entry.  public class LinkedList<E> ... { ...   private static class Entry<E> { ... }  }   What is the reason for using a static nested class, rather than an normal inner class?  The only reason I could think of, was that Entry doesn't have access to instance variables, so from an OOP point of view it has better encapsulation.   But I thought there might be other reasons, maybe performance. What might it be?  Note. I hope I have got my terms correct, I would have called it a static inner class, but I think this is wrong:


var string = "deceMber iS Here"    I tried this but I get an error saying it is not a function.  string.split(" ").toUpperCase()   I want output this way  "December, Is, Here"  edit: This question is not a duplicate. I did lot of search and the links that provided did not meet my need. It is very specific question.

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


Let $X$ be a non-negative random variable. Show $(EX)(E\frac{1}{X})\geq 1$. What does this say about the correlation between $X$ and $\frac{1}{X}$. Further show that if $f,g$ are positive borel measurable functions  such that $f(x)g(x)\geq1$ then $Ef(X)Eg(X)\geq 1$ I suppose I could start with proving the second part of the question and then prove the first part as a consequence. I know I'm going to ultimately use Holder's inequality for this one, but I'm struggling to clear the $p$ and $q$ when I integrate $$1=\int_\Omega 1 dP\leq \int_\Omega f(X)g(X) dP\leq \left(\int_\Omega f(X)^pdP\right)^{1/p}\left(\int_\Omega g(X)^qdP\right)^{1/q}$$ Is the product of those integrals at the end less than or equal to $$\left(\int_\Omega f(X)dP\right)\left(\int_\Omega g(X)dP\right)?$$ If so, how could I prove this? Thanks in advance for any suggestions.

Let $\mu(\Omega)$ be a probability measure (i.e. $\mu(\Omega) = 1$), and let $f,g$ be non-negative measurable functions on $\Omega$ such that $fg \geq 1$. Show that $1 \leq (\int f^p )(\int g^p)$ for all $0 < p < \infty$   I'm a bit at a loss of what to do. I know that since $fg \geq 1$, we may obtain:  $$\int_{\Omega} d\mu = \mu(\Omega) = 1 \leq \int_{\Omega} fg = \int_{\Omega} |fg|$$ The right-most integral is true since $fg$ is positive and it is equal to $||fg||_1$.  By Hölder's inequality, we obtain:  $$1 \leq \int |fg| \leq ||f||_p ||g||_q = (\int f^p)^\frac{1}{p}(\int g^q)^\frac{1}{q}$$  where $p$ and $q$ satisfy $\frac{1}{p} + \frac{1}{q} = 1$. Raising the left-most and right-most sides of this inequality to the power $p$, I may obtain:  $$1 \leq (\int f^p)(\int g^q)^\frac{p}{q}$$  I now wish to show that $(\int g^q)^\frac{p}{q} \leq \int g^p$, but I've been at a loss of how to do it. Any tips or hints would be greatly appreciated.


I have been tinkering with my LG Optimus L5 E617G and can't seem to find any good instructions on how to install Ubuntu Touch or even get to the bootloader to do so... If anyone has any suggestions please help me out????

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I'm trying to build a function in C that changes the characters 'f' and/or 'o' of a string to 'x'. For some reason I keep getting a segmentation fault (core dumped) when i run the program, even though it compiles without issue. I understand that a segmentation fault occurs when the program tries to access a location in memory that it doesn't have access to, however, I don't see what in my code could be causing this issue. here's my code:  #include <stdio.h>  void censor(char p[]);  int main(){       censor("foodfool");     return 0; }  void censor(char p[]){      int i;     for(i = 0;p[i] != '\0';i++){         if(p[i] == 'f' || p[i] == 'o')             p[i] = 'x';         printf("%c", p[i]);           }      printf("\n"); }

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


If you go through security at the airport with a paper boarding pass, the TSA will look at your ID and then sign the pass with a pen, but if you use a mobile boarding pass, there is nothing for them to sign (At least as I understand it. Maybe I'm wrong.) Why is the signing necessary in the one case and not the other? Where is the security compensated for in the mobile case? Or what purpose does signing the paper pass serve?

I went through security at the Sacramento Airport with a friend. He got something written on his boarding pass "NG NS". I didn't have that. We both went through the same metal detector, neither beeped nor had random checks. Flying to Edmonton through Seattle connection. Early for flight.  I have tried searching for "what is tsa ng ns" on Google but nothing useful came up. Any ideas?


I recently received, unsolicited, a set of "pharmacy discount cards" from the "Massachusetts Prescription Assistance Program". The cards offer to save me "up to 75%" on prescription medications at a list of participating pharmacies. A letter is attached encouraging me to use them, and pointing me to their .  Fine print clarifies that the organization is not associated with the government, and since it's not clear what they are getting out of this, I assume it's a scam, or at least that they're not being forthright. But what is the angle here? What would happen if I used one of the cards and what are they trying to get out of me?

There are many companies in the United States that advertise a plan to consumers, promising to lower their costs for prescription drugs.  These plans go by several names such as "pharmacy discount card", "prescription benefit plan", or some combination of the words drug/pharmacy/prescription and benefit/discount/savings.  How exactly do these work?  In other words, why would they lower the drug costs to the consumer, yet still make money for the company?  I'm talking about third-party solutions that are separate from the consumer's health insurance.  Obviously in the latter case, the insurance company makes money by forcing consumers into a formulary.


How much bytes of memory are allocated after the following java statement is executed using a 32 bit JVM (assume that a memory reference contains only the first address of location being referenced)?  int a = new int[20];

I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know.