awk print all matching lines including duplicates

How can I print all matching lines between two files including the duplicates  sourcefile:  SNP value RS1 0.55 RS2 0.52 RS3 0.25 RS4 0.22   queryfile:  SNP RS1 RS2 RS2 RS3 RS4 RS4   Desired output:  SNP value RS1 0.55 RS2 0.52 RS2 0.52 RS3 0.25 RS4 0.22 RS4 0.22   At present I am using the following command to retrieve the matching lines but is removing the duplicates, while i need to print all lines including the duplicates,  Any suggestions please  Thanks  awk 'BEGIN{FS=OFS="\t"}NR==FNR{a[$1]=$0;next}a[$1]{print}' queryfile sourcefile > output


Give moderators the option to select a deletion reason when removing posts

In the past few weeks, I've received a few emails from users asking me why I deleted their posts. It's almost always for answers deleted after being correctly flagged as "not an answer". Typically, the user just doesn't fully understand the Stack Exchange format, and thinks they're leaving a comment or reply. After linking them to the  page and the  page, they typically understand. Now, deleted posts already show a link to the deleted answers help page, which I guess people don't click much. So, I'm suggesting that we make it more obvious by specifically telling them why their post was deleted. I'd like to see some way for moderators to optionally select a deletion reason when removing posts. Something similar to the rejected suggested edits reasons, which would show the user why their post was deleted with relevant links. Here are some of the reasons I'd suggest:  Your post was deleted because...   Comment as answer:  it would be more appropriate as a comment. You can always comment on your own posts, and can comment everywhere once you earn 50 reputation points.   Question as answer:  it appears to be asking a related question. Instead of leaving an answer, you can . Make sure to refer back to this original question, explaining what answers you've tried and why they didn't work.   Me-too answer:  it appears to be re-stating the original question. If you have the same problem as the original question, you can         (if rep >= 15){up vote it to show your support} (if rep >= 50){or start a bounty} (if rep < 15){use the "was this post helpful yes/no" links to support it}.   Thanks answer:  it appears to be a response to another answer. If you'd like to show appreciation for an answer, you can         (if rep >= 15){vote up the answer}  (if rep < 15){use the "was this post helpful yes/no" links under the answer} to support the answer that helped you.   Other:  it does not fundamentally answer the question.     ... For more information, see the  and "".  I think these cover all of the situations under which I would delete an answer and feel like the user deserves an explanation (albeit a canned message). If it's spam, gibberish, or otherwise obviously not genuine content, then the user shouldn't really be surprised when it's removed, or it might be appropriate to leave a comment. It's too much work to constantly be writing comments though (even with the pro forma comments script, it's kind of unofficial and inconsistent), so I think this would help a lot for making deletion more transparent to the user. Example:  To avoid making this too difficult for the moderator should they not wish to add a reason, the deletion could still happen instantaneously, but a box could show up after the deletion occurs, asking if they'd like to select a reason. If they don't choose a reason, it would just remain with the current default.


Why was I not rewarded with the reputation for the 3 upvotes?


I have been working with bipartite, four colorable, and five colorable graphs for a while now, and I came across a problem that I understand visually but not mathematically. Why is it true that any graph which isn't five colorable must have at least two disjoint cycles? I've tested this out by drawing on paper and it seems to make sense, but I am not sure how to prove this rigorously.  Any help would be greatly appreciated!


Writing on NTFS drives (on Debian Wheezy)

I am currently setting up a personal server on Debian Wheezy. My machine is an ARM based architecture (Cubox).  The problem appear when I want to mount and use my NTFS external hard drives. The mount point is correct, I can access files and folders, I can change owner but it is impossible to write files even as root.  I mount my drives with "mount -o options source destination" The command mount gives rw option for this mounted drive.


Is There a Natural Way to Extend Repeated Exponentiation Beyond Integers?

This question has been in my mind since high school.  We can get multiplication of natural numbers by repeated addition; equivalently, if we define $f$ recursively by $f(1)=m$ and $f(n+1)=f(n)+m$, then $f(n) = m \times n$.  Likewise, we get exponentiation by repeated multiplication. If $g(1)=m$ and $g(n+1)=mg(n)$, then $g(n) = m^n$.  In my high school mind it was natural to imagine a new function defined by repeated exponentiation: $h(1)=m$ and $h(n+1)=m^{h(n)}$.  These definitions only make sense for $n$ a natural number, but of course there are standard very mathematically satisfying ways to define multiplication and exponentiation by any real number. My question is this:  Can the function $h$ defined above also be extended in a natural way to $\mathbb{R}^{>0}$?  The question is in the spirit of seeking an extension of $f(n)=n!$ to $\mathbb{R}$ and arriving at $\Gamma(x)$.  Let me focus the question, and attempt to make precise what I mean by "in a natural way." Take $h(1)=2$ and $h(n+1)=2^{h(n)}$. $h$ is now defined on $\mathbb{N}$, and $h(2)=4$, $h(3)=16$, $h(4)=2^{16}=65,536$ etc. Is it possible to extend the domain of definition of $h$ to all positive reals in such a way that  a) The functional equation $h(x+1)=2^{h(x)}$ continues to be satisfied for all $x$ in the domain.  b) $h$ is $C^\infty$. (Analytic would be even better but this seems maybe too much to hope for?)  c) All $h$'s derivatives are monotone.  These requirements are my attempt to codify what would count as "natural." I am open to suggestions about what would be a better list of requirements.  If such a function exists, I would like to know how to construct it; if it doesn't, I would like to know why (i.e. outline of proof), and if relaxing some of the requirements (e.g. just the first derivative monotone) would make it possible.  (If the function exists, I am also interested in the questions, "is it unique?" "Could we add some natural requirements to make it unique?" But my main query is about existence.)


If $X = N_x$ and $Y = 4*X + N_y$, where $N_x$, $N_y \sim N(0, 1)$, then we have that $P(Y|X=x) = N(4x, 1)$. If we want to then find $P(X|Y=y)$, I would think that Bayes would work:  $P(X|Y=y) = P(Y|X=x)P(x)/P(y) = N(4x, 1)P(x)/P(y)$.   For x=2, the solution is N(8/17, 1/17). I don't see how this results. Can someone clarify please?  EDIT: Another user cited this as being a duplicate, but I don't see why.   EDIT: Originally, I asked "what is $P(x)$, $P(y)$? Are they the pdf of $N(0, 1)$ at their respective values?"


I have built an app on my Windows machine, but obviously cannot use RhoStudio to do a production build for iOS. Is there a simply way of doing this on a Windows PC or do I need a Mac?  I am using Rhodes v4.0.0.0  Any help would be greatly appreciated.  Thanks in advance.


java techniques for automatic resource release? "prompt cleanup"?

I'm porting to Java some C++ code that uses the pretty common C++ trick of allocating an object on the stack (it happens to implement a UDP connection) which has some internal state information (here, a UDP socket).  While in scope the object is used to do various things (send and receive UDP messages).  The nice thing is that when control leaves this scope the object's destructor will be run and this can be counted upon to automagically cause the release the object's internal resources (in this case, I make sure the socket gets closed so that I can reuse its address and port numbers in other parts of my program).  In trying to figure out how to do this I have learned that Java does not have a destructor, that "finalize" won't do what I want, etc.  Surely there is some similarly clever technique of accomplishing the same thing in Java?  I realize I could add a "close()" method and try to make sure that it is always called at the appropriate time, and I further realize this would probably be more easily and reliably done in Java than in C++.  But do I really have to go that route?


Clearly an even number $n$ cannot divide $2^{n}-1$, but about odd ones ? If $n$ is an odd prime this cannot happen neither since for an odd prime $p$ we have $2^p\equiv 2\pmod p$ and so $p$ cannot divide $2^p-1$ but what about the general case ($i.e~n$ an odd number larger than 1) ?


Run and install packages from local folder QGIS

I use QGIS in my work and sometimes need install python libraries for plugins to work but I don't have write access to C:/ where QGIS and python is installed (OSGeo4W). Is there a way I can install pip to a local write folder so I can install and run libraries from local path?


I want to prove that $$\frac{1}{2} + \frac{1}{4} + \dots + \frac{1}{2^n} \leq 1$$  only by induction! I check for the first one, $\frac12 \leq 1 $ correct. Then I assume for $n=k$ : $$\frac12 + \frac14 + \dots + \frac{1}{2^k} \leq 1$$ And Try and prove for $n=k+1$ $$\frac12 + \frac14 + \dots + \frac{1}{2^k} + \frac{1}{2^{k+1}} \leq 1$$ But I know that $$\frac12 + \frac14 + \dots + \frac{1}{2^k} \leq \frac12 + \frac14 + \dots + \frac{1}{2^k} + \frac{1}{2^{k+1}} \leq 1$$ and so: But I am stuck, this tells me that the sum for $n=k+1$ is always $1$ , not $S \leq 1$ I am so confused, because I can't use the geometric series sum formula.. any help would be appreciated!


I have this function which is simply a sum and a product. For some values work for others not in the sense does not return the correct result.  Codia function (r, c) {          return ((r + c) * (r + c + 1));  } alert(Codia(1908229752,0));   Result obtained by the function: 3641340788326211000  Result calculated by me: 3641340788326211256  Can you tell me where am I wrong.


Popup Dialog StringProperty File Icons Do Nothing

The dialog above is created with the code below. When I click on the file icon (see red arrow), nothing happens. Is there a proper way to get these to just work or at least point to a custom operator which invokes context.window_manager.fileselect_add(self) or something similar?  It really seems like the functionality I want should be built into the StringProperty when using FILE_PATH as a subtype... I must be missing something obvious.  What I am trying to do is execute a single operation that requires selecting more than one file path. I can invoke 2 fileselect_add's one after the other, but it becomes confusing because right when you click to accept the path the new path window opens immediately. It is just too confusing as to which one is being selected as there is really no way to customize the fileselect_add window to any usefull degree (as far as I am aware) to make it more obvious what the user is selecting.  Dialog code:  class mydialog(bpy.types.Operator):         bl_idname = "tools.mydialog"         bl_label = "My Dialog"          inFilePath = StringProperty(name="input file", subtype="FILE_PATH")         outFilePrefix = StringProperty(name="out prefix", subtype="FILE_PATH")      def invoke(self, context, event):         return context.window_manager.invoke_props_dialog(self)      def execute(self, context):         print(self.inFilePath)         print(self.outFilePrefix)         return {'FINISHED'}


Get all types that derive from a certain class in Visual Studio

There are a few posts on here regarding how to find all derived classes from a given class programatically (), but none that I can see when using Visual Studio (2015).  I'm looking at the 'Object Browser' window and I'm surprised such a feature doesn't exist. Am I doing something wrong or is there really no way to find out?


Setting CSS pseudo-class rules from JavaScript

I'm looking for a way to change the CSS rules for pseudo-class selectors (such as :link, :hover, etc.) from JavaScript.  So an analogue of the CSS code: a:hover { color: red } in JS.  I couldn't find the answer anywhere else; if anyone knows that this is something browsers do not support, that would be a helpful result as well.


Is it possible to close a browser window using javascript?

I need to close the browser window using the java script.  I have tried using window.close but it is not working.   I have also googled and checked stack overflow for any similar posts. I have also gone through following link but in vain.    What I am trying to do is load a page and on load of the page call a java script method which does window.close  Below is the code  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <script> function closeBrowser(){     window.close(); } </script> </head>  <body onload="closeBrowser();">  </body> </html>   It is properly working in IE8 though. Its not working in the fire fox.   And even in IE it gives the alert prompt before actually closing the browser. Can we avoid the alert in IE?  Why it does not work in fire fox?


Why are soap bubbles made of soap? What I know is  to have stability in bubble, waterproofing agents should me mixed, but soaps are water wetting agents, and water wetting agents will decrease angle of contact.   Can someone correct me?


I am not able to find out what are all the open subgroups of $(\mathbb{R},+)$, open as a set in usual topology and also subgroup.


Can you have two different names for the same alternative ("send mail as") email address in Gmail?

I can add me@mydomain.com under "send mail as" email address in Gmail settings.  But can I choose between two different names to use with it, like I can in e.g. Mac Mail?  For instance, can I set it up so when emailing I have the choice between sending mail as either Bob <me@mydomain.com> or Agent Black <me@mydomain.com>?


How can voltage actually exist/change if electricity can't actually speed up or slow down?

PLEASE NOTE:  No this question does not already have an answer at the link posted above. This question was closed by individuals who didn't read it, nor the comments underneath it.  I am new to hardware/electronics and am coming from a software background. I'm ashamed to say, but I've never fully understood the difference between volts and amps. If you Google "volts vs amps" you'll get a plethora of articles/links/blogs/videos that all try to explain the difference, but IMHO they actually do a really lousy job at it, and here's why:  Most analogies to volts/amps come in one of several very-similar forms:   Water flowing through a stream; or Cars traveling on a highway during rush hour etc.   Let's take the "flowing water" analogy; it is typically explained that:   Volts: the pressure of the water traveling through the stream; and Amps: how much water is traveling through the stream   The problem here (I believe) is that electricity is always traveling at a constant speed (speed of light), regardless of how much power you're generating, or regardless of the gauge size of the wire you're using. Unlike the speed of water traveling through a stream, the speed of electricity is constant and cannot be sped up or slowed down (I understand in the context of theoretical physics this is probably not true, but we're talking consumer electronics here).  With flowing water, if we increase the size of the stream (its width or depth), then not only will more water pass through any given point (volume), but the speed of the water will also increase. This is given to us by the .  So I've always had this mental hang up with trying to understand exactly what volts are, because the analogies that are always used just don't stack up.  It makes sense that amps can be changed by changing the gauge of the wire the current is traveling through; this is the same as increasing the volume of the stream; but...  To me, it doesn't make sense that volts should ever be capable of changing, because volts are essentially the speed/pressure of the water passing through the stream, but electricity can't actually speed up or slow down! This is where the analogies break down for me, and is the root of my confusion.  Can someone please help me understand how electricity can have different levels of "pressure" or "potential", which is what volts are said to be, in a way that makes sense?   Again, if electricity travels at a constant speed, and we make the wire bigger, I understand that we will get more volume/amps. But I don't understand how this will create more "pressure" since the bigger wire will not actually make the electricity speed up.


Is it okay to leave uncooked chicken over night but refrigerate it in the morning and then cook it?

I bought some chicken and I accidentally forgot to put it away and I put it in the fridge in the morning and I want chicken can I like boil it and the bacteria will boil away or what?


Installing ChatJax bookmark on the iPad and iPhone

I have a 16 GB Apple  Mini iPad using iOS 8.1.2 and am unable to install the bookmark found  that renders LaTeX in the Math Stack Exchange chat room. I can't find a browser with a bookmark bar to drag the given link to.  Other users in the room have also been unable to render LaTeX with their iPad and iPhones. Could you provide instructions that someone who is new to Apple products could follow?


What to wear in Amsterdam in end of June

I'll be in Amsterdam end of June for 5 days. I'm from tropical weather and heard spring in Amsterdam is bit cold.   Do I need wear clothing thats suits to cold weather or normal t-shirt and trouser will be fine? Will it be cold in nights? can I wear casual baggy shorts at night?   This question is about what to dress in End of June in Amsterdam.  PS: End of June 2017 was very cold and had some rain with wind. Even though it says end of spring don't forget to put some dress for cold weather.


How can I make a directory on the desktop?  I tried cd /desktop command but it gives an error  no such file or directory.  What's the correct command?


id() function giving different results in python

>>> a = 123 >>> print(id(a)) 94366784571712 >>> b = 123 >>> print(id(b)) 94366784571712  But, when I change the value to 345 it gives different results >>> a = 345 >>> print(id(a)) 139794845105136 >>> b = 345 >>> print(id(b)) 139794845103472  Please can anyone explain why was it giving the same value for 123?


What is the point of runat=”server” in an aspx document?

As I understand there is no runat="browser" or runat="server7" or runat="Mardid" etc.   So what's the use of this command. Obviously it instructs code to compile on the server-side, but if there are no other options, why isn't it defaulted / implicit?


How does Javascript equality operator works?

I was just trying something in javascript and came across this scenario for the javascript equality operator, which baffled me    My questions are,  1) Why ""==0 is true ?  2) If "0"==0 and ""==0 is true then why ""=="0" is false ?  Any explanation and the pointers for more reading will be great.


Prove :(P → Q) ∨ (Q → P) using natural deduction

Allowed inference rules: ∨-I, ∨-E, ∧-I, ∧-E, →-I, →-E, ¬-I, ¬-E  I tried to prove a contradiction by assuming $¬ ((P → Q) ∨ (Q → P))$ but got stuck, or am I doing it in the wrong way?  Edit:  My proof attempt  $1.\qquad¬ ((P → Q) ∨ (Q → P))\qquad \qquad\qquad\qquad\qquad\qquad\qquad \qquad\qquad Assum$  $2.\qquad P → Q\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\  Assum$  $3.\qquad(P → Q) ∨ (Q → P)\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\; ∨-I(2)$  $4.\qquad(¬ ((P → Q) ∨ (Q → P))) ∧ ((P → Q) ∨ (Q → P))\qquad\qquad\qquad\; ∧-I(1,3)$  $5.\qquad  ¬ (P → Q)\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\;\;\; ¬-I(2,4)$  $6.\qquad  Q → P\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad \qquad\qquad\qquad\quad\; Assum$  $7.\qquad  (P → Q) ∨ (Q → P)\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\;\; ∨-I(6)$  $8.\qquad  (¬ ((P → Q) ∨ (Q → P))) ∧ ((P → Q) ∨ (Q → P))\qquad\qquad\qquad\;\; ∧-I(1,7)$  $9.\qquad  ¬ (Q → P)\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\; ¬-I(6,8)$  $10.\qquad ¬ (P → Q) ∧ ¬ (Q → P)\qquad\qquad\qquad\qquad\qquad\qquad\;\qquad\qquad\quad\;\;\, ∧-I(5,9)$  Stuck at this line, can't spot any contradiction to line 1


I've just installed 14.0.4 and it freezes if left for any amount of time (more than a few minutes)  The mouse moves, but any input on the keyboard isn't shown on screen (password lock screen)  The lights on the keyboard work and I can toggle the caps lock/ number lock etc.   Many thanks   Andy


Is there any way to hide taskbar labels and not combine taskbar buttons?

There are three options for customizing taskbar buttons in Windows 7:   Always combine, hide labels Combine when taskbar is full Never combine   Is there any way to hide labels and not combine taskbar buttons? Or even better, to exclude only certain applications from combining?  My main problem is that I switch a lot between two instances of a single application, and having to hover over combined icon and then choosing the correct one. Alt-Tabbing is not a good alternative when I'm switching between more than three applications; clicking on taskbar only once is what I'm looking for.


I need to copy many elements (and their attributes) from a shapefile and paste to another one. If I use copy/paste functions it pastes only the polygons but not the attributes.   How can I solve it?


How to get rid of corners rounding on blender?

I'm a beginner with blender and not sure why my corners are rounding off? I would like them to create a square face, I've added reference images below. Thanks in advance :)


Link to question regarding treating differential operator as a ratio

I have attempted to find the post which provides an explanation as to the circumstances in which we can treat $\frac{dy}{dx}$ as a ratio which appears to be used in solving separable DE's, but I have yet to find it. Can anyone provide the link please?  Thanks


What are the complexity guarantees of the standard containers?

Apparently ;-) the standard containers provide some form of guarantees.  What type of guarantees and what exactly are the differences between the different types of container?  Working from  (about ) I have come up with this:  Container Types: ================ Container:     Forward Container         Reverse Container             Random Access Container     Sequence         Front Insert Sequence         Back  Insert Sequence     Associative Container         Simple   Associative Container         Pair     Associative Container         Sorted   Associative Container         Multiple Associative Container  Container Types mapped to Standard Containers =============================================  std::vector:    Sequence    Back        Sequence                    Forward/Reverse/Random Container std::deque:     Sequence    Front/Back  Sequence                    Forward/Reverse/Random Container std::list:      Sequence    Front/Back  Sequence                    Forward/Reverse Container std::set:       Sorted/Simple/Unique    Associative Container       Forward Container std::map:       Sorted/Pair/Unique      Associative Container       Forward Container std::multiset:  Sorted/Simple/Multiple  Associative Container       Forward Container std::multimap:  Sorted/Pair/Multiple    Associative Container       Forward Container   Container Guarantees: =====================                                                                                Simp                                                                                or                           For   Rev  Rand        Front  Back  Assoc        Sort   Mult                     Cont: Cont: Cont Cont: Sequ: Sequ:  Sequ: Cont:        Cont:  Cont: Copy    Const:      O(n) Fill    Const:                             O(n) begin()             O(1) end()               O(1) rbegin()                        O(1) rend()                          O(1) front()                                    O(1) push_front()                                     O(1) pop_front()                                      O(1) push_back()                                             O(1) pop_back()                                              O(1) Insert()                                                                          O(ln(n)) Insert: fill                               O(n) Insert: range                              O(n)                                   O(kln(n)+n) size()              O(n) swap()              O(1) erase key                                                     O(ln(n)) erase element                                                 O(1) erase range                                                   O(ln(n)+S) count()                                                       O(log(n)+k) find()                                                        O(ln(n)) equal range                                                   O(ln(n)) Lower Bound/Upper Bound                                                    O(ln(n)) Equality                  O(n) InEquality                O(n) Element Access                       O(1)


How to change App Drawer background to be less transparent

How can I change the Ubuntu app drawer background color? or how can I decrease the blur effect, I don't want to see my wallpaper when I'm on the app drawer page.  Too transparent.    I like this background.


What does bless means in hash value in perl?

What does this bless means in below hash value, and how to dereference it?  'limit' => bless( { 'days' => 2, 'minutes' => 0, 'months' => 0, 'nanoseconds' => 0, 'seconds' => 0 }),


Should the search function also use your keywords to search Google?

It seems to me that a lot of the questions that get asked by newbs like myself can be answered easily by searching Google, but people appear not to think about searching Google before they search SO.  Would it be entirely inappropriate to suggest that included in the provided SO search functionality is a section that returns Google search results using the same keywords? Seems like it might save on a few duplicates.  I think what I'm suggesting is a partially revised version of a suggestion that has already been made  In my mind, it wouldn't be that difficult to add two sections to the duplicate questions list, one for SO and one for random stuff that Google can come up with meaning from external sites, not from SO.


If the Raven Queen claimed Nerull's portfolio, why doesn't she preside over souls in an/the afterlife?

As  outlines, the Raven Queen was a mortal until she killed Nerull and took his stuff. Why is her portfolio different from his, then? She's got Winter and Fate (Nerull didn't), but doesn't have Nerull's signature Death schtick; instead she safeguards the sanctity and finality of death. What gives?


“cd” does'nt work in a scripting in Ubuntu

I'm trying to write a command  mytodo to change the current directory to my project directory and saved in /bin/  & changed its permission to executable :  #!/bin/bash cd /vagrant/backup/toDoApp/   Earlier it was working wherever or whenever i run mytodo it changes my directory to  /vagrant/backup/toDoApp/ but now suddenly it stopped working now it doesnt changed my cwd. as i also tried alias but when shutdown or restart machine my alias commands disappears Please help.


How to hide template class definition in source file and avoid linking problems?

I want to define a template class with complex behavior. I have trouble with template specialization. To avoid giving the definition of the member functions to the final user, I went for the classic header declaration and source definition. However, how can the user instantiate the class with his custom objects while he does not have the template class definition ? Hereinafter an example with strong types.  // metatype.h #ifndef METATYPE_H #define METATYPE_H  #include <utility>  template<typename Type, typename Parameter> class MetaType { public:     MetaType(const Type &value);     Type &get(); private:     Type value; };  #endif // METATYPE_H  // metatype.cpp template<typename Type, typename Parameter> MetaType<Type, Parameter>::MetaType(const Type &value) : value(value) { }  template<typename Type, typename Parameter> Type &MetaType<Type, Parameter>::get(const Type &value) {     return value; }  // main.cpp #include <iostream> #include "metatype.h"  using Real =MetaType<double, struct RealType>;  int main() {     Real a(3);     std::cout << a.get() << std::endl;     return 0; }   Problem is I have compiling errors due to missing definition of the template specialization. Is there a way to avoid giving the definition to the final user, especially when a complex behavior of the template class is defined ?  Thank you for your anwsers.


How to select taxonomy term based on current language?

My website has 3 languages. The Tag taxonomy is multilingual and for each term I added its translation. I created a block of a view using the  module that selects one random term and displays it.  I need this block to show its content in the language currently set.  How can I do this?


Object Claims to be Appended But Not Showing Up in Viewport

The title is pretty self-explanatory.  When I append the object, the data seems to come through but it isn't showing up in the viewport.  The original object was an imported .fbx if that makes any difference.  The object is a TV Stand and it should show up where the 3D cursor is.  You can see it highlighted in the outliner.  Any thoughts?


How can I update Ubuntu if I "missed my chance"?

When the new 13.04 became available I had no internet. Still, it appeared on my Update Manager (not relevant, but HOW?). When I got internet back and opened the Update Manager the button to update to 13.04 was nowhere to be found.  How can I install the 13.04 now?


Show the expected number of packets to buy to collect a whole set of minifigures

Minifigures are sold in packets, where each packet contains one minifigure, and from the outside of the packet it is impossible to tell which minifigure is inside. There are $n$ minigures to collect.   Assuming that each packet that is bought is equally likely to contain any one of the figures, show that the expected number of packets that needs to be bought to collect the whole set is approximately $n \log n$.


World Shapefile country borders and the bordesr of big cities or regions

Searching for a World Shapefile where you can see the country borders and the borders of big cities or regions.


I try to prove that the power of any infinite set must be equal/bigger then the power of the natural א0.  I tried to show that for any infinite set there exists a subset of it, that its power is the power of the naturals.


Counter example for $(A \times B) \cap (C \times D) = (A \cap C ) \times (B \cap D)$

I want to prove this:  $$(A \times B) \cap (C \times D) = (A \cap C ) \times (B \cap D)$$  by every element on LHS(left hand side) is an element of RHS and vice versa.  Does a counter example exist?


Why the Moved File Doesn't Exist at the Destination Path?

I have moved a file (results.txt) from source_path to destination_path, a path on the external hard disk, using the mv command in Mint18. After the moving was finished, I unplugged the disk to plug it to another system to check results.txt. However, the file exists neither in the destination_path nor in the source_path. Is the mv command run unsuccessfully and results.txt deleted? Is there any way to retrieve results.txt?


How can I trash a file from the command line?

Can I make a shell script trash files instead of delete them?  In the past I used gvfs-trash but this doesn't appear to exist in Ubuntu 10.10.


Did Data Have Emotions Without Knowing It?

Starting with Encounter at Farpoint, at the very start of the series, when Riker first meets Data in the holodeck, Data, when asked if he considers himself superior to humans, says, "I am superior, Sir, in many ways, but I would give it all up to be human."  He has a desire, a want, and a longing to be human.  Isn't this an emotion in itself?  There's no reason or need for him to have such a desire.  If it's programmed into him, he would be able to find it somewhere in his memory and perhaps (if it's not read-only) re-write it.  Where could this desire come from if it's not from envy or longing or some other type of emotion?  Is it possible he had this and some other simple emotions all along?


Determine if Type is a pointer in a template function

If I have a template function, for example like this:  template<typename T> void func(const std::vector<T>& v)   Is there any way I can determine within the function whether T is a pointer, or would I have to use another template function for this, ie:  template<typename T> void func(const std::vector<T*>& v)   Thanks


Count the intersection of buffers, in the same layer. qgis

If I have one shape of buffers, How to count the number of times, the different buffers (in the same layer) intersect each other.


Average number of students who will get hw back.

The homeworks of $20$ students is collected, randomly shuffled and returned to the students.  What is the average number of students who will get back their own homework? PS: I tried doing this using $E(X)=E(X_1)+E(X_2)+\ldots+E(X_n)$ but I did not understand the concept clearly.


Permissions of /Users keep changing back to drwxrwxrwx

I use the Disk Utility to repair it. But the permissions change back after reboot.     Permissions differ on “private/etc/aliases”; should be lrwxr-xr-x ;   they are -rwxr-xr-x .    Permissions differ on “Users”; should be drwxr-xr-x ; they are drwxrwxrwx .    Permissions differ on “Users/Shared”; should be drwxrwxrwt ; they are drwxrwxrwx .   System: Mac OS X 10.9.3


In the Movie Looper, how does this happen?

How is Seth's older self able to escape if his legs have been cut off? Shouldn't the timeline change?


I have imported a schematic in PCB and placed components. But one thing is missing, its not showing pads names as they are appearing in schematic. It can only show Designator and Comments of component in PCB but not the pads name.   How can I make them appear ?  Thank you  Added screenshot, how to do like this. Like 1 appearing next to pin 1, 2 appearing next to pin 2. But when I add a header, nothing appears, only the entire component designator appears.


how to copy or backup files ignoring dot files

I want to back-up all files from my laptop partitions to external HDD.  I ran, for example  cp -a /med*/ravb*/*00   /med*/ravb*/M*L*/7.3GB_CP && echo "7.3GB BACKED UP PROPERLY" || echo "7.3GB FAILED TO BACK UP"   The issue is that dot files are also getting included which I don't want. What should I do so as to ignore all dot files for backing up.


Why am I getting this warning and how to fix it? Essentially, I want to convert a video to a jpg every 4th frame with the same resolution as original video.  [jalal@goku vid2]$ ffmpeg -i debate_vid2.mov -r 0.25 images_%08d.jpg ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)   configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect   libavutil      54. 20.100 / 54. 20.100   libavcodec     56. 26.100 / 56. 26.100   libavformat    56. 25.101 / 56. 25.101   libavdevice    56.  4.100 / 56.  4.100   libavfilter     5. 11.102 /  5. 11.102   libavresample   2.  1.  0 /  2.  1.  0   libswscale      3.  1.101 /  3.  1.101   libswresample   1.  1.100 /  1.  1.100   libpostproc    53.  3.100 / 53.  3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'debate_vid2.mov':   Metadata:     major_brand     : qt       minor_version   : 0     compatible_brands: qt       creation_time   : 2017-03-10 02:45:46   Duration: 01:36:50.03, start: 0.000000, bitrate: 785 kb/s     Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default)     Metadata:       creation_time   : 2017-03-10 02:45:46       handler_name    : Core Media Data Handler     Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 334x360 [SAR 1:1 DAR 167:180], 685 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)     Metadata:       creation_time   : 2017-03-10 02:45:46       handler_name    : Core Media Data Handler       encoder         : H.264 [swscaler @ 0x1bb4240] deprecated pixel format used, make sure you did set range correctly Output #0, image2, to 'images_%08d.jpg':   Metadata:     major_brand     : qt       minor_version   : 0     compatible_brands: qt       encoder         : Lavf56.25.101     Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 334x360 [SAR 1:1 DAR 167:180], q=2-31, 200 kb/s, 0.25 fps, 0.25 tbn, 0.25 tbc (default)     Metadata:       creation_time   : 2017-03-10 02:45:46       handler_name    : Core Media Data Handler       encoder         : Lavc56.26.100 mjpeg Stream mapping:   Stream #0:1 -> #0:0 (h264 (native) -> mjpeg (native)) Press [q] to stop, [?] for help frame= 1454 fps= 25 q=1.6 Lsize=N/A time=01:36:56.00 bitrate=N/A dup=0 drop=172847     video:28470kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [jalal@goku vid2]$


Bigger infinity than real number infinity

Is there a bigger infinity than the infinity of cardinality of the real numbers $R$ ? i.e. is there a set to which real numbers can't be mapped one-one to ?


While studying about the magnetic properties of matter, my book defines this vector as   $\vec{H}=\dfrac{\vec{B}}{\mu_0}-\vec{M}$  where $B$ is the magnetic field and $M$ is the intensity of magnetisation.  However it did not provide any definition of this new physical quantity whatsoever.


Hello everyone how can I calculate the sum of:  $\sum_{k=0}^{n}\binom{n}{k}\frac{1}{k+1}$  I tried to use pascal identity and the binomial theorem and didn't success.  Someone can help me please?


A question in the proof that Lipchitz continuous functions implies $W^{1,\infty}$.

In $\S 5.8.2$ of Evan's PDE book, there is a theorem about characterization of $W^{1,\infty}$.  Here it says      On the other hand assume now $u$ is Lipschitz continuous; we must prove that $u$ has essentially bounded weak first derivatives. Since $u$ is Lipschitz, we see   \begin{equation*} \Vert D_i^{-h}u \Vert_{L^{\infty}(\mathbb{R}^n)} \le \mbox{Lip}(u), \end{equation*}   and thus there exists a function $v_i \in L^{\infty}(\mathbb{R}^n)$ and a subsequence $h_k \to 0$ such that   \begin{equation*} D_i^{-h_k}u \rightharpoonup v_i \quad {\text{weakly in}}\quad L^2_{\text{loc}}(\mathbb{R}^n) \end{equation*}   Here, $u$ has compact support and $D_i^h u = \frac{u(x+ he_i) - u(x)}{h}$.   Since $D_i^{-h}$ has compact support and are bounded in $L^\infty$, $D_i^{-h} \in L^2(\mathbb{R}^n)$. Also, since $L^2(\mathbb{R}^n)$ is reflexive, we have a subsequence $D_i^{-h_k}u \rightharpoonup v_i$ in $L^2_{\text{loc}}(\mathbb{R}^n)$ as the book says. However, I don't understand why $v_i \in L^\infty(\mathbb{R}^n)$, which is the key point of proving $u \in W^{1,\infty}$. Could you help me understand this? Any help would be appreciated!


Why lsb_release -c command , returns n/a?

recently I switched from zorin os to deepin 20 for it's outstanding UI and eases of use for daily operations. it's almost OK but if I need some newer packages which are not listed in official deepin repositories, I have to use some community installer scripts that rely on this command to obtain the correct linux LSB version : lsb_release -c the problem is : the return value is "n/a" that consequently, breaks down the installation process. how can I fix this ?


Replace Ubuntu 12.04 on my USB Pendrive with latest Ubuntu version

I need to remove Ubuntu 12.04 from my USB Pendrive so that I can add latest Ubuntu version instead.  I tried updating from 12.04 to Ubuntu 14 using the update manager but I dont have enough free storage on my USB.  How do I remove the old version and replace it with the new one?  Edit:  I managed to update to Ubuntu 16.04.3 by using the . I didn't format the USB beforehand. Instead the UniversalUSBInstaller overwrote the old Ubuntu 12.04. It seems to be working ok atm. If there's problems, I'll post back here. Thanks for your help.


Is there a limit on how many questions I can ask?

Is there a limit on how many questions I can ask per day? Per hour? Per other time unit?  Related Questions:


`set -e` doesn't abort the script when a sub-shell fails as part of `export`

When running the following script: #!/bin/bash set -e export X=$(false) echo That did not abort X=$(false) echo That did abort  It outputs: That did not abort  So export X= doesn't abort the execution, but X= does. Why does it not abort on an erroneous export X=, even though set -e is set?


Is there a flaw in this proof that $\lim_{x\to a} f(x) = \lim_{h\to 0} f(a+h)$

I found 3 answers for a proof at .  The selected answer seemed more rigorous, but the 3rd answer (repeated here) seemed simpler.   Is the 3rd answer flawed?  In general, can you substitute limit variables such as changing $\lim_{x\to a}$ to $\lim_{h\to 0}$? The third answer was: Pose h=x-a, then x=a+h, and when $x\to a$, there is $h\to 0$.  Then, $\lim_{x\to a}f(x)=\lim_{x-a\to 0}f(x-a+a)=\lim_{h\to 0}f(a+h)$  This is not a dup of the referenced question because I asked if 3rd proof in original question was valid, and was that technique valid in general.


What is the meaning of "would", and how to use it?

What is the meaning of would, and which tense is it used in the following sentences?  For example,   That would be Ram calling. I'll answer it. (the meaning of would and which tense is used) The guy on the phone had southern accent. That would be Tom. (the meaning of would and which tense is used) “We saw a police helicopter overhead yesterday morning.” “Really? They would have been looking for those bank robbers.” (the meaning of would and which tense is used) You would have to say/do that. (Why is would used here? What happens to the meaning if would is removed?) John said he didn't steal any money. Well, he would, wouldn't he ? (Why is would used here?)   Why is would used in sentences 1, 2, and 3 to mean "presumption" instead of using other modals, such as: must and should? Does the meaning change if used others?   Can we use will, must, should and could in the place of would, without changing the meaning of sentences?   What kind of meanings would it make if they (will, must, should, and could) are used in the place of would?     I'd be grateful if you could answer me.


Infinite sums of reciprocal power: $\sum\frac1{n^{2}}$ over odd integers

The infinite series I need to solve is  $$\sum_{n=1,3,5...}^{\infty}\frac{1}{n^{2}}$$  and because the point of interest lies in the value of odd n,   the infinite series can be expressed as  $$\sum_{n=1}^{\infty}\frac{1}{(2n-1)^{2}}$$  This came up in a quantum mechanics problem involving the expectation value of the Hamiltonian.   Is there a good idea to verify the solution is indeed $$\frac{\pi^{2}}{8}$$ or is this something with which I must refer to a math table? Any good ideas would be helpful.


I am tring to make bibliographig list in Bibtex with subtitles. For this I have the following minimal example:  \begin{filecontents}{minimal.bib}     @online{electronic1,         author = {A. Author},         title = {Funny website},         urldate = {2013-01-09},         url = {http://www.example.org},     },     @book{book1,     author = {B. Bthor},     title = {A Book of whatever},     date = {2012},     },     @article{article1,         author = {C. Cthor and D. Dthor},         title = {Writing interesting articles},         journaltitle = {The Journal of References},         date = {2010-12-01},     } \end{filecontents} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Optionen zum Layout des Buchs                                     %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \documentclass[a4paper, 11pt     liststotoc,                 % Abb.- und Tab.verzeichnis im Inhalt     bibtotocnumbered     listtotoc     idxtotoc     bibtotoc ] {scrbook}      \usepackage[         natbib = true,         style  = alphabetic     ]{biblatex}   \addbibresource{Literatur.bib}  \setuptoc{toc}{numbered}  \usepackage[ngerman]{babel} \usepackage[ansinew]{inputenc}  \usepackage{graphicx} %%Zum Laden von Grafiken  \begin{document}  \title{Minimalbeispiel zur Literaturverwendungsstyl ausprobung} \author{Autor Anonymus}  \maketitle  \tableofcontents            % Inhaltsverzeichnis  \mainmatter                 % Vorspann (z.B. römische Seitenzahlen) \chapter{Einleitung}  Bei der Book-Klasse des KOMA-Script wird durch den Gliederungsbefehl \verb#\frontmatter# automatisch auf römische Seitennummerierung gewechselt und die Nummerierung der Kapitel unterdrückt. In der Regel sollte der Vorspann nur aus einem Kapitel -- dem Vorwort -- bestehen. \cite{Kuester 2010}  Der Vorspann endet für scrbook, wenn durch \verb#\mainmatter# der Hauptteil beginnt.   \appendix                       % Beginn des Anhangs \pagenumbering{Roman}  \newpage \addcontentsline{toc}{chapter}{Tabellenverzeichnis} \listoftables               % Tabellenverzeichnis  \newpage \addcontentsline{toc}{chapter}{Abbildungsverzeichnis} \listoffigures              % Abbildungsverzeichnis  \newpage \addcontentsline{toc}{chapter}{Literaturverzeichnis} \nocite{*} \printbibheading                    % print heading for all bibliographies \printbibliography[         nottype = online,               % Put here verything that is NOT of the type "online".                                                                         % The "electronic" type is just an alias to "online"          title={Quellen},     % title of the subbibliography         heading=subbibliography         % make bibliography go one sectioning level lower ] \printbibliography[         type=online,                    % Put only references of the type "online" here.         title={Online-Quellen},         heading=subbibliography ] \end{document}   I tried to compile 3 times, but it doesn't work. My problem is that the entries doesent seem to be printed out to the pdf.  If you can help me, I would be happy.


After looking through a list of emergency numbers for the different countries, I've noticed that there are four main numbers: 112, 911, 999 and 000.   So, if I found myself in a country where I didn't know the emergency number, which number should I guess at first from the list of four above? How should my guess be different in each of the continents?  What should I do if none of them work?


NullPointer with BufferedReader and split()

I am tring to read a file which has lines like so:  438782    Abaca bunchy top virus    NC_010314    Musa Sp.   So the lines contain information seperated by tabs. I am tring to read this file and do something with every line after splitting them. It keeps throwing a NullPointerException error though. This always happens on the line where I try to split. In the code below I left everything unrelated to this issue out.  BufferedReader br = new BufferedReader(new FileReader(filename)); String nextLine = br.readLine(); String[] line; while (nextLine != null) {     nextLine = br.readLine();     line = nextLine.split("\t"); //Error line     //Do something with line }


Composition of holomorphic functions is holomorphic

If $g(w)$ and $f(z)$ are holomorphic functions, show that $g(f(z))$ is also holomorphic.   From the assumptions we have that for some $A,B$,  $$\lim_{h\rightarrow 0}\frac{g(f(z)+h)-g(f(z))}{h}=A,$$  $$\lim_{h\rightarrow 0}\frac{f(z+h)-f(z)}{h}=B.$$  We want to prove that there exists $C$ with  $$\lim_{h\rightarrow 0}\frac{g(f(z+h))-g(f(z))}{h}=C.$$  The second equation means, by definition of the limit, that for any $\varepsilon > 0$, there exists $\delta$ such that $0<|h|<\delta$ implies $$\left|\frac{f(z+h)-f(z)}{h}-B\right|<\varepsilon.$$  I don't know how to get to $\dfrac{g(f(z+h))-g(f(z))}{h}$ from here.


I'd like to increase the battery life on my XPS 13 running Ubuntu 14.04. Is this possible? It seems like running a native OS like Windows performs better and would like to maximize the efficiency of the machine.


I have 2 lists-  [(Tandoor, Indian), (Biryani, Indian), (Pizza, Italian)]  { in the above, left item is a food item of cuisine type on right}  and   [(John, Indian), (Mary, Indian), (Sam, Italian)]  { in the above, left person has choice of cuisine type on right}  I need to print out the contents of the lists as John Tandoor John Biryani Mary Tandoor Mary Biryani Sam Pizza  The APIs for initializing the 2 given lists, printing the output and handling Pair objects (comparing, accessing key and value) are given.  Why am I getting nullpointerexception in the following -  package a1; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Scanner;  public class main {     static class Pair implements Comparable<Pair>{         String pairKey;         String pairValue;          Pair(String pairKey, String pairValue) {             this.pairKey = pairKey;             this.pairValue = pairValue;         }          public String getPairKey() {             return pairKey;         }          public String getPairValue() {             return pairValue;         }          public String toString() {             return getPairKey() + " " + getPairValue();         }          @Override         public int compareTo(Pair pair) {             int compare = pairKey.compareTo(pair.getPairKey());             if(compare == 0) {                 compare = pairValue.compareTo(pair.getPairValue());             }             return compare;         }     }     static List<Pair> solve(List<Pair> lunchMenuPairs, List<Pair> teamCuisinePreferencePairs){         List<Pair> result= null;         for(Pair first : teamCuisinePreferencePairs){             for(Pair name : lunchMenuPairs)             {                 String a1 = first.getPairValue();                 String a2 = name.getPairValue();                 String a3 = first.getPairKey();                 String a4 = name.getPairKey();                 if(first.compareTo(name)==0)                 {                     System.out.println(a3);                     System.out.println(a4);                     Pair pair = new Pair(a3,a4);                     result.add(pair);                 }             }         }         return result;     }      private static void readAndSetParameters(List<Pair> lunchMenuPairs, List<Pair> teamCuisinePreferencePairs) {         int lunchMenuPairCount = -1;         int teamCuisinePreferencePairCount = -1;          String tempOption = null, tempOptionValue = null;;         try(Scanner in = new Scanner(System.in)) {             lunchMenuPairCount = in.nextInt();             while(lunchMenuPairCount > 0) {                 lunchMenuPairCount--;                  tempOption = in.next();                 tempOptionValue = in.next();                 Pair pair = new Pair(tempOption, tempOptionValue);                 lunchMenuPairs.add(pair);             }              teamCuisinePreferencePairCount = in.nextInt();             while(teamCuisinePreferencePairCount > 0) {                 teamCuisinePreferencePairCount--;                  tempOption = in.next();                 tempOptionValue = in.next();                 Pair pair = new Pair(tempOption, tempOptionValue);                 teamCuisinePreferencePairs.add(pair);             }         }     }      private static void print(List<?> resultPairs) {         for (Object pair : resultPairs) {             System.out.println(pair);         }     }      public static void main(String[] args){         List<Pair> lunchMenuPairs = new LinkedList<>();         List<Pair> teamCuisinePreferencePairs = new LinkedList<>();         readAndSetParameters(lunchMenuPairs, teamCuisinePreferencePairs);         List<Pair> result = solve( lunchMenuPairs, teamCuisinePreferencePairs );         Collections.sort(result);         print(result);     } }


Dynamically adjust the height of the UITextView depending on its content?

I have an UITextView that loads different text depending on the route the user has taken in order to get to the view with the text on it.  How do I dynamically adjust the height of the UITextView depending on its content using Swift?


Nagging users to award a bounty when they can't

I posted a bounty to a fairly corner-case question at  . Sadly, 30 minutes after posting the bounty, I realized what the answer was. That's fine though, I understand how bounties work.  There are still no other answers to the question, so nobody can get the bounty. But I still get system notifications and emails pleading with me to award the bounty before it expires.  These emails and notifications should only be sent if a bounty can actually be awarded.


Why was the Triwizard cup portkey bi - directional?

My understanding is that a portkey is usually only one way (uni-directional) so as the title says, why make the Triwizard Cup portkey able to return back to Hogwarts (bi-directional)?   Why bother to make it go back to Hogwarts, allowing Harry to use it to go back?


How to create Pascal's triangle like this:


Does there exist a smooth function which is nowhere analytic?

Smooth means has derivatives of all order, and analytic means can be given as a convergence of power series.


I just need some advice on upgrading from 12.10 to 13.04.  What happens when I upgrade? Do my files, settings, and internet bookmarks stay intact? I can't find any resources to help me with this.


Is it safe to use variable as column name like I use in this code?  public function SelectForum($column, $value) {     global $database;     $database->query('SELECT * FROM forums WHERE '.$column.' = :value');     $database->Bind(":value", $value);     $database->execute();     $ForumsData = $database->resultset();     $ForumsCount = $database->RowCount();     if($ForumsCount == 0) {         return null;     } else {         return $ForumsData;     } }


Prove $\sum_{d \leq x} \mu(d)\left\lfloor \frac xd \right\rfloor = 1 $

I am trying to show $$\sum_{d \leq x} \mu(d)\left\lfloor \frac{x}{d} \right\rfloor = 1 \;\;\;\; \forall \; x \in \mathbb{R}, \; x \geq 1 $$ I know that the sum over the divisors $d$ of $n$ is zero if $n \neq 1$. So we can rule out integers that are divisors of $x$ (if $x > 1$). I am not sure if I am on the right track to prove this. Any hints would be helpful. This is homework.


I was just trying to work out the exponent for $7$ in the number $343!$. I think the right technique is $$\frac{343}{7}+\frac{343}{7^2}+\frac{343}{7^3}=57.$$ If this is right, can the technique be generalized to $p$ a prime number, $n$ any positive integer, then the exponent of $p$ in $n!$ will be $$\sum_{k=1}^\infty\left\lfloor\frac{n}{p^k}\right\rfloor\quad ?$$ Here, $\lfloor\cdot\rfloor$ denotes the integer less than or equal to $\cdot$ .  Obviously the sum is finite, but I didn't know if it was correct (since its veracity depends on my first solution anyway).


I have a cylindrical lens & a surface that can be burned.( for example wood , sheet ,...) In a sunny day , I wanna burn the surface but I don't know the "Energy for burning surfaces" If the $Power$ of sun is $1400 W/m^2$ , could you tell me how can I burn them?


Need help interpreting a passage from an old text on Diophantine equations

I need help interpreting this passage from page 35 of the book Diophantine Analysis by Robert D Carmichael.  "Thus the problem of solving Eq. (1) is reduced to that of solving Eq. (4) for $u$ and $v$ and choosing one of those values for which x and y have the desired characteristic.  But the problem of solving Eq. (4) is identical with that of the representation of a given integer by means of a binary quadratic form.  The plan of this book does not permit the detailed development of this latter subject."  Equation 1 is $ax^2+2bxy+cy^2+2dx+2ey+f=0$ and equation 4 is $au^2+2buv+cv^2=m$.  $u,v,$ and $m$ are defined elsewhere if that matters, but what I need to know is what that bold part is referring to; and that last sentence gives me little reason to believe I can find context in the book to make sense of it.  This is the main part of the book I'm interested in, but I do intend to go through most of it.  It wasn't easy to find a book on the subject and I just checked it out from the library today.


I want to escape single and double quotes and some other characters in JavaScript  String to escape is `dynamic initializer for 'Graphics::CDeviceCMYK::s_WicFactoryBoundData''  I want to pass this as argument to some function.  I tried encodeURI(string);  Its not working. What's the correct way to do this ??


Changing theorem naming while preserving numbering in Beamer

I want to change the name of theorems in beamer, from the preset "Theorem" into "Teorema", while preserving its numbering order alongside with definitions and lemmas. At present I use the code  \setbeamertemplate{theorems}[numbered].  Thank you.


Computing the gradient of quadratic form

If $v$ is an $m$-vector and $X$ is an $m \times n$ full rank matrix, how can I find the value for $n$-vector $s$ that satisfies the following?  $$ \frac{\partial}{\partial s} \|Xs - v\|^2 = 0 $$


Counterexample for $\lim_{n\to\infty} (a_{n-1}-a_n) = 0 \Rightarrow a_n$ converges

I think the equation above is false, but I cannot find a counterexample.  Also, I think that the implication is true when $a_n^2 \to 1$ is also required.  Suppose we have $a_n\in\mathbb{C}\ \forall n\in\mathbb{N}$.  Can you help me?


Wifi Keeps Dropping Macbook Pro 13in Retina Early 2015

I've tried everything I can think of. Resetting the router, changing the channel number and band.   The internet connection is fine, and then just hangs for a minute or 2, then returns to normal.   The wifi icon remains connected, and I have the latest 10.10.4 update installed. At first I thought it was a DNS bug with Yosemite, and have played with the settings such as changing DNS provider, changing the IPV6 to IPV4 only etc.  Driving me nuts. Has anyone had a similar problem? I've checked the surroundings with wifi scanners and have chosen the best channel available.     One thing I have noticed, it seems a lot more reliable on 5GHz as opposed to 2.4Ghz It seems to affect my Macbook Pro Retina 13in Early 2015 a lot more than the other devices on the network. I'm using a Virginmedia  1.


What's the difference between game-based and simulation-based security? When we use the simulation-based, how to construct the simulator based on the adversary?


as part of a larger task I'm trying to print the length of an array in C, i.e how many elements are in an array. The array is an array of doubles, and I want to print a single integer which is how many doubles are in the array. I have this code:  int array_length( double array[] ) {     double length = 0;     length = sizeof(array) / sizeof(double);     printf("%G", length);     return 0; }   and I call it in main like this:  int main( void ) {     double test[] = {1.1,2.2,3.3,4.4,5.5};     array_length(test);     return 0; }   however this returns the error:     error: ‘sizeof’ on array function parameter ‘array’ will return size   of ‘double *’ [-Werror=sizeof-array-argument]   research has told me that   sizeof(array) / sizeof(double);   will give me the length of an array, and I am trying to using "%G" to allow me to print the double that this code returns.  I believe that "double*" means long double, so I tried changing "%G" to "%LG" and all uses of "double" to "long double", but that did not solve the problem. What is going on here?


How to put the character ] inside the short version of caption on list of table?

I'm using winedt and would like to insert something like   \caption [blabla  [-1, 1]V] {blabla  [-1, 1]V...}    in one of the tables, but I do not know how to escape the character ].  I've tried \\] and ]] but it does not work.  Is there any one that could help me with this?


H & R Block did my taxes, and I don't believe the results

I had my taxes prepared by H & R BLOCK. I have for three years. Their payment would always come from my refund.   This year I owe taxes, $1300, and there has to be some type of mistake.  I want to get my tax forms back from them --just my original forms, not any work or figures from them, so I can do it myself.  Am I obligated to pay for their service?


How can I fix chipped paint from the wall?

I've gone and accidentally scratched the paint off my wall. It annoys me. The scratch isn't big, but if I can see it I'm sure everyone can see it. Is there an easy way to fix this chip/scratch without having to sand and repainted the entire wall again. The scratch is tiny... but my OCD is getting the better of me and my eye twitch is getting larger the more I look at it.


Is it possible to alter the y-scaling for only part of a plot?

I've got a tikz diagram that has 6 plot lines on 2 axis. The plot lines all trend from 100 toward 0 on the y-axis, with ticks at 90, 80, ..., 10.  Everything looks okay, however the most interesting part of the data is the part between 10 and 0. It is very difficult to properly make out the data in this part because it is too small, the diagram would be much more informative/readable if this part could be larger than the rest of the diagram.  I could make the whole y-axis logarithmic but this isn't really ideal either for the dataset in question.  Is there a way to have a part of the diagram/plot stretch by more than the rest of the diagram. So i.e. 100-90 will be 1 cm, 90-80 will be 1 cm and so on, but 10-0 will be 3cm.  Note this is not a bar chart, so gluing two separated plots together as in the 'Focusing certain parts of a chart in latex' question would not help here at all. Nor does that question/solution allow for making a part of the plot to scale differently, all it allows for is leaving out a peice in the middle of the plot - I'm not at all sure why it is being suggested that this is a duplicate of a completely different question...  Further explanation via diagram.   I want to stretch the part in the red box as shown by the arrows, while leaving the rest unchanged.  Sample diagram markup as requested.  \begin{tikzpicture}[fill=gray]  %Prevent double labelling at origin \pgfplotsset{ignore zero/.style={%   #1ticklabel={\ifdim\tick pt=0pt \else\pgfmathprintnumber{\tick}\fi} }}  \begin{axis}[   axis y line*=left,   ymin=0,   ymax=104,   xmin=0,   xmax=9.9,   xlabel=units of time,   ylabel=percentage,   y=1.5cm/15,   x=1.5cm,   ignore zero=y,   ]  \addplot[smooth,mark=*,blue]   coordinates{     (0 , 100.000000000000)     (1 , 21)     (2 , 1.28)     (3 , 0.21)     (4 , 0.03)     (5 , 0.004)     (6 , 0.0005)     (7 , 0.00005)     (8 , 0.000007)     (9 , 0.0000008)   }; \addlegendentry{blue}   \addplot[smooth,mark=o,green]   coordinates{     (0 , 100.000000000000)     (1 , 2.004965950432)     (2 , 0.050130282209)     (3 , 0.001303231721)     (4 , 0.000034413136)     (5 , 0.000000916142)     (6 , 0.000000024509)     (7 , 0.000000000658)     (8 , 0.000000000018)     (9 , 0.000000000000)     }; \addlegendentry{green}   \addplot[smooth,mark=*,red]   coordinates{     (0 , 100.000000000000)     (1 , 30.969834976929)     (2 , 11.504103027913)     (3 , 4.422780528370)     (4 , 1.725299638737)     (5 , 0.678378118320)     (6 , 0.268047163678)     (7 , 0.106264332554)     (8 , 0.042226956059)     (9 , 0.016809562633)     }; \addlegendentry{red}   \end{axis}  \end{tikzpicture}


sub and sub-sub item organization system

So I am looking to find the best database design for the following situation. I will refer to my entities as 'articles' as that would best/most-easily describe them.   So the articles have already been created and have  id  | name   | content 1   | aricle1| the frog jumped... 2   | aricle2| Joe met stan... 3   | aricle3| Mikey has never...   Now, I would like to be able to retrospectively make certain articles sub-articles of other articles, and make other articles sub-articles of sub-articles (sub-sub articles). Most articles will NOT have a sub article, but many will.   So essentially it is building lots of little trees, with a presumed max-depth of 5.  I would like to be able to shift a set (articles and all sub-articles) under the domain of another article with (relative) ease.   After having done plenty of reading, I am almost 100% certain anything relating to the nested set model would be overkill and not appropriate.   Other than that however, I don't have much idea as to what is the proper approach here.  Sincere thanks for any help. It is greatly appreciated.


How to make my app singleton application?

I have a application but currently it is not a singleton application. I like to make it singleton application so that its another instance does not exit at the run time .  If this can be done please reply with some sample codes .


How do I destroy the penguin mothership?

Also finally constructing the distress beacon and activating it, a gigantic penguin summoning UFO attacked and quickly killed me. When I returned to my world it was no longer there for me to try again.  So of course I gathered the distress beacon materials again and gave this another go (being more cautious this time). I hit the UFO a few times with my iron hunting bow to very, very little effect. The penguins also took quite a few shots to bring down. I attempted to melee the penguins to kill them faster and was once again killed almost instantaneously.  Before I waste a third distress beacon (finding those materials is a huge pain), what level of armor/weaponry should I have? I've done a bit of exploring on this planet and have found no structures with anything that might help me (save for one empty Apex outpost, still no help).


How do I allocate variable damage to multi-wound models?

Let's say my grav cannons (D3 damage) shoot at some crisis suits (3 wounds each) and the suits fail 3 saves. I roll damage and get a one, a two and a three. Should I have rolled the dice in order? Or can I roll them together and allocate? Or do I roll them together and the other player allocates?  To see how different this could be:   If I allocate, I'll apply the three first, then the one and the two, killing two models If the target player allocates, he'll apply the two, then the three, killing one model. The one then gets applied to a fresh model, leaving it with two wounds. Or, if applied in order, I might have rolled the one first, then the three, then the two. That would kill one model and leave another with one wound remaining.


I was playing in Minecraft in full screen for a while (toggling using F11) and then after a while, I went back to windowed mode (I don't like playing in full screen, I was just testing the functionality of it for... reasons).  However, when I went to maximize the window (not full-screen) I realized the maximize box in the corner had become disabled. I fiddled with full screen a bit more, toggling it in the menu options as well as toggling it with F11, but this had no effect. Restarting Minecraft (closing it completely and re-opening, not just quitting to menu) did fix it however.  Does anyone know what causes this issue, and if restarting Minecraft is the only way to fix it?


Why if I use reference I don't need to deference a vector before using operator [] on it?

If I pass a vector by reference to a function:  void QuadraticInterpolateArray(vector<double> &b) {     double step = 12.2;     for (int j = 0; j < b.size(); j++) {         b[j] = step;     } }   I don't need later to deference b when I need to access to its value by using operator []. Instead, if I pass vector by pointer:  void QuadraticInterpolateArray(vector<double> *b)   I need (*b)[j] later.   In both case I'm passing the "address" of that vector. Why with reference it works and with pointer doesn't? Its just by design?


Seemingly simple, but I cannot find anything relevant on the web.  What is the correct HTML code for an apostrophe? Is it &#8217;?


How to swap elements in a linked list without using collections.swap

I'm a beginner at java. I want to be able to swap elements using index value while using my own method or without using collections.swap import java.util.LinkedList; import java.util.Scanner;  class Main {     private static LinkedList<Integer> llist;   public static void main(String[] args) {     LinkedList<Integer> languages = new llist<>();     Scanner s = new Scanner(System.in);      // add elements in the linked list     llist.add(5);     llist.add(4);     llist.add(3);     llist.add(2);     System.out.println("LinkedList: " + languages);     exchange(3,2);     System.out.println("LinkedList: " + languages);   }      public static void exchange(int i, int j) {     llist.set(i, llist.set(j, llist.get(i))); }    }  Whenever I build this one there is no error that pops up, but when I run it, it gives me the java.lang.NullPointerException.


Blender isn't importing mtl correctly with obj?

I'm a new blender user, but have used other modelling programs before.   I've downloaded a  and unzipped it.   When I import the obj into blender, it is my understanding (from here: ) that the mtl should just import itself with it. However, when I import the obj, I just get a grey model with no texture. Is it actually importing the mtl but I'm not seeing it? Also for the record, I have changed no settings in blender.  Picture for reference:


In $ \triangle ABC$ show that $ 1 \lt \cos A + \cos B + \cos C \le \frac 32$

Here is what I did, tell me whether I did correct or not: \begin{align*} y &= \cos A + \cos B + \cos C\\ y &= \cos A + 2\cos\left(\frac{B+C}2\right)\cos\left(\frac {B-C}2\right)\\ y &= \cos A + 2\sin\left(\frac A2\right)\cos\left(\frac {BC}2\right) && \text{since $A+B+C = \pi$} \end{align*}  Now for maximum value of $y$ if we put $\cos\left(\frac {B-C}2\right) = 1$ then \begin{align*} y &\le \cos A + 2\sin\left(\frac A2\right)\\ y &\le 1-2\sin^2\left(\frac A2\right) + 2\sin\left(\frac A2\right) \end{align*}  By completing the square we get  $$y \le \frac 32 - 2\left(\sin\frac A2 - \frac 12\right)^2$$  $y_{\max} = \frac 32$ at $\sin\frac A2 = \frac 12$ and $y_{\min} > 1$ at $\sin \frac A2>0$ because it is a ratio of two sides of a triangle.  Is this solution correct? If there is a better solution then please post it here. Help!


I am comparing (for an entire day now) two .blend files (one mine and one from ), why linear gradient texture settings that have exact settings aren't the same (or I'm just unable to spot the difference).  The problems is that gradient from my file is much whiter (lower gradient on an image below), causing incorrect height map generation.  Can someone please help solve this mystery for me.     Not the nicest crop but the difference should be clearly visible.  EDIT: I'm using latest Blender (2.76b), while original.blend file was probably created using 2.4x.


How to leave a gap between two objects [Illustrator]

So for a while now I've been wondering how to put a gap between two objects like in the example given. , , between the wings and shield, there is an even gap. Is there a short cut or do I have to go in and move each point individually? its a bit frustrating


I want to uninstall notepad++ but in the terminal I get the message notepad-plus plus not installed. What can I do?

The app is installed and functional but I wanna uninstall it. I've tried through the command line but I get the error message saying "notepad-plus plus" not installed.


How can I disable Windows Defender using the command line?

I am looking for a way to disable Windows Defender on Windows 8/8.1/10 using the command line. Everything I've found so far has involved using a GUI at some point, and this isn't useful for a process I am looking to automate using a script. Thanks in advance.


Why is Cersei commonly referred to as "Cersei Lannister" instead of "Cersei Baratheon"?

I've watched the first two seasons of the TV series, and I'm in the middle of the first book. While reading, I noticed that Catelyn is usually referred to by her married name:     Scarlet-tinged spittle flew from the fat innkeep's mouth as she begged of Catelyn Stark, "Don't kill him here!"   Her maiden name is only used in the past tense:     "I was still Catelyn Tully the last time I bedded here," she told the innkeep.   The same seems to be true for Lysa Arryn (can't find an example right now) and other married ladies. Yet, the book calls the queen by her maiden name:     Cersei Lannister entered behind him, a jeweled tiara in her hair.   Is there an in-world explanation for that? Are the "naming rules" different for the royal couple?


What exactly is $F$ in $W = \int_{a}^{b} F dx$?

I am trying to teach myself some basic physics, here is something I do not really understand about the definition of :  When moving from $a$ to $b$ (in one dimension), the work done is defined to be   $$ W = \int_{a}^{b} F dx $$  Now, say, I lift something up from the floor to a table covering a distance $h$. The work done is supposed to be $mgh$. This result is obtained by setting $F = mg$ in the equation above, which is the force exerted by gravity on the object. However, gravity is not the only force acting upon the object. What about the force used by me to lift the object, why does it not enter the equation?


Prove that $ \frac{x}{y} + \frac{y}{z} + \frac{z}{x}=1 $ has no solutions in positive integers $ x,y,z  $  I got this problem on . They have no solutions about this. I tried to solve it, here my attempt. $$ \begin{split} \frac{x}{y} + \frac{y}{z} + \frac{z}{x} &= 1 \quad \text{multiply by } xyz \\ x^2z + y^2x + z^2y -xyz &= 0\\ x \left( zx+y^2 - xy \right) + z^2 y &= 0 \end{split} $$ From here i need to prove $ xz + y^2 -xz \geq 0 $  but i am failed to do so. How can i prove it further?


Regulatory bodies and authoritative dictionaries for English

Some languages have a "regulatory body" issuing recommendations and guidelines regarding the use of that language.  For example in the case of Spanish it's the  whose status is recognised in all Spanish-speaking countries. The Academy, among other things, publishes a dictionary (""), in print and , which is usually given a lot of prestige (but is not without , of course).  Are there any such authorative—or at least influential—institution(s) or publication(s) for the English language?


Is a variable/arbitrary element a precisely defined mathematical object?

I have been wondering about the formalism of what 'exactly' a variable is, and its role in proofs in mathematics. I have seen a few questions here, such as this one: . However, I have not fully absorbed the responses to those questions, and I believe this question regards somewhat different notions.  Wikipedia defines a variable as "In mathematics, a variable is a symbol used to represent an arbitrary element of a set". There was a great question (and answers') about the role of arbitrary elements in sets, , and it seems to me that per the definition of a variable, it is exactly a symbol to represent some 'arbitrary' element.   My motivation for this question (and my confusion) comes from the role of using arbitrary elements in proofs. I understand that something of the form $P(x)$ is not a statement, it is an open sentence. However, something of the form $P(2)$ is a statement, since we know exactly the mathematical object we are dealing with. For example the statement,  $\forall x \in X. P(x)$ means we have a collection of precise statements $$P(x_1) \land P(x_2) \land P(x_3)....$$  Where now the symbols $x_1, x_2, x_3, ...$ represent a precise and distinct mathematical object, for example the numbers $1,2,3,...$ if the set that we quantify over is $\mathbb{N}$.   The trouble in my mind however is we sometimes have proofs of the form, "Let $x$ be some element in $S$. Then... [reasoning about $x$] $\implies$ [some conclusion]. In this case, we are reasoning about $x$ as we would a particular mathematical object $x_1$, but I don't quite understand how we would do this?   To expand on my doubt: What I am confused by is that for a mathematical object (such as an integer) we have precise and formal definitions/constructions/axioms for these objects. Numbers can be defined in terms of sets, so can ordered pairs, etc. So when we reason about these objects, we are reasoning about some particular well defined 'mathematical object'. But with arbitrary elements/variables, it seems to me that we are saying "OK, this symbol refers to some object in this set, but you don't actually know which one". Since this is the case, how could we construct a definition of such an object, that wouldn't itself need to be expressly defined in terms of ALL the objects it could possibly be? And if indeed it is the case that we cannot, then how can we reason about this 'thing' as if it were a precisely defined mathematical object?   Or does this mean there is some definable set for example, which contains an element $x$ that is an 'arbitrary element' of $\mathbb{Z}$?  My apologies if this question is not a good fit for this stack exchange, I am not sure if this is more related to the philosophy of mathematics, but I have seen a few similar questions on the topic so I thought I would post it here.  EDIT: I had a look at the other question, and I do not believe mine is a duplicate (and I don't think the answers clarified my doubts, though I have perhaps not explained myself properly).  For example in document which the accepted answer quotes of, it says two interesting points: "Roughly speaking, a variable is a symbol for which one substitutes names for some objects, usually a number in algebra. A variable is always associated with a set of objects whose names can be substi- tuted for it. These objects are called values of the variable. (p. 70)" and on another page "There is a subtle quandary here. We want students to have the referents (usually real numbers) for variables in mind as they use the variables. But we also want students to be able to operate on the variables without always having to go to the level of the referent."  However, my doubt is not on what we are doing, or even why we are doing it, but on how we can manipulate this symbol as if it were a referent (as that document puts it). It seems to me a symbol that can be substituted for any elements in a set is different from being an element of said set, so why do we perform the same operations, and use the same logic, on both?


How to replace a string with a string containing slash with sed?

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


Cannot install Ubuntu after creating a 5th partition in Windows

I had a Windows / Kubuntu dual boot. In Windows I added a new partition, however I had 4 partitions already. Therefore I think Windows changed all of my partitions' file systems to NTFS. Then all of the partitions appeared in "This PC". Up to that time I had not understood what Windows did with my partitions. I thought that I probably created two partitions instead of one, so I formatted them as Windows prompted. When I restarted my computer I got into rescue mode with a No such partition error. I repaired Windows with a disk installer. Unfortunately now I cannot install Ubuntu. I have one partition which was ntfs before this mess, where all of my important files are located. I have access to it, and I'm sure it's safe. I want to install Ubuntu, but keep that partition.  In the above screenshot, sdbs and sdc are two USB drives. I cannot resolve where my above-mentioned partition went. I can delete and I resized the sda4 partition in KDE Partition Manager, but when I try to install Ubuntu there I get The ext4 partition creation in sda4 failed. After that a window with following message appears:  ubi-partman failed with exit code 141. Further information may be found in /var/log/syslog. Do you want to try running this step again before continuing? If you do not, your installation may fail entirely or may be broken.


how to copy/move pdf files available in one document library to another library/folder

I have a Document library with PDF files. I am trying to move this file to another document library using SPD 2013 Workflow. But it is not copied to the destination.


Fixing complex syntax highlighting of existing posts

I noticed when reading  that the syntax: <!-- language: lang-foo -->      something in the Foo programming language  is not supported any more. (Why? I couldn't find the reason, but maybe I just missed it.) Yet a very large number of existing questions and answers were written to use that style. What should be done about them? This is a particularly pressing problem on more complex questions about inter-language integration and comparison, as the code snippets are not in a single language determined by the tags on the question. What's more, this style of language indication is going to be fairly common precisely because it was the simplest adaptation of the style that was produced by the post-writing support UI: doing a cut-n-paste job to fix up the highlighting used to be a quick job because it was always pasting whole lines. “Solutions” involving volunteers going through potentially thousands of posts each to find places to fix are non-starters. There's no easy way to search for where the issue might be present, and the amount of effort to apply all the fixes correctly is going to be significant. To my mind at least, it would be easier to reverse the decision to not support the <!-- language: ... --> syntax as that only involves a small number of people having to work and produces things that can be applied across the whole database of posts easily.


So the method is to see if a book exists in the library:   public boolean exists(Book l) {                           for (int i = 0; i < index; i++) {         if (books[i].equals(l)) {             return true;         }     }     return false; }   Output:   Exception in thread "main" java.lang.NullPointerException at Library.exists(Library.java:13)   What am i doing wrong here?   So i got the answer thanks to you guys :) So the problem was that i did not add books inside the library! The method to add books:   public void addBook(Book l) {     if (l == null) {         System.out.println("Book is unini..!");         return;     }      if (exists(l)) {         System.out.println("Book exists!");         return;     }      if (books.length == index) {         Book[] temp = new Book[books.length + 3];         for(int i=0;i<books.length;i++){             temp[i]=books[i];         }         books=temp;     }     books[index++] = l;  }


Script executes fine but randomly crashes with NullRefferenceExpectation

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Zombie_Spawn : MonoBehaviour {     public float timer = 0.0f;     public bool m_spawn = false;     public GameObject m_Zombie;     Vector2 pos;      void Update()     {                 if (m_spawn == true)         {             timer += Time.deltaTime;             if (timer > 2.0f)             {                 pos = Camera.current.ViewportToWorldPoint(new Vector2(1f, 0.135f)); //this executes fine but will Null out randomly                 Instantiate(m_Zombie, pos, Quaternion.identity);                 timer = 0;             }                         }         else         {             timer = 0f;         }     } }


$\{a_n\}$ sequence $a_1=\sqrt{6}$ for $n \geq 1$ and $a_{n+1}=\sqrt{6+a_n}$ show it that convergence and also find $\lim_{x \to \infty} \{a_n\}$

$\{a_n\}$ sequence $a_1=\sqrt{6}$ for $n \geq 1$ and $a_{n+1}=\sqrt{6+a_n}$ show that it convergence and as well find $\lim \limits_{n \to \infty} a_n$  In order to show that that sequence convergence I need to show that :  $$\lim_{n \to \infty} a_n= L$$  While $L$ is finite.  Using the calculator. I assume that L=3 because :  $$\sqrt{6+\sqrt{6+\sqrt{6+\sqrt{6........}}}}=2.999 \cong  3$$  I really don't think that this method is good enough to established that $\lim \limits_{n \to \infty} a_n= 3$ since it based on intuition.  I'll be glad to hear any ideas for an established method to show this.?  Any help will be appreciated.


Gain of an active filter without calculating the transfer function with two OP-AMP's

I need to calculate the gain of the filter without explicitly calculating the transfer function, ie I have to replace the capacitors with an open circuit. The problem is that I've been trying to solve the problem but I do not know how to start. Thanks.


My lens's focus ring can be twisted past infinity and the close-focus stops without ever hitting a hard stop— is it defective?

I have a AF-S Nikkor 50mm 1:1.8 G lens which I use for my Nikon D3100 and D3300 cameras. Today, I noticed that the focus ring can be twisted past the infinity and 0.45m focus stops. It can be turned indefinitely without ever hitting a hard stop. The focus scale indicator stops moving and the focus elements in the lens appear to stop moving, but the focus ring can still be turned without ever stopping. Is this typical, or is my lens defective? I've only had it for about a month.


How to prevent automatic redirection of 404 errors and "incorrect" URLs?

Wordpress has a feature whereby it will automatically redirect your URLs if it percieves them to be written wrongly. Here is an example: I have a page called my-page  If I go to:  www.mysite.com/something/my-page/   it will immediately redirect me to   www.mysite.com/my-page/   as nothing exists at the first URL.   How can I turn this feature off, and instead just get a 404 if incorrect URL's are typed in?


how to fix Error RuntimeException: Unable to start service on a null object reference when use System.exit(0);

i added a sleep timer to close the app after a specified time entered by the user, everything is ok but when the time finishes the app crashes instead of just close. i have a class for the sleep timer and i added the code for closing the app as showing below. it is  System.exit(0); is there is another thing to do to avoid the app crash.?  private void startTimer() {         mEndTime = System.currentTimeMillis() + mTimeLeftInMillis;          mCountDownTimer = new CountDownTimer(mTimeLeftInMillis, 1000) {             @Override             public void onTick(long millisUntilFinished) {                 mTimeLeftInMillis = millisUntilFinished;                 updateCountDownText();             }              @Override             public void onFinish() {                 android.os.Process.killProcess(android.os.Process.myPid());                 System.exit(0);              }         }.start();          mTimerRunning = true;         updateWatchInterface();     }   when the timer finishes the countdown the app crashes instead of close and I saw below error in android studio Logcat.  **com.elmondal.radiomisr:serviceProcess E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.elmondal.radiomisr:serviceProcess, PID: 22920     java.lang.RuntimeException: Unable to start service com.elmondal.radiomisr.service.PlayerService@2112053 with null: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference         at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3686)         at android.app.ActivityThread.access$1600(ActivityThread.java:199)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1681)         at android.os.Handler.dispatchMessage(Handler.java:106)         at android.os.Looper.loop(Looper.java:193)         at android.app.ActivityThread.main(ActivityThread.java:6669)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference         at com.elmondal.radiomisr.service.PlayerService.onStartCommand(**PlayerService.java**:62)         at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3667)         at android.app.ActivityThread.access$1600(ActivityThread.java:199)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1681)          at android.os.Handler.dispatchMessage(Handler.java:106)          at android.os.Looper.loop(Looper.java:193)          at android.app.ActivityThread.main(ActivityThread.java:6669)          at java.lang.reflect.Method.invoke(Native Method)          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)**    in the above error, there is a link for the onStartcommand in the playerservise.JAVA, when i click it it show me below code in the playerservise.JAVA.  @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)     @Override     public int onStartCommand(Intent intent, int flags, int startId) {         streamUrl = intent.getStringExtra(AppConstants.STREAM_URL);         channelName = intent.getStringExtra(AppConstants.CHANNEL_NAME);         startPlayer(channelName, streamUrl);         pushServiceToForeground();         initializePhoneStateListener();         playerService = this;         return START_STICKY;     }


Prove if $n$ is an odd integer, then $3n$ is odd.

So far I have:  Assume $n$ is odd, $n  = 2k+1$ for some integer $k$.  Then\begin{align}3n&= 3(2k+1)\\ &= 6k + 3\end{align}  I'm unsure where to go from here.


Why Looping through ArrayList is same as a regular array?

Method 1  ArrayList<String> list = new ArrayList<String>();  for (String s : list) {     write.append(s);     write.append('\n'); }   How is looping through an ArrayList this way possible? isn't this method only applicable for static usual arrays, for example :  String[] list2 = new String[]{"1","2","3","4"}; ?  If I want to loop over the ArrayList<String> list, why not doing this for example:    Method 2  for (int i = 0; i < list.size(); i++) {     write.append(list.get(i));     write.append("\n"); }   I'm just not understanding how is it possible to use Method 1. Any explanation is welcomed.


Let $R$ be a finite commutative ring with identity. Let $a\in R$ is a root of $p(x)\in R[x]$ . Prove that $p(x)=(x-a)q(x)$ for some $q(x)\in R[x]$ of degree= (degree of $p)-1$.   If $R$ were a Euclidean domain then it is obvious. But $R$ is not necessarily a ED. So what I was trying to do is showing $p(x)\in (x-a)$; the ideal generated by $x-a$.   I tried defining a homomorphism $f:R[x]\rightarrow R$ by $f(x)=a$ and tried to show ker$f=(x-a)$. But when I was going to show it, I felt like showing the same thing that asks in the question. So no success. Can anybody please give me at least a hint? I feel like this is a standard question. So I searched through MSE for similar questions but could not find. If you find a duplicate please copy a link and then I will delete this question.


I have 2D dataset(polygons) on a layer (currently to British National Grid co-ordinates) and I'm trying to transform this dataset from OSGB To Etrs89 using the new model OSTN15 in QGIS 3.10.10 or 3.8. This dataset needs to be transformed from the old model OSTN02 to the new OSTN15. Otherwise, when I upload this dataset into a geoserver the data is offset. Also, when using the WMS layer (basemap - Road 27700) from the Ordnance Survey in QGIS is not displaying the data with new model OSTN15. Does anyone know why is this happening? How can I run a conversion in every coordinate of the data?


Does there exists an entire function $f: \mathbb C \to \mathbb C$ which is bounded on real line and imaginary line?

Does there exists a nonconstant entire function $f: \mathbb C \to \mathbb C$  which is bounded on real line and imaginary line?  Clearly,$ f(z)=sin(z)$ is an example of an entire function which is bounded on real line and $ f(z)= e^z$ is example of a function which is bounded on imaginary line.But I'm unable to find a function which is bounded on both the lines.Any ideas?


I am an absolute beginner with Git and clone. So I cloned a Git repository (see picture). But where is the folder, where can I see the content?


installing proprietary nvidia drivers Kali 2016.2

I managed to render my installation of kali linux 2016.2 useless, so I re-installed it, and started the process over again, following the tutorial found under:   Here are the steps outlined which can be found in that tutorial.  echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" >> etc/apt/sources.list apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y apt-get install -y aptitude  aptitude -r install linux-headers-$(uname -r) apt-get install nvidia-kernel-$(uname -r) aptitude install nvidia-kernel-dkms aptitude install nvidia-xconfig nvidia-xconfig reboot   Since the installion stalled again on the following step,  aptitude -r install linux-headers-$(uname -r)   with following output     Couldn't find any package whose name or description matched "linux-headers-4.6.0-kali1-amd64"   Unable to apply some actions, aborting   I added the recommended repositories to /etc/apt/sources.list  echo "deb http://old.kali.org/kali sana main non-free contrib" >> /etc/apt/sources.list echo "deb-src http://old.kali.org/kali sana main non-free contrib" >> /etc/apt/sources.list echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list   and retried that step, but it still fails and shows the error. I'm totally stuck at this point and I'm not sure what to try next  I figured I have to download the driver manually from NVIDIA this is the file I downloaded "NVIDIA-Linux-x86_64-304.132.run" it is about 69.4 MB large  This is the Info about that driver package: LINUX X64 (AMD64/EM64T) DISPLAY DRIVER Version:    304.132 Release Date:   2016.9.26 Operating System:   Linux 64-bit Language:   English (US) File Size:  66.21 MB  Supported Products reads: ... GeForce 200 Series: GeForce GTX 295, GeForce GTX 285, GeForce GTX 280, GeForce GTX 275, GeForce GTX 260, GeForce GTS 250, GeForce GTS 240, GeForce GT 230, GeForce GT 240, GeForce GT 220, GeForce G210, GeForce 210, GeForce 205 ...  here is the link   So my GeForce 210 is supported by this driver package, but how do I install it manuall and after which step should I do so?  Please help! I will compile everything into a tutorial, so other who have the same errors with kali linux 2016.2 are helped too.  Thanks


How do I evaluate $\lim\limits_{x\to 0} \frac{\sin x}{x}$

How would you find $\lim\limits_{x\to 0} \frac{\sin x}{x}$? I have tried the every method I can think of, but I am not getting correct results.


Basically I am creating a simply game, I want circles to appear but they can not overlap each other when they are printed on the screen. The objects are created and then put into an arraylist and when ever another is created it needs to check its coordinates with all the others already in the arraylist to make sure its not the same. The method to check is called isCollidingWith and there is a setPosition method that actually sets the position. This is what I have.  This is how the object is created, I can't even get one to be created, once I get it working I would create more of these objects, hence the whole point of this.      Circle circle = new Circle(rng,circles);     circles.add(circle);   This is the constructor for the object takes in a random number and and arraylist of circles. It starts with a while loop and sets a position for this circle it then goes into a for loop and checks if it is colliding with and of the other ones, if it is, it breaks and goes back to the top of the while loop and sets a different positions and then repeats checking if it is colliding with any of the other ones already in the arraylist.      public Planet(Random rng, ArrayList<Circle> circles){          boolean key = true;         while(key){          this.graphic.setPosition(rng.nextFloat()*GameEngine.getWidth(),rng.nextFloat()*GameEngine.getHeight());          for(int i = 0; i<circles.size();i++){             if(this.graphic.isCollidingWith(circles.get(i).graphic)){                 key = true;                 break;             }             else key = false;          }          }       }   The problem is I keep getting a NullPointerException at the line in the constructor where it says this.graphic.setPosition. But I am guessing it has to do with the arraylist, because eclipse usually isn't that accurate with error positioning. If anyone could tell me what looks to be wrong here that would be great.


Nested sum of binomial coefficient in closed form

Let $\ell$ be an even positive integer.  Express $$\sum_{k=0}^n\sum_{i=0}^\ell (-1)^i\binom{n}{k}^2\binom{2k}{i}\binom{2n-2k}{\ell-i}$$in closed form.   Is anybody to give a insight, please? [A Path to Combinatorics for Undergraduates] p.192 problem 8.9