Sum of cosines with a multiplicative factor in the angle and different interval

I have found the following formula for the sum of cosines in both  and .  \begin{align} \sum^n_{l=1} \cos \left(\frac{2 \pi l}{n}\right) = 0 \end{align}  I would like to know what the sum would be if there is a multiplicative factor $k$ in the angle.  \begin{align} \sum^n_{l=1} \cos \left(\frac{2 \pi l k}{n}\right) = ? \end{align}  where, $k$ is a positive integer and $1 \le k \le (n-2)/2 $.  Moreover, what if the interval for $l$ is changed from $[1, n]$ to $[0, l-1]$. So,   \begin{align} \sum^{n-1}_{l=0} \cos \left(\frac{2 \pi l k}{n}\right) = ? \end{align}


Strange floating point number operation operation in C#

It's Unity Engine(v2018.1) C#, .Net 3.5 equivalent version.  I got a strange floating point number operation.  The code goes like this.           float   fa = 4.2f;         float   fb = 10.0f;         float   f1 = fa * fb;         int     i1 = (int)(fa * fb);         int     i2 = (int)f1;         int     i3 = (int)42.0f;          Debug.Log(f1);         Debug.Log(i1);         Debug.Log(i2);         Debug.Log(i3);          // Log Result         //         //  f1 : 42         //  i1 : 41         //  i2 : 42         //  i3 : 42         //   i1 is the problem.  Integer type casting gives 41 not 42.  Anybody can give hint about this issue? FP precision or type casting problem?


Can you run more than one Firefox profile instance at the same time?

I was thinking it would be a good idea to run administrative functions in a browser that isn't in the same firefox profile as the one I use for regular browsing.  Is it possible to run more than one firefox profile at the same time on Windows?  When I run firefox -P while firefox is running I just end up with a new window.  Is firefox a singleton on windows?


How to Explode string in mysql and get each value?

I have a string like this 67,73,89. I want to explode all the value and compare each value. In php  I can do it like this  <?php $marks = "67, 73, 89"; $explode = explode(", ",$marks); foreach($explode as $mark){     if($mark > 80)     echo $mark."<br>"; } ?>   Can anyone give me the mysql code so that i can select all the student roll number where marks contains atleast one value > 80. You can use mysql explode function like this...  CREATE FUNCTION explode(str VARCHAR(255), delim VARCHAR(12), pos INT) RETURNS VARCHAR(255) RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(str, delim, pos),        LENGTH(SUBSTRING_INDEX(str, delim, pos-1)) + 1),        delim, '');   Table structure is  ╔═════════╦═══════╦══════════╗ ║ Roll_No ║ Name  ║  Marks   ║ ╠═════════╬═══════╬══════════╣ ║       1 ║ John  ║ 67,73,89 ║ ║       2 ║ Bob   ║ 75,69,80 ║ ║       3 ║ Smith ║ 62,79,92 ║ ╚═════════╩═══════╩══════════╝


I want to create a list of all floats from -100 to 100 with step of 0.1 but it shows an error. nums = [range(-100, 100, 0.1)]      Traceback (most recent call last):   File "<pyshell#1>", line 1, in <module>     nums = [*range(-100, 100, 0.5)] TypeError: 'float' object cannot be interpreted as an integer  Please help!


I bought a power adapter to my printer but the lable on it says output voltage is 32V at 1.56A that means it is going to deliver around 50 Watts to my printer. On the other hand the original adapter used to supply 20 Watts at 32V and 0.625A. my question is would the new adapter, supplying 50 Watts, break down my printer? Thank you


How to enclosure a text block into big square brackets?

everybody.  I need to enclosure a text block into big square brackets.  Something like this (I need to replicate it, more or less):   I've read that it could be possible with tikz but I don't know anything about that package.  Even, I found a code that reproduce something similar but with braces in this post:  The code is this:  \documentclass{article} \usepackage{lipsum} \usepackage[many]{tcolorbox} \usetikzlibrary{decorations.pathreplacing}  \newtcolorbox{rightbrace}{%     enhanced jigsaw,      breakable, % allow page breaks     frame hidden, % hide the default frame     overlay={%         \draw [             fill=none, % fill paper             decoration={brace,amplitude=0.5em},             decorate,             ultra thick,             gray,         ]         % right line         (frame.north east)--(frame.south east);     },     % paragraph skips obeyed within tcolorbox     parbox=false, }  \begin{document}  \begin{itemize}     \item First line           \begin{rightbrace}             \item Second line              \item Third line, which is quite long and seemingly tedious in the extreme             \item Fourth line, which isn't as long as the third            \end{rightbrace}     \item Fifth line \end{itemize}  \begin{rightbrace}     \lipsum[1] \end{rightbrace} \lipsum[2]  \end{document}   How could I put the square brackets around a block of text? (Using tikz, tcolobox or whatever package then can be useful for it).  Thanks for your help.


Cloned buttons not working with click function

In the following snippet I have a input and a delete button next to it. They can be cloned and each delete button has a function that tells me which input is trying to be deleted.  The weird thing is that it works perfectly when I run the snippet.  In my browser the cloned buttons are not calling the function, only the original one does. Also, the title "Remove" appears only on the first button, even when I hover the mouse on any other button.  What could be causing this issue?  I am using the same versions of everything in the snippet.    $("#clone").click(function() {   var currentCount = $("#tablePhones tbody tr").length;   var newCount = currentCount + 1;    $('#tablePhones tbody>tr:last').clone(true).insertAfter('#tablePhones tbody>tr:last');   $('#tablePhones tbody>tr:last').find("input, a").each(function() {     var newId = $(this).attr("id").replace("_" + currentCount, "_" + newCount);     var newName = $(this).attr("name").replace("_" + currentCount, "_" + newCount);     $(this).attr("id", newId).attr("name", newName);     if ($(this).is("input")) {       $(this).val("");     }   }); });  $(".btn.remove").click(function() {   name = $(this).attr("name");   console.log(name); }); td .btn.aligned {   position: absolute;   margin-top: 7px;   float: right;   margin-left: 5px; }  td input {   float: left;   margin-bottom: 10px; }    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">       Clone

     Phone numbers

           <input type="text" name="phone_1" id="telefono1_1" class="form-control" />


How to use MouseListener/MouseAdapter to switch between jpanels

First of all, I don't know how to put this straight and correctly, so bear with my lack of valuable information. Anyhow, I've just started learning Java GUI today and it seems pretty amusing and somewhat simple(if it comes to the basics such as creating a window with objects), yet there are obstacles. What I'm trying to do here is make a simple GUI that containts 2 label, 2 text fields and a button. The 2 lables are X and Y, with respective fields to enter a desired text. The button is used to "concatinate" the entries and add them to a different label then show it in a seperate panel. My code is:  public class Fenetre extends JFrame {     private JPanel p;     private JPanel jpanel;      public JLabel etiq1, etiq2, etiqr;     public JTextField text1;     public JTextField text2;      public JButton button1;       public Fenetre()     {         super();          setLayout(new GridLayout());         this.setSize(300,300);         this.setVisible(true);         this.setContentPane(this.getContentPane());         this.setTitle("X+Y résultat");          jpanel=(JPanel)this.getContentPane();         text1=new JTextField();         text2=new JTextField();         etiq1=new JLabel("X");         etiq2=new JLabel("Y");          jpanel.add(etiq1);         jpanel.add(etiq2);         jpanel.add(text1);         jpanel.add(text2);         button1=new JButton("X+Y");         this.add(button1);         this.pack();         jpanel.addMouseListener(new MouseAdapter()         {             public void mousePressed(MouseEvent e)             {                 etiqr.setText(text1.getText()+text2.getText());             }         });     } }   What I've made so far is the window that contains the objects and a mouseListener to concatinate the two texts into a single one. My question is how do I use the mouseListener to show the concatinated text in a different panel?(Supposdly in the same frame?).


A wrong status of Copy Editor badge is displayed in reviews

When hovering over the badge progress in the review queue, one is able to see his progress towards the badges of a particular review type, as well as Civil Duty, Electorate and Copy Editor. Now, I have the Copy Editor badge on my SO account, however it's progress in the review queue looks like this:   which is wrong since it shows the wrong number.


Is it possible to run my scripts located in ~/scripts from anywhere?  Say i want to run ./scriptname regardless of my current working directory.


why should the bounty not refunded if the question has no answer at all?

Having a bounty open, it's almost five days, but I haven't got any answer. But being said that "All bounties are paid for up front and non-refundable under any circumstances.", neither I am going to get an answer not the bounties back.  Though I have read somewhere in comments, that if there is no risk, everyone would have stared bounties. But isn't it unfair not to get those bounties back for those where there haven't been posted any answers or where none of the answers meets the eligibility criteria? Though you can have bounties disabled for such questions to be started again.   I could have considered deleting the question before starting bounty, but I neither got any comment nor any downvote to indicate if there is a problem with the question.  PS: Had I been Jon Skeet, loosing a thousand bounties wouldn't have mattered :)


This is a 3D view of a 2m x 2m x 2m cube, created by scaling up a standard cube from the grid center. The grey plane are the gridlines. It looks as if the 3D View camera can't pull backward enough. What's wrong?


Does it make sense to put an expensive lens on a cheap camera?

I've spent a while looking at lenses and their prices, and now I'm wondering... Does it make sense to bolt a really expensive lens onto a cheap camera? Or is the extra performance only worth it if you have a similarly expensive camera to start with?  Is it "sensible" to buy a lens that costs 10x or 15x the price of the actual camera?  Or, on the contrary, is it "expected" that the lens is the expensive part?  (If I'm looking at the price list correctly, the £400 "kit" I bought consists of a £150 camera with a £250 lens. So already the lens is more expensive than the camera.)  Or is it that the price of the lens and the price of the camera are completely unrelated numbers, and you're paying for different attributes on each part?


Transferring operating system (Windows 10) to bigger hard drive

I have a lenovo T530 laptop. It currently has 2 SSDs: one in the easily accessible CD/DVD/HD bay, and one somewhere else inside the case which has the operating system installed.  "My computer" reports that the Operating system SSD is 108GB capacity, while the other SSD is 111 GB capacity. Both of the harddrives are filling up and it's a struggle and a juggling act to keep a little free space available.  I had a geeze at the prices of SSDs these days and was delighted to discover that they have come down in price dramatically since I last was shopping around. I would like to upgrade the operating system SSD so that it has between roughly 0.5TB and 1TB space.  Now, my question is: How can I move my operating system to the new harddrive? Is there some software that can mirror the entire contents of my current Operating system harddrive over to the new one? or do I have to completely start from scratch, reinstall windows etc? If the latter, I can't afford to pay for a new windows 10 license, so how would I go about transferring my existing license over to the new install?  I'm not opposed to just starting with a fresh install, but as mentioned, I can't afford a new windows 10 license. So how would I go about transferring my existing license over to the new hard drive?  edit: I should note that my laptop originally came with windows 7 installed, and I upgraded to windows 10 for free back in 2016.  edit: this isn't a duplicate. The linked question has absolutely nothing to do with this question  edit: as mentioned, I am open to a fresh install, but my worry is that i will be barred from activating the operating system and won't be able to transfer my license. I read on another question that these days windows will autoactivate after installation if it recognises your motherboard. Can someone confirm this or provide more information?


Error when removing elements from std::map

I am trying to delete some elements from an std::map. In particular the elements that have      value = 100   should be deleted. However after running the following piece of code a bug occurs. An element with value 100 appears in the remaining map, after the erase(it) method. Where is the bug?   Code:  #include <iostream> #include <map>  int main() {     std::map<int, int> outcomes;     outcomes.clear();      if ( !outcomes.insert( std::make_pair( 10, 1 ) ).second )          return 0;     if ( !outcomes.insert( std::make_pair( 11, 100 ) ).second )          return 0;     if ( !outcomes.insert( std::make_pair( 12, 100 ) ).second )          return 0;     if ( !outcomes.insert( std::make_pair( 13, 100 ) ).second )          return 0;     if ( !outcomes.insert( std::make_pair( 14, 100 ) ).second )          return 0;     if ( !outcomes.insert( std::make_pair( 15, 101 ) ).second )          return 0;     if ( !outcomes.insert( std::make_pair( 16, 101 ) ).second )         return 0;     if ( !outcomes.insert( std::make_pair( 17, 100 ) ).second )         return 0;      std::map<int, int>::iterator it = outcomes.begin();     while(it != outcomes.end())     {         std::cout<<it->first<<" :: "<<it->second<<std::endl;         it++;     }      it = outcomes.begin();     while(it != outcomes.end())     {         if( it->second == 100 )             outcomes.erase(it);         it++;     }     std::cout << "after delete" << std::endl;     it = outcomes.begin();     while(it != outcomes.end())     {         std::cout<<it->first<<" :: "<<it->second<<std::endl;         it++;     }     return 0; }     Result is the following:  10 :: 1 11 :: 100 12 :: 100 13 :: 100 14 :: 100 15 :: 101 16 :: 101 17 :: 100 after delete 10 :: 1 14 :: 100 15 :: 101 16 :: 101


I am building a website and it uses a Netherlands (.nl) domain. This domain is being found when using the Netherlands Google. I'd like the site to be found on all Google's not just country speific such as .co.uk, .com and so on.   I have looked on the Google forums and I've read that you can change the sites geographic position. I have done the nessarary changes to the site but in Google's Console (WMT) there is no select box as displayed by other users.   Screenshot of Google Webmaster Tools (nl)    Question(s):   What do  I need to do so that my site appears in Google's search results in other countries?


Manually copy .ISO to bootable USB (without Bootcamp)

I want to create a bootable Windows USB from my Macbook manually as an alternative to Bootcamp.   I've downloaded the Windows 10 ISO file. Formatted an 8GB USB with MS-DOS(FAT) with a Master Boot Record Scheme within Disk Utility. Question: Can I now finally mount the .ISO and copy it's contents to the USB?   Please don't reference to Bootcamp in your answers.


I want to create a very small sized ubuntu VM, preferably under 1 GB (500 to 700 MB). What is the way to create the smallest distro?  I tried minimal ubuntu but after installing it was also about 1.5 GB.


Difference between differential op amp and comparator

What is the difference between a differential op amp and a comparator? I know a comparator can only give me two values (the supply values).  The differential op amp amplifies the difference between the inputs...but should a comparator not do the same then? What is the specific difference?


Creating a bootable USB to install Ubuntu on a PC with no OS

I want to install Ubuntu 16.04 on my PC through USB. My PC has no OS installed.   How can I create a bootable USB? Is there any file which we just copy to USB and the USB become bootable?


Why doesn't the Gravitational Force causes body to fall towards orbital center moving with constant tangential speed?

Suppose a satellite is orbiting the Earth. The gravitational and centripetal force supposedly point towards the Earth. Therefore, the net force is towards the Earth. Since the satellite doesn't fall immediately towards the earth, what's the third force holding the satellite in orbit? First impression tells me its the elusive "centrifugal force", but I was told to use this with caution as it's often a misnomer. What's the correct line of reasoning behind this?


Derivative of oscillatory integral with absolute value

For the function $F(x) = \int_0^x |\cos(1/u)| du$, I want to determine if the derivative exists at $x=0$ and find $F'(0)$.  I figured this out when the absolute value is removed using integration by parts:  $$\frac{F(h) - F(0)}{h} = \frac{1}{h}\int_0^h\cos(1/u)du = \frac{1}{h}\int_{1/h}^\infty\frac{\cos(x)}{x^2}dx \\= - h \sin(1/h) + \frac{1}{h}\int_{1/h}^\infty\frac{2\sin(x)}{x^3}dx = -h \sin(h) + \frac{1}{h}O(h^2)$$  So $F'(0) = 0$ here.  This breaks down for $F(x) = \int_0^x \cos(1/u)du$.  Thank you for any help.


How to setup a network between two machines via RJ11 Modular Telephone Cable?

I have two machines with RJ11 ports and I had a RJ11 Modular Telephone Cable lying around.I wondered if it was possible to create a network between the two machines with those RJ11 Modular Telephone Cable (back to back via RJ11 ports) much like a network we create between two computers with a single RJ45 Modular connector cable.  Is this setup possible at all ? If it is , what will be the maximum transfer speed i can achieve between these two computers ?


Return opportunities with child opportunities

I'm trying to return parent opportunities that only have 1 or more related child opportunities, but I can't get my query right.   List <opportunity> oppsWithPotentialChildrenToBeUpdated = [Select id, name, stagename, (Select Id, name, stagename From Opportunities__r where stagename = 'Pre-Renewal' and type = 'Renewal')                                                                                From Opportunity o where id in  (Select opportunityId from Opportunities__r where stagename = 'Pre-Renewal' and type = 'Renewal') ];   Error:   Compile error at line 1 column 59  sObject type 'Opportunities__r' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.   I checked the schema in eclipse, and Opportunities ought to work.... I tried Opportunities__r, Opportunities__c, and Opportunity


What is Majestic Myriarch's power and toughness if I "eternalize" it with God-Pharaoh's Gift?

I have a  in play and a  in my graveyard with no other creatures on the battlefield. At the start of my combat, I use the ability of God-Pharaoh's gift to "eternalize" the Myriarch. When it enters the battlefield, what is its power and toughness? Based on the rulings for eternalize, I assume the Myriarch will be a 4/4 with no additional power and toughness (from gatherer, emphasis mine):  The token copies exactly what was printed on the original card and nothing else, except the characteristics it specifically modifies. It doesn’t copy any information about the object the card was before it was put into your graveyard. The token is a Zombie instead of its other types (unlike Zombies created by an eternalize ability) and is black instead of its other colors. Its power and toughness are 4/4. These are copiable values of the token that other effects may copy.  Is this correct? Does eternalize override the variable power and toughness ability of Myriarch?


Special Characters in WCF REST ATOM Feed

I have a WCF ATOM Feed Service using the WCF REST Toolkit with the following UriTemplate  [WebGet(UriTemplate = "{category}/?numItems={numItems}")] public Atom10FeedFormatter GetFeedByCategory(string category, int numItems)   Most cases work, the edge is when I try to load the feed based on the category with a # sign.  I am loading courses for category='C#' and all the service ever sees is 'C'.  Both of these links are doing that. Does anyone know if there is some special way to escape this character in for WCF?


Hello everyone I have JDK 8 installation file but I don,t know how to install it offline. could you help me?


What are the custom roms available in market for android and ios for micromax funbook P 300?

I am working to add custom rom that are available for ios and android,I need to add add custom rom in my android phones, I was using "androios" rom that is featured for both  ios and android, but its not rebooting properly in      micromax funbook p300   Can any one please help me, Regarding Custom Roms that have features of both ios and android, to add in micromax funbook p300.


Under the tutorial c data types it says sign qualifiers can only be used with int and char data types.Why is that? Why can't a float be unsigned?


Prove $(\forall x\ Q(x))\to P ⊢ \exists x (Q(x)\to P)$ using Natural Deduction

I have stumbled upon this predicate logic sequent which I have trouble proving using natural deduction: $(\forall x\ Q(x))\to P ⊢ \exists x (Q(x)\to P)$ I started with ∀xQ(x) → P as the premise. I wanted to start using universal elimination but since the ∀x doesn't cover Q(x) → P completely, I refrained from doing so. I had to assume ∀xQ(x) but when I did, I couldn't reach ∃x(Q(x) → P) out of the assumption's scope. I have also tried proof by contradiction but I couldn't progress. I tried to prove p → q ⊢ (¬p V q) with natural deduction to be able to incorporate it into the solution, but I couldn't prove it either. So, I think I am completely stuck this one. Could you help me prove this (or tell me if this cannot be proved by natural deduction for any reason)? If it helps, I am using the inference rules listed under


Colon character ":" in some file names under Windows 7

I've been revisiting my old hard drive where I backed up my files long ago. I used Ubuntu back then and had no troubles creating files with a ':' (colon) character in their names. Now, however, I cannot access it, nor move or delete, even from terminal.    Is there any way to rename this file under Windows 7?


Terminal Question: Been trying to escape this screen with "^X + Enter" but it doesnt work

I'm transitioning from Windows 10 to Ubuntu 20.04.2 LTS and in Ubuntu I want to work with React Native expo framework which is a framework for hybrid mobile development. I have been struggling to find a proper tutorial to install the expo cli for react native in Ubuntu and have been following a Russian tutorial but I do not know any Russian so just using common sense to guide me soo far.  this is the tutorial I'm following but at 3:10 mark of the video, I have no idea how he got that screen which those checkboxes and i do not understand what they mean either. While testing out different methods to bring the screen up I  mistakenly opened up this and entering the command "^X" followed by the enter key did not work. It just send me to the next line. So how should I escape this screen ? Picture of where I'm stuck:


I cannot recover my Gmail account password in any way. It asks me when I created my account month/year. I have no idea. Also sends verification code and says it cannot identify my account. I also tried with entering last password I remember. Still not functioning. How can I access my e-mail??  Regards


In what canonical instances has Princess Leia been shown to be decidedly Force-Sensitive, or even use any abilities?

It has been said by Yoda that the Force was "Strong" within all the members of the Skywalkwer family, but I personally know of no instances in the main 3 films when she was shown to use any force powers. Considering the films added over the last 5 years, as a casual fan of the extended media, I'm uncertain what remains canon, so if she has been known to develop any Force-specific abilities.  Are there proper, creator approved instances of her using Force powers, or showing her sensitivity to be higher than that of most individuals?  Specific instances (in video, written works, or comic book panels which would be considered canon) would be appreciated.


A photon emitted from a receding source (Doppler redshift) has less energy when detected at an observer's location. Please explain the energy loss from the perspective of energy conservation.


Logging in to StackOverflow without OpenID

I'm asking almost exactly  but this time not because I'm confused with OpenID but because I have it blocked at work so I can only browse SO from work but not ask/answer a question.  Is there any way I could login in StackOverflow without using OpenID or any good proxy you know or use to go through the login at work?


component.find an aura:id item created in aura:iteration

I am building a menu component.  One menu-item is a sub-menu with list of opportunities, this list is created with aura:iteration over a list of opportunities.  When selecting a menu or a sub-menu, I need to make it look selected (change css attribute). For this to happen, I need to find this menu item in my controller.  If I add id attribute to my item markup and use the event attribute on my controller (event.currentTarget.id), I can catch the item itself and change it's style, this works:  MARKUP       <aura:iteration items="{!v.opportunities}" var="opp">
                      {!opp.Name}
 </aura:iteration>   CONTROLLER    openItemFromMenu: function(component, event, helper) {     // get the id     var oppId = event.currentTarget.id;     // choose it (select menu)     var selectedItemNew = component.find(oppId);     selectedItemNew.style = "background: rgb(216, 237, 255);" }   PROBLEM  when I try to change the menu selected not from the click of the item (event that is triggered from another page) - I have added an event handler to change the menu item, and I send the opportunity id through that event. Then (after adding aura:id to my item, I am trying to find this menu item of this oppId with component.find in my controller - this does not work:  CHANGED MARKUP  add: <aura:handler name="eventSelectMenuItem" event="c:myEvent" action="{!c.openItemFromMenu}" /> change:    CHANGED CONTROLLER  openItemFromMenu: function(component, event, helper) {     // get the id from the event     var oppId = event.getParam("recordId");     // choose it (select menu)     var selectedItemNew = component.find(oppId);     selectedItemNew.style = "background: rgb(216, 237, 255);" }   QUESTION  Does component.find for aura:id within an aura:iteration suppose to work?  If not - is there a workaround?  If it does suppose to work - what am I doing wrong?


If $a|c$ and $b|d$, is it true that $ab|cd$?

Determine if this is true or not:  For any natural numbers $a$, $b$, $c$, and $d$, if $a | c$ and $b | d$ then $ab|cd$.  My answer was True, I went:  $a = 2$, $b = 4$, $c = 6$, and $d = 8$. If $2|6$ and $4|8$, then $(2 * 4) | (6 * 8)$.  Is there another way to do it using, for example, a contradiction proof?


1970's sci-fi short story in 4th grade reading anthology

As I remember a boy from another planet was dropped on earth. Gravity didn't affect him as much. He was being chased by something and leaped over a barbed wire fence "like a deer". Also the story started out with a young earth girl at "school", she sat in her bedroom and her books and teachers were on a screen ...cutting edge stuff for a 4th grader in 1974.


No section numbers, but still have PDF bookmarks with hyperref

I have a document that has many sections. I don't want section numbers to show up in the document, but I do want the sections to show up automagically as bookmarks in the PDF using the hyperref package.  I know I can use the \section* command to eliminate section numbers in the document, but this also removes the bookmark. Is there some sort of compromise?


I've got an issue. When (Input.GetMouseButtonUp (0), Speedy script is disabled, thus we cannot enable it again from inside the script like shown below. How can we go around this?  public class  Speedy : MonoBehaviour {  GameObject car;   if (speed == good)     {         GameObject car = GameObject.FindWithTag ("Car");          if (Input.GetMouseButtonUp (0))          {             car.GetComponent<Speedy>().enabled = false;         }          else car.GetComponent<Speedy>().enabled = true;     } }


Why maxwells speed distribution law doesn’t violet special theory if relativity

As per maxwells distribution law the molecule of gas will have speed across zero to infinity with some probability function. I want to know that why the speed above speed of light is possible (i know that its probability will be very less i mean really less, but it would be non zero.). Doesn’t it violet Special theory of relativity?


How to sync between cloud storage without downloading and uploading again?

I use SkyDrive as my main cloud storage, but my teammates mostly using Dropbox. I'd like to know how to sync my files on Dropbox account with my SkyDrive without downloading them first and uploading again. I need both account are always synced on the cloud, so I can access my shared folder on Dropbox via SkyDrive. Please help.


Using Strings in a If, else statements JAVA

I'm trying to make a program that can read whatever the user inputs and checks their input using if..else statement.  import java.util.Scanner;  class Answers{          public void FalseAnim() {             System.out.println("Game Over your answer is wrong. try again!");         }          public void CorrectAnim() {             System.out.println("your answer is correct");         } }  public class quizgame {     public static void main (String[] args) {         Scanner input = new Scanner(System.in);         Answers ans = new Answers();         String strans1;         System.out.println("welcome to the quiz game!");         System.out.println("what is 1+1");         strans1 = input.nextLine();         if (strans1=="two"||strans1=="2") {             ans.CorrectAnim();         }         else {             ans.FalseAnim();         }      } }   every time I run the program and input anything it goes straight into the else statement, even when I input either a "2" or a "two"


Why can't you use the keyword 'this' in a static method in .Net?

I'm trying to use the this keyword in a static method, but the compiler won't allow me to use it.  Why not?


Proof: if $p$ is prime, and $0<k<p$ then $p$ divides $\binom pk$

Question : If $p$ is prime, and $0< k< p$ show that $ p \mid {p \choose k}$  ${p \choose k}$ can be rewritten as:  $${p(p-1)(p-2)\dots(p-(k-1))(p-k)! \over (p-k)!\cdot k(k-1)(k-2)\dots3\cdot2\cdot1}$$  Now the $(p-k)!$ cancels out. Since in the numerator we have k consecutive  integers, k divides one of them (not p as p is prime and $k <p$). Then k-1 divides another one or two terms in the k consecutive terms (again not p). This reasoning continues until  3 and 2.   This means that ${p \choose k}$ can be rewritten as pq implying $p | {p \choose k}$  What if any of this proof is wrong. I am worried about any 'overlaps', i.e. say k-6 divides terms that k-3 divides invalidating the argument.  P.S. I hope the above is legible as I am new to this site. Thank you!


Proper Apostrophe Usage with Initialisms: CCS' or CCS's?

I work with a company whose name is frequently reduced to an initialism (acronym).  Let's say the name is "Cool Computer Systems" (CCS).  I am engaged in an ongoing, bloody battle with the marketing department, wherein they insist the following apostrophe use is correct:  Buy CCS' New Product.  Reading that line brings visions of crying 4th grade teachers and librarians to mind.  I am quite certain that it should be written:  Buy CCS's New Product.   UPDATE: The examples are in title case because the sentence is the subject line of an e-mail.  UPDATE: Their argument is that "Systems" is plural.  I say that plurality doesn't matter, because "Systems" is part of the name.  The name as a whole should be handled as a singular entity, because the company is, in fact, a single, legal entity.  Thus, the possessive form should be written:  The Emperor's clothes Cool Computer Systems's clothes CSS's clothes


How large should a monitor be if you sit 9 feet away

We sit closer to monitors than TVs because we need to concentrate on small text and icons. That is why monitors cause more eye strain than TVs.  I wonder if there is a comfortable monitor for 9 feet distance which causes no eye strain and doesn't interfere with concentration.


Is an apostrophe appropriate for denoting plurality in ABC's?

Should one use an apostrophe to indicate that ABC's is plural or is it incorrect?


Why represent a complex number $a+ib$ as $[\begin{smallmatrix}a & -b\\ b & \hphantom{-}a\end{smallmatrix}]$?

I am reading through John Stillwell's Naive Lie Algebra and it is claimed that all complex numbers can be represented by a $2\times 2$ matrix $\begin{bmatrix}a & -b\\ b & \hphantom{-}a\end{bmatrix}$.  But obviously $a+ib$ is quite different from $\begin{bmatrix}a & -b\\ b & \hphantom{-}a\end{bmatrix}$, as the latter being quite clumsy to use and seldom seen in any applications I am aware of. Furthermore, it complicates simple operations such as matrix multiplication whereby you have to go one extra step and extract the complex number after doing the multiplication.  Can someone explain what exactly is the difference (if there is any) between the two different representations? In what instances is a matrix representation advantageous?


Do I have to stick around to get co-op loot?

I dropped in on a couple co-op games in the beta today and the first thing I noticed was that everyone wasn't running for loot. This is a thing of the past, apparently, as any loot that you can see is yours and yours alone.  That said, is there a limit to when loot drops for me during co-op play? Does it drop when I'm in town or if I'm around but I don't hit an enemy before it's killed?


My tea had expired(?) for about 9 years already, can I sill use it?

is doesn’t say if it’s best before or expiring date  It smelled okay.I saw a blog saying that it’s okay to use it,but I’m a bit skeptical about it.


list-comprehensions problem in python - list dispear after run once

I try to use list-comprehensions see link here:  but it create generator instead of return list And when I try to convert it to list- it work only once, and then the list disappear  values=[3,"fasdf",99]   vv=(str(x) for x in values)   vv  <generator object <genexpr> at 0x047D2F08>  list(vv)  ['3', 'fasdf', '99']   list(vv)  []  values   [3, 'fasdf', 99]


I have a list that I acquired parsing a text file(delimeted by \t and \n) which I eventually have to import into a database:  list = ['1', '1', 'Thurs', '1', 'Snow', '1', 'Rockville', 'Basic', 'Medium',  '1', 'Smith, J.', 'Junior', '5', '1', 'Chicken Noodle', 'Progresso',  'Canned', 'Basic', '1', 'Radio', 'Morning Drive', 'Weekday', '405.18''2',  '1', 'Thurs', '1', 'Snow', '1', 'Rockville', 'Basic', 'Medium', '1', 'Smith,  J.', 'Junior', '5', '2', 'Chicken Noodle', 'Campbells', 'Canned', 'Basic',  '1', 'Radio', 'Morning Drive', 'Weekday', '453.30' ..... list continues]   After each 23 items a new record starts. I though that what I need is to slice 4-5 items with a step of 23. So I am trying the following:  sliceN = slice(14-18) listSlice=list[sliceN:-1:23]   This doesn't work.  I would really appreciate any advise on solving my issue. If there are other better ways to approach it please let me know.


For some background, I'm on Windows 10 however with the files I'm going to talk about I've used them in shared folders with Ubuntu VMs before.  In a folder on my machine, there is a file named '...' I really don't know where this file came from. It was inside a directory which contained one of my programming projects, in which I was using git. However, I cannot delete this file in any means I've tried so far. When attempting a simple right-click + delete, I get the message: "Error 0x80070091 The directory is not empty."   When I attempt to delete from powershell using del or rm, I get the message: "When attempting to del : An object at the specified path C:\Users\mdmil\Concurrency\... does not exist."  I cannot rename the file by any means. When I try to rename from powershell, I get the same aforementioned error. When I try to rename from file explorer, I get a "this file is open in another program" error.  I even got desparate enough to try to share the folder with a Linux VM, and attempt to delete the file via the inode number to no avail.  When I attempt to open the file in notepad++, no file opens. I presume it is because it is trying to interpret it as a directory due to the ... naming.  I'm currently at a loss as to how to fix this. Any help would be appreciated!


Who killed these characters in "Deathly Hallows"?

My question is what happened to       Remus Lupin and his wife Tonks?   Who killed them?  I watched the movies and also read the books but I didn't understand that part.


I know that (I might be wrong):   Symbol for empty or null set :  {Ø} or {} Null or empty set is 'subset of all sets' as well as 'empty or null set' set So, { {} } is same as { Ø }   I just want to know { {} } or { Ø } is an empty set or not ? And if yes then we can conclude that if a set contains a only null set which is by definition always true then it must be a null or empty set.  (Here I am assuming empty and null are same, because I've read that they sometimes taken as different.)


If I have a valid C1 (transit) visa for USA do I require UK transit visa?

I am an Indian passport holder and will be travelling from New Delhi to Lima via London and Miami. I have a short layover of 3hrs in London in going to Lima and while coming back. My questions are:   If I have a valid C1 visa for USA do I still require transit visa (DATV) for UK? My baggage will be checked through to Lima and I will not be leaving the border control area. I will be coming back in 20 days. Since C1 is multi entry, will no visa for UK be still applicable while coming back?


For duplicates that cross main sites, there exists .  However, I think the rules might be different for meta.  Is there a reason for not allowing cross-site duplicates on meta?   seems to be the central point for certain Stack Exchange things, such as general policies.  So, when a question  comes up (or the same thing on , , and ), it would be nice to mark as duplicate of .  At the very least, if "linked", the cross-site duplicates should probably show up in the sidebar.


How can I selectively modify the lines in a file where the modifications depend on analyzing the select lines as a whole rather than individually

TL;DR I need to align the columns of the entries in fstab while ignoring the comments:  /dev/foo              /foo         ext4        defaults   0    2 # comment line 1 /dev/bar /bar ext4 defaults 0 2 # comment line 2 UUID=1234567890     /baz      ext4      defaults   0       2   should become  /dev/foo         /foo  ext4  defaults  0  2 # comment line 1 /dev/bar         /bar  ext4  defaults  0  2 # comment line 2 UUID=1234567890  /baz  ext4  defaults  0  2   in, ideally, one swooping command.  </tldr>  My fstab consists of a large block of documentation in comment lines ending with the field descriptions and finally the entries. There are comment lines interspersed in the entry section.   # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass>  # table entries begin ...   I'd like to align columns in the entry lines using the column -t command or equivalent but want to ignore the comments. If I don't ignore the comment lines, even they will be subjected to alignment. While editing the file in vim, I can visually select the lines from the first entry onward and run '<,'> !grep '^[^\#]' | column -t but grep will filter out the comment lines and as a result, they won't be present in the output, which replaces the selection in vim. I can't run the column command on each matching line individually because column doesn't work that way.  Is there a simple command that accomplishes this task? It need not be achievable in vim as I can simply delegate it to an external command from within.


Can only boot through recovery mood into fresh install :( SOS PLEASE HELP

My computer has an intel cpu and a gtx 1060, after a new install , whenever i try to boot after Ubuntu i just get a black screen of different shades following each other. I can only boot via recovery mode. How can i get this to work. I really need it and i am just so frustrated


Which book involves risky alien spaceship autopilot exploration?

People can take a risk by engaging the autopilot of alien spaceships discovered in an alien space station. Sometimes they strike it rich. Sometimes they die a horrible death. Probably written in the eighties or earlier. I think its an entire series instead of just one novel. Pretty sure its by a big name in sci-fi, too.


Please help test this method I don't undestend how testing this method  public static Weather getWeather(String city){     String KEY = 'My Key';     HttpRequest request = new HttpRequest();     request.setEndpoint('https://api.openweathermap.org/data/2.5/weather?q=' + city + '&appid='+ KEY);     request.setMethod('GET');     request.setTimeout(60000);     try{         HttpResponse response = new Http().send(request);         Weath w = (Weath)JSON.deserialize(response.getBody(), Weath.class);         //strange, but it is necessary          String weather = JSON.serialize(w.weather[0]);                WeatherMain we = (WeatherMain)JSON.deserialize(weather, WeatherMain.class);          Weather fullWeather = new Weather();         fullWeather.name = w.name;         fullWeather.country = w.sys.country;         fullWeather.main = we.main;         fullWeather.description = we.description;         fullWeather.icon = we.icon;         fullWeather.temp = temperature(w.main.temp);         fullWeather.wind = windSpeed(w.wind.speed);         fullWeather.humidity = w.main.humidity;         fullWeather.pressure = w.main.pressure;         System.debug(String.valueof(fullWeather));         return fullWeather;      }catch(Exception ex){         return null;     }    }


I was just making a PDFGenerator for my cross platform Phonegap app.   In the report there are fields like Patient name, Patient number, etc. So I thought it'll be a good idea to store these Patient name, Patient number, etc. in variables and change them for every different person and individual.   I don't know how to print variables in between text. Below is my statement for writing a line of text in between which a variable's text value has to be printed out:  loremipsum ='Ambulatory Blood Pressure Report\nPatient name: <heregoesthevalueofpatientname>'   Please let me know.


Ctrl -C, Ctrl -V not working in different keyboard layout

When I am in English, Ctrl+C, Ctrl+V works fine when I need to copy paste. But when I turn to Greek, Ctrl+C and Ctrl+V and basically no shortcut almost works in Greek.  So each time I have to alt shift and go back to English in order to user Ctrl+C to copy something. How can I apply this to the Greek keyboard profile?  EDIT  I also realized that when using NetBeans IDE 7.4,  I can copy and paste in Greek but I can't use the tonic system of the language over the words. In Aptana studio I can't use Copy and paste Ctrl+C, Ctrl+V When using gedit everything works fine. Different software use different keyboard layout settings?


I've made a script to execute rsync only when $VAR (part of a file path) has some content and in case it's empty the script will stop and return error 1. This is the command: test -n $VAR && rsync -rHptgoz --delete "$ORIGEN$VAR/" "$DESTI" || exit 1  So if before that command I add VAR='' the script should exit but it doesn't. What am I doing wrong?


Here is a beautiful circular paragraph I found in the TeXBook.      I would like to know how it and similar things could be typed.  Here is the code I found the TeXBook which I could not make compile in TeX or LaTeX (even after removing certain parts, trying to make it run on it's own).  \danger \TeX\ looks at the parameters that affect line breaking only when it is breaking lines. For example, you shouldn't try to change the ^|\hyphenpenalty| in the middle of a paragraph, if you want \TeX\ to penalize the hyphens in one word more than it does in another word. The relevant values of |\hyphenpenalty|, |\rightskip|, |\hsize|, and so on, are the ones that are current at the end of the paragraph. On the other hand, the width of indentation that you get implicitly at the beginning of a paragraph or when you say `^|\indent|' is determined by the value of\/ ^|\parindent| at the time the indentation is contributed to the current horizontal list, not by its value at the end of the paragraph. Similarly, penalties that are inserted into math formulas within a paragraph are based on the values of\/ ^|\binoppenalty| and ^|\relpenalty| that are current at the end of each particular formula. Appendix~D contains an example that shows how to have both ragged-right and ragged-left margins within a single paragraph, without using |\leftskip| or |\rightskip|.   I can separate the code for the paragraph on the left from the code for th circular paragraph.    \varunit=0.989pt % getting ready to make circular insert % \varunit=1.078pt was used with amr5: it had more letterspacing \setbox0=\vtop{\null \baselineskip6\varunit \parfillskip0pt \parshape 19 -18.25\varunit 36.50\varunit -30.74\varunit 61.48\varunit -38.54\varunit 77.07\varunit -44.19\varunit 88.39\varunit -48.47\varunit 96.93\varunit -51.70\varunit 103.40\varunit -54.08\varunit 108.17\varunit -55.72\varunit 111.45\varunit -56.68\varunit 113.37\varunit -57.00\varunit 114.00\varunit -56.68\varunit 113.37\varunit -55.72\varunit 111.45\varunit -54.08\varunit 108.17\varunit -51.70\varunit 103.40\varunit -48.47\varunit 96.93\varunit -44.19\varunit 88.39\varunit -38.54\varunit 77.07\varunit -30.74\varunit 61.48\varunit -18.25\varunit 36.50\varunit \fiverm \frenchspacing \noindent \hbadness 6000 \tolerance 9999 \pretolerance 0 \hyphenation{iso-peri-met-ric} The area of a circle is a mean proportional between any two regular and similar polygons of which one circumscribes it and the other is isoperimetric with it. In addition, the area of the circle is less than that of any circumscribed polygon and greater than that of any isoperimetric polygon. And further, of these circumscribed polygons, the one that has the greater number of sides has a smaller area than the one that has a lesser number; but, on the other hand, the isoperimetric polygon that has the greater number of sides is the larger. \hbox to 36.50\varunit{\hss[Galileo,\thinspace1638]\hss} }  \danger \parshape 16 3pc 26pc 3pc 26pc 0pc 24.69pc 0pc 23.51pc 0pc 22.73pc 0pc 22.20pc 0pc 21.85pc 0pc 21.65pc 0pc 21.58pc 0pc 21.65pc 0pc 21.85pc 0pc 22.20pc 0pc 22.73pc 0pc 23.51pc 0pc 24.69pc 0pc 29pc \vadjust{\moveright 28pc\vbox to 0pt{\vskip88pt\vskip-60\varunit   \vskip-3pt\box0\vss}}%


Question count for new and popular questions is 0

There aren't any new or popular questions. There are tons of questions in both of those tabs but the question count is 0 for both of those when I try to view them in the expanded view.


Java null pointer exception on recursive binary tree method

this method is giving me a null pointer exception and I don't know why that is. Is there something wrong with the recursion code?   public void clearAllSelections(){     //Recursively clear all the selections in the sub-tree of this node     //basis:     isSelected = false;     if(isLeaf()) return;      //recursion:     childrenRight.clearAllSelections();     childrenLeft.clearAllSelections();  }


Replace all the string occurance containing escape character in javascript

I have string that is dynamic and need to change along with escape character. Suppose  var key = "Any String"; var term = "^"+key+"^"; var description = description.replace(term,"replacement_string");   it replace only first occurrence and works well.it changes like this:     Lorem ipsum dolor sit amet ^Any String^ and Any String Lorem ipsum dolor sit amet ^Any String^   to     Lorem ipsum dolor sit amet replacement_string and Any String Lorem ipsum dolor sit amet ^Any String^    if I use replace globally then it doesn't work  var key = "Any String"; var term = "/\^"+key+"\^/g"; var description = description.replace(term,"replacement_string");   print like this:     Lorem ipsum dolor sit amet ^Any String^ and Any String Lorem ipsum dolor sit amet ^Any String^   I need to change all occurance of ^Any String^ not if Any String doesn't have ^ then it shouldn't change the word. Result should be like this.     This is a description with replacement_string and Any String also need to change replacement_string


I was watching this  on making a custom UI tab using Python, and in the line from bpy.types import Menu, Panel, UIList, I see the names of objects that look like they can all be used to make different UI elements. Does bpy.types contain all the objects that people use when they want to make custom UI elements?


Did film photography have lens correction counterparts?

Were there ever any tools to correct for lens distortion in the film-only era? I'm thinking a device that contained a lens system that you could alter, or a soft workable lens that you could fine tune, to transform the distorted image back again. Or maybe even something as easy as not resting the photo paper on a flat surface during development.  I haven't heard of anything like this but I'm sure that it was something photographers in certain situations wanted to do.


Gtk skip_taskbar_hint (seen in Glade-ui-Designer) equivalent in Qt

With Glade Designer that lets you set up Gtk-Ui's you can check the option that windows are not shown in the launcher. If I take a look at the ui-file generated by Glade, it says <property name="skip_taskbar_hint">True</property>. In gtk code this hint is  window.set_property('skip-taskbar-hint', True). However I believe that this option is not exclusively Gtk-specific, and want to apply this one on my PyQt4-app. The Ubuntu window manager must be able to receive that hint, otherwise I would see the window of a gtk-application i use (stickynotes-indicator). So there MUST be a way of doing this in Qt or any other language, right?  Does anybody know such an option? Python or Qt syntax, doesn't matter!


Remove labelled emails from Google Inbox

I have an inbox, and a label (let's call it label x). When I get an email that matches the filter for label x, I want it to appear in the 'x' folder, and NOT appear in the inbox. And if possible, not get push notifications to my phone for it.  How can I achieve this in Gmail?  Basically this is for things like confirmations from Venmo or Amazon. Things I don't wanna NOT get the emails for, but things I don't necessarily need to see either.


If we consider $(\mathbb{Z}/120\mathbb{Z})^{\times}$ ?  Using the CRT we have : $(\mathbb{Z}/120\mathbb{Z})^{\times} \simeq (\mathbb{Z}/2^3\mathbb{Z})^{\times} \ \times (\mathbb{Z}/3\mathbb{Z})^{\times} \ \times (\mathbb{Z}/5\mathbb{Z})^{\times}$  By other properties $(\mathbb{Z}/120\mathbb{Z})^{\times}\simeq \mathbb{Z}/2\mathbb{Z}\ \times\mathbb{Z}/2\mathbb{Z}\ \times  \mathbb{Z}/2\mathbb{Z}\ \times \mathbb{Z}/4\mathbb{Z}$  But we know that $(\mathbb{Z}/2^3\mathbb{Z})^{\times}$ is not cyclic and moreover $\gcd(2,2,2,4)\neq 1$ so the product cannot be a cyclic group. Does that mean that $(\mathbb{Z}/120\mathbb{Z})^{\times}$ is not cyclic too ?  Thanks in advance !


When plotting a continuous PDF, the y axis is not a probability of an even (since the probability of any single point is 0), but something that is proportional to probability.  Does this y-axis density have any direct interpretation? Or is it just some value proportional to probability and that's it?


Seeking Indian city points and village boundaries?

I am looking for Indian city/village points and village/Taluk boundaries for India.  A perfect example what I am looking for is  for the State of Haryan, produce by  .  Till now I am little lost, can some body point me in right direction and share some sources from where I can get this data for commercial purpose.  Just for update for all who are following  I have found  that Survey of India has "Village Bdy.Database (#42)". This is exactly what i am looking but till today no response from them.  Any body have some idea how to purchase this layer from them.


I have multiple Schengen visa from Italy, can I transit in Holland for 2 hours before going to Italy?

I have been issued a multiple-entry Schengen visa from the Italian consulate, is it possible to do transit in Holland for 2 hours as I am traveling on KLM?


MySQL 5.7 Unable to run query longer than 900 seconds

I have a long-running query that continues to time out despite having set DBMS connection read time out to 60000. DBMS connection keep-alive-interval has been set to 6000. It still constantly times out. It has to search over 1M records so the time isn't an issue. I'm just having trouble getting the query to run over 900s. The MySql server is running on a virtual machine running Windows server 2012. Any suggestions?


Is it worth getting 50mm lens when I have Nikkor 15-35mm for portraits & "Bokeh" effect?

As I know 15-35mm lens is a good prime all rounder, but from what I have seen in photo examples and youtube videos for portraits (full body person) it's better to have a 50mm lens.  It's also a very cheap lens and small to carry around. What do you think from your personal experience?  Also I really want to experiment with "Bokeh" effect especially now when a lot of nicely lid Christmas trees are appearing in the town :) I know it's possible to have "Bokeh" effect with 50mm when taking close up pictures, whats about my 15-35mm?  Thanks


No matter how many times I try re-installing Linux Mint, I get a GRUB error. How do I fix it?

I have been trying to install Linux Mint 16 Petra using a removable USB thumb drive on my laptop, and after multiple attempts, I get the same error every time:  error: file '/boot/grub/i386-pc/normal.mod' not found. Entering rescue mode... grub rescue>   I tried following the instructions , but absolutely none of it helped.  How do I get my computer to boot?


I have installed sharepoint 2013, my central Administration is not opening properly images and CSS are missing.Help me to solve the issue  Thanks


Why does the volume of the unit sphere go to zero?

The volume of a $d$ dimensional hypersphere of radius $r$ is given by:  $$V(r,d)=\frac{(\pi r^2)^{d/2}}{\Gamma\left(\frac{d}{2}+1\right)}$$  What intrigues me about this, is that $V\to 0$ as $d\to\infty$ for any fixed $r$.  How can this be?  For fixed $r$, I would have thought adding a dimension would make the volume bigger, but apparently it does not.  Anyone got a good explanation?


How do I transfer iPhone contacts to an Android phone?

I know someone who just got an Atrix 4G and previously had an iPhone 3GS. I was asked how he could move his contacts from the iPhone/iTunes onto the Android device. I have never owned an iPhone and have had limited interaction with them. Does anyone know the simplest method of getting iPhone contacts onto an Android device?


Given $X,Y$ are independent Poisson random variables. Distribution of $Y-X$?

Say,$X$~$Pois(\lambda_1)$ and $Y$~$Pois(\lambda_2)$.  Let $Z=Y-X$.  So, $P(Z=z)=P(Y-X=z)=P(Y=z+X)=\sum_{x=0}^{\infty}P(Y=z+x)P(X=x)$.  (Last step, because of independence of ($X,Y$) ).  Thus, $P(Z=z)=\sum_{x=0}^{\infty}P(Y=z+x)P(X=x)=\sum_{x=0}^{\infty}\dfrac{(\lambda_2)^{z+x}}{(z+x)!}e^{-\lambda_2}\dfrac{(\lambda_1)^x}{x!}e^{-\lambda_1}=e^{-(\lambda_1+\lambda_2)}(\lambda_2)^z\sum_{x=0}^{\infty}\dfrac{(\lambda_2)^{x}}{(z+x)!}\dfrac{(\lambda_1)^x}{x!}=e^{-(\lambda_1+\lambda_2)}(\lambda_2)^z\sum_{x=0}^{\infty}\dfrac{1}{(z+x)!}\dfrac{(\lambda_1\lambda_2)^x}{x!}$  I am kinda stuck here, I can't think of any such discrete distribution which takes a form similar to this, the solution to this question gives a hint about the $Bessel's$ function, but I don't know how to tackle this. Can anyone help ?


How to open all files extensions in java?

I've got a studying project about files managment system app in java(client-server- like google drive). One of the features is to open file. you click on a file and it should open. examples of files, doc,exe,txt,jpg.  My question is how do I do it in java? I know how to read/write from txt. but I need a generic code for all kinds of files..


Creating a copy of primary database and attaching the copy database in the same sql instance

I just got into a project in which we have only one SQL Server 2012 copy. We have 12 databases attached to the primary instance of SQL Server 2012.  As I don't have SQL Server 2012 or supporting OS, I have to depend on the primary instance of SQL Server 2012.  I am not sure whether it is good to create copy/clone of all 12 databases and attach it to same instance and work on the copy for data manipulation and query testing purpose.  Based on Kin's query  SELECT    SERVERPROPERTY ('MachineName') AS PhysicalMachineName,    SERVERPROPERTY ('ServerName') AS SQLServerName,    SERVERPROPERTY ('Edition') AS ServerEdition,    CAST(SUBSTRING(@@Version,charindex('SQL',@@version, 1),15) AS VARCHAR(255)) +  ' + '         + CAST (SERVERPROPERTY ('productlevel')AS VARCHAR (50)) + ' + (Build'        + CAST (SERVERPROPERTY ('ProductVersion') AS VARCHAR (50)) +')' AS ProductVersion,     RIGHT(@@version, (Len(@@Version)-charindex('Windows',@@version, 1))+1) AS [O.S.],  SERVERPROPERTY ('Collation') AS Collation   Following is the output. I ignored PhysicalMachineName and SQLServerName.  ServerEdition : Business Intelligence Edition (64-bit) ProductVersion : SQL Server 2012 + RTM + (Build11.0.2100.60) O.S.           : Windows NT 6.1 <X64> (Build 7601: Service Pack 1)  Collation      : SQL_Latin1_General_CP1_CI_AS


"On the lateral surface, there are...": Do I need to use a comma after "surface"?

"On the lateral surface, there are small insertions of brown siderite."  Is there any general rule for punctuating sentences like this? Can you give me a source reference?


Show alert popup on standard page layout on click of standard button "Save"

I need to implement alert popup on standard page layout on click of standard button "Save".How can i achieve it.I tried google but not getting a valid implementation.Any idea would be much appreciated.


It's April 2020 and I am on the WPS Linux page: . I clicked the big blue Download button but nothing happened. I've been searching how to download it through terminal or other ways but couldn't find one. Can someone help?


How to use multiple Python versions on the same System?

I am trying to install  which requires python < 2.7  I want to be able to use this software and yet not uninstall the newer version of python from my system and mess up any other programs that might be using it.  How can I install the above in my current setup?  A similar question exists here but does not have a valid answer -


Can some words serve as both adjective or adverb?

In the following sentences:   I can move quicker than she can. She moves quickly, but I can move quicker still. Between us, I move quickest. Between us, I move quicker. I am even quicker than she.   I am apparently trying to modify the verb "move" with the adjectives "quicker" and "quickest".    It seems to me that I have been speaking like this all my life, but just now I've been told that adjectives may not modify verbs, and that these sentences are grammatical garbage.  Yet, when it comes to:  I can move quicker than she can.  vs  I can move more quickly than she can.  The first sentence sounds just as good as the second, to me, at least.  Cannot the word "quicker" serve as both adjective and adverb?


How do I sort a multidimensional array by one of the fields of the inner array in PHP?

Suppose I have an array that mimics a database table. Each array element represents a row, and within each row is another array that contains the field names and values.   Array (     [0] => Array         (             [name] => 'Sony TV'             [price] => 600.00         )      [1] => Array         (             [name] => 'LG TV'             [price] => 350.00         )      [2] => Array         (             [name] => 'Samsung TV'             [price] => 425.00         )   }   What I want to do is sort the rows (outer array elements) by price. Below is an example of what I want to achieve:  Array (     [0] => Array         (             [name] => 'LG TV'             [price] => 350.00         )      [1] => Array         (             [name] => 'Samsung TV'             [price] => 425.00         )      [2] => Array         (             [name] => 'Sony TV'             [price] => 600.00         )         }   As you can see, I don't need to preserve the keys of the outer array.


I wanna write something quite simple, namely: 10 10 10 9 9 8 8 6 6 4 4 10 10 10 9 9 8 8 6 6 4 4 I tried the following code: \begin{matrix} 10 & 10 & 10 & 9 & 9 & 8 & 8 & 6 & 6 & 4 & 4\\ 10 & 10 & 10 & 9 & 9 & 8 & 8 & 6 & 6 & 4 & 4 \end{matrix}  However upon compilation the last "4" standing at the end of each row gets shifted to the next row standing all by itself so I get something like this: 10 10 10 9 9 8 8 6 6 4 4 10 10 10 9 9 8 8 6 6 4 4 I would like to avoid this behaviour and force the "4" in the position. Thank you very much in advance


Edge offset evenly spaced around an asymmetrical object?

Given a rectangle with a subdivided mesh, if I edge select around the rectangle and scale outward (on the X/Y in this case) it will not scale the edges evenly. The distance from the rectangle to the final landing space is uneven (see screenshot). How do I scale an asymmetrical object evenly, so that the sides are equidistant to the origin? Note, I extruded the selection first so you can see the uneven sides more easily post X/Y scale.


I am trying to sort list in Python in the ascending order.  Below is my code -   children=zk.get_children("/my/example", watch=my_func) print(children)   So the above print statement will print out something like this -   [u'test2', u'test1', u'test3']  or  [u'test3', u'test2', u'test1']   or in any order..   Now I need to make sure that after sorting it should look like this in the ascending order  [u'test1', u'test2', u'test3']   Any thoughts how this can be done efficiently in Python?  NOTE: name will always be starting with test and then followed by some number.


There is some way in the SO site to list only the questions from my favorites tags?   I can access the list of all questions here , and also I can access the list of all questions from one specific tag, i.e. from JS tag in here ., but there is a way to list all the questions from all my favorite tags?  If it's not, it's possible to implement this?


Sugar daddy giving his bank account info

Theres an app to find snapchat friends. And there is a guy wanting to be my sugar daddy. We havnt met let alone even talked. And he asks if he can trust me. And i say yes. So he gives me his bank account information to pay of credit in paypal. Im pretty sure its gotta be a scam. But i just wanted to say what you guys think.


I have been struggling with a keyboard problem recently and I didn't find a solution yet. When I login to my user account (standard user) my Fn keys are enabled by default, i.e. my typing outputs the Fn values instead of the corresponding key values (only for the keys that are associated with Fn values).  I can circumvent this issue: if I plug and unplug an external USB keyboard the problem disappears. Unfortunately it only lasts until the next login.  It is possibly worth mentioning that this only happens with my standard user account and not with my administrator account.  Has anyone encountered this problem and corresponding solution?  Environment:   Ubuntu 16.04 (I can also reproduce this problem with elementary OS loki) Acer e11 aspire Unity Desktop


Here's my method:  p.show = function(message, status, timer){      //do stuff };   Is there a way, so that if vars such as timer are not passed in, to have a default for them, e.g, true.  In php I would do it like:  private function show(message, status, timer = true){ }


Is there a sensor for counting the number of cards in a flipping scorecard?

I have a stack of cards and want to know how many cards are in the stack at any given time.  Any thoughts on how I might be able to do this?  Would it be possible for me to put a tag on every card and then use some type of sensor below the cards which could count the tags above it? The cards are suspended from rings like this:    While there was a prior question that was similar, it does not appear there were any answers that came out of that question.


As a developer, how do I uninstall a click package for Ubuntu Touch / Ubuntu Phone?


Why Michael, 's host at the start of each video says "Michael here" instead of "Michael is here"?   Is it grammatically correct or just a slang / simplified way of speaking?


Is energy expended when a force is exerted on a object?

Energy is expended when a person exerts force on a object.   1) From the equation Work Done = Force x Distance, if a force is exerted, but no distance moved, then no work is done. Hence, the statement is false?  2) However, when a person exerts a force, isn't  he expending chemical potential energy? In other words, there is an energy change from chemical to thermal. Hence, the statement is true?  I am not sure which of the above is right.


Is $f(x)=\dfrac{x^3}{x}$ really the same as $x^2$? At $x=0$, $f(x)=\dfrac{x^3}x$ is undefined.  So then why can't I just say $f(x) = \dfrac{x^3}{x} = x^2$ therefore $f(x)=\dfrac{x^3}{x} $  at $x=0$ is $0$ and not undefined!


How can I obscure email addresses on websites to prevent spam?

I know this is a bit broad, but the questions is how can I obscure my email from spam bots?  What are the pros and cons of each method?


How can this implication be true? "$1>2 \ $ implies $ $ 'vegetables are healthy'."

In mathematical logic, implication has the following truth table    where $\phi$ and $ \psi$ are statements, and $1$ represents true and $0$ false.   From this table, an implication such as   "$1>2 \ $ implies $ $ vegetables are usually healthy"   is true. (Unless, I'm mistaken.)    But surely, this implication is nonsense, so how can we even begin to talk about its veracity?  Doesn't mathematical logic bother with the "meaning" behind an implication?  What is the rationale behind the above truth table?   Thanks


In Duke Nukem: Manhattan Project, it can be seen that G.L.O.P.P. (Gluon Liquid Omega-Phased Plasma) mutates alligators, rats, pigs etc. into giant monsters. But, when I (Duke) am attacked with green-colored GLOPP by some monsters, only my health point is affected and I don't see any sign of mutation. Why? Duke doesn't wear any kind of armor to protect his DNA from exposure.


What's stopping two independent observers from measuring the speed and position at the same time, separately?

From      This means, it doesn't take into account, the Uncertainty Principle of   Quantum Mechanics, which says that an object can not have both a well   defined position, and a well defined speed: the more accurately one   measures the position, the less accurately one can measure the speed,   and vice versa.   Why can't two people agree to measure the same particle?  One measures the speed and the other the position.  I suppose it raises the question - how do you "agree" on which particle to measure.  But that may be part of the answer to this question.


So, I have 10 CPU core and 20 data to process. I want to process the data in parallel but I am afraid if I just process 20 at once it will make some problem. So, I want to process 10 data 2 times. Is there any command to do this?  Add info:  The data are in file format. It is quite huge, per file can reach 10GB. In my expreience if I launch more than 10 process, the PC will become really slow and even lag. So I am limiting the process to be only 10 which is equal to the number of cores. As for my RAM, I believe the software which process the file will not load everything at once so the RAM usage is quite low. That is why I just need to parallel the process for every 10 data. For now, I generate 10 shell script which execute parallel and each shell script contains sequential command.


as written , I should put this lines:  deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse   on the top in my /etc/apt/sources.list file, and this should be all that is needed to make it automatically pick a mirror for me based on my geographical location.  because the file sources.list is read-only, what should I do? tried $ sudo mount -o rw,remount /etc/apt/sources.list but it wasn't found..


The following code generates NullPointerException in Android.   searchResults.setText(searchResultString);   Where:   searchResults is a TextView searchResultString is a String   Can somebody list out the possible reasons why this may be happening?


How to use different domains for multilingual sites and keep users logged in?

I have a site that is in French and English. I am able to successfully setup so that users can switch back and forth between the two domains to view either language, however I cannot seem to keep users logged in. When they are logged into the english domain and then switch to the french domain they are required to login again. However if they switch back to the english domain they are still logged in.  As an example we'll use www.english-domain.com as the base (default) domain and www.french-domain.com as the secondary domain  In settings.php I have modified the following, however it doesn't seem to be keeping them logged in. Am I missing something?  /**  * Drupal automatically generates a unique session cookie name for each site  * based on its full domain name. If you have multiple domains pointing at the  * same Drupal site, you can either redirect them all to a single domain (see  * comment in .htaccess), or uncomment the line below and specify their shared  * base domain. Doing so assures that users remain logged in as they cross  * between your various domains.  */ $cookie_domain = 'english-domain.com';   Note: That I have also flushed both site and browser cache as well as deleted any cookies left on my machine.  Update:  Here are my language settings:


What should be the correct form of 'be' verb in the following sentence?

So I was asked to rewrite the following sentence with the correct tense of the verb given in bracket: It is I who (be) to do it. Initially I believed, the following would be correct: It is I who has to do it. But after researching for a while I think I am wrong and the has verb needs to be replaced with am. Any suggestions?


Solo player: best way to mitigate tiny party size?

I'm looking to start a solo DnD adventure with my wife as the only player. She's a total novice.  Which is generally the most successful way to handle the single-PC issue in your experience:   NPC party/partner 100% solo adventurer Multiple PCs controlled by single human player   I'm inclined to think one of the first two, given her lack of experience, but I'm curious if there are successful ways to use the third option or any combination thereof.  Edit: I am primarily considering 5e or 3.5e/Pathfinder.


Here Is the Console Log  root@raspberrypi:/home/pi# java -jar /home/pi/keypad.jar Exception in thread "main" java.lang.reflect.InvocationTargetException         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.lang.reflect.Method.invoke(Method.java:483)         at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: java.lang.NullPointerException         at me.Andrew.Keypad.GPIO.GPIOMethords.setupPins(GPIOMethords.java:33)         at me.Andrew.Keypad.Listener.ButtonInput.ButtonListener(ButtonInput.java:45)         at me.Andrew.Keypad.Listener.ButtonInput.start(ButtonInput.java:22)         at me.Andrew.Keypad.Main.main(Main.java:15)         ... 5 more root@raspberrypi:/home/pi#  unavailable)   Here is the code  GPIOMethords  public class GPIOMethords { public Main MA; public Settings settings = new Settings(); final GpioController gpio = GpioFactory.getInstance();  public HashMap<String,GpioPinDigitalInput> ColPins = new HashMap<String,GpioPinDigitalInput>(); public HashMap<String,GpioPinDigitalOutput> RowPins = new HashMap<String,GpioPinDigitalOutput>();  public void setupPins(){     if(ColPins.isEmpty()){         ColPins.put("1",gpio.provisionDigitalInputPin(settings.Col1));         ColPins.put("2",gpio.provisionDigitalInputPin(settings.Col2));         ColPins.put("3",gpio.provisionDigitalInputPin(settings.Col3));         ColPins.put("4",gpio.provisionDigitalInputPin(settings.Col4));     }     if(RowPins.isEmpty()){         RowPins.put("1",gpio.provisionDigitalOutputPin(settings.Row1));         RowPins.put("2",gpio.provisionDigitalOutputPin(settings.Row2));         RowPins.put("3",gpio.provisionDigitalOutputPin(settings.Row3));         RowPins.put("4",gpio.provisionDigitalOutputPin(settings.Row4));     }     MA.store.ColPins = ColPins; // line 33     MA.store.RowPins = RowPins; }   }   Main   public class Main {     private static Main instance = null;      public Settings set = new Settings();     public static Methords Meths = new Methords();     public GPIOMethords GPIOMeths = new GPIOMethords();     public Storage store = new Storage();      public static void main(String[] args) {             Meths.buttonIn.start();      }     public static Main getInstance() {           if(instance == null) {              instance = new Main();           }           return instance;        }  }   Settings  public class Settings { public String Code = "ABCD";  //Define Row Pins! public Pin Row1 = RaspiPin.GPIO_00; public Pin Row2 = RaspiPin.GPIO_01; public Pin Row3 = RaspiPin.GPIO_02; public Pin Row4 = RaspiPin.GPIO_03;  //Define Col Pins! public Pin Col1 = RaspiPin.GPIO_04; public Pin Col2 = RaspiPin.GPIO_05; public Pin Col3 = RaspiPin.GPIO_06; public Pin Col4 = RaspiPin.GPIO_07;  }


Writing string at the same position using Console.Write in C# 2.0

I have a console application project in C# 2.0 that needs to write something to the screen in a while loop. I do not want the screen to scroll because using Console.Write or Console.Writeline method will keep displaying text on console screen incremently and thus it starts scrolling.  I want to have the string written at the same position. How can i do this?  Thanks


Is this news article about quantum radar legit?

From      In principle, a quantum radar functions like a regular radar — only   that instead of sending out a single beam of electromagnetic energy,   it uses two split streams of entangled photons. Only one of these   beams is sent out, but due to a quirk of quantum physics both streams   will display the same changes, despite being potentially miles apart.   As a result, by looking at the stream which remains back home it’s   possible to work out what has happened to the other beam.   Wouldn't this imply faster-than-light information transfer? Is there any way that the interactions of a remote particle can influence a local entangled particle?


What is the difference between {get;} and Readonly in the following C# code?  String name { get { return "Tom"; } } const String name = "Tom"; readonly String name = "Tom";   please explain with simple problem or any reference.


Evaluate $ \int \frac{(\cos^3x)}{(\sin^2x)}dx $

How do you integrate the equation $$ \int \frac{(\cos^3x)}{(\sin^2x)}dx $$ using U substitution?


Context : I simply add a image to the VSE and render an image in the original resolution and format here being PNG. Problem : The rendering of the image in the VSE changes colors as you can see on this picture :  The Right picture is the original and the left one is the vse rendered. We can clearly see that the colors have changed. Can anyone explain why this is happening ? And give a solution so that colored aren't changed. Thanks.


GTK - Enable/set dark theme on a per-application basis

Is there a way to set gtk-application-prefer-dark-theme for an application?   This is normally set in the code by the application. Apps such as Eye of Gnome and Totem turn it on. I want to, as a user turn it on, on a per application bases.  For gnome-terminal, I normally use a white text on black background color scheme, and having the dark window border would improve the overall look.  I also want to turn it on for vlc.


Why did it take so long for Jacob to recover his supposedly happy memories?

In "The Crimes of Grindelwald" it answers :  NEWT: But you were supposed to have been Obliviated! JACOB: I know! NEWT: So . . . But . . . JACOB: It didn’t work, pal. I mean, you said it, the potion only erases bad memories. I didn’t have any. I mean, don’t get me wrong, I had some weird ones. But this angel . . . this angel over here, she filled me in on all the bad parts, and here we are, I guess, huh?  But why did Jacob seemingly forget Queenie until they were reintroduced? If it's completely true that the potion only erases bad memories, why would he be confused at the end of the first Fantastic Beasts? He should have immediately remembered Queenie?


Recover data from a formatted windows hard drive

dont know if its right to post on here but i have a bit of problem.  I had a windows 8 laptop and partitioned it into 4 partitions. Now i had reserved one partition for a linux installation. I had a disc of linux mint and installed it on the laptop selecting the partition. when i restarted my machine i found out that all the 4 partitions had been wiped and linux mint had all my disc space. now i am trying to recover the data.  My windows PC does not recognise the hard drive, is there any way to get this data? i have some windows programs to recover data but the hard drive just wont get detected. please help!   how can i recover this data.


Filename for the front page template file

How do I create a theme for the front page only? I only want to change what is in the content area but leave the rest of the stuff the same from page.tpl.php.


bash + divide number with round number to up or down

I want to convert 8874M to GIGA so I did this    echo $(( 8874 / 1024 ))   but actually we get 8 ( while exactly results is 8.6 )  so what need to change in order to get the 8.6?


Changing subject and verb positions in statements and questions

We always change subject and verb positions in whenever we want to ask a question such as "What is your name?". But when it comes to statements like the following, which form is correct?        I don't understand what are you talking about.   I don't understand what you are talking about.      Another example        Do you know what time is it?   Do you know what time it is?      Another example        Do you care how do I feel about this?   Do you care how I feel about this?


Low quality flag with bounty. Flag declined

This 100 points bonty  was flagged with      no effort is shown at all    and declined   how can we other way make SO better?  I have downvoted this question, but cannot delete it.  Is this question really ok?


how to know about a package as its a main package or dependecies to other package ?

I would like to know about package information as i have mentioned in my Question .   For example , There is a installed package in my system . So i want to know whether its a main package or dependency to some other package .  Thank you .


I have created UV textures for lip-syncing, but I do not know how to change the textures with keyframes. So say I want to go from a neutral face to a transition face on the next 5 frames to a speaking face. How would I do this?  Edit: I am using Blender Render. Here is a screenshot:


This is the problem I found back in the first year in the university.  Suppose we have a non-degenerate (i.e. not a point and not an empty set) ellipse $E\subset \Bbb R^2$. Now define a set $D$ by a property $$(x,y)\in D\iff \text{tangent lines to }E \text{ through} (x,y)\text{ are orthogonal}.$$ We are to completely describe $D$ in terms of characteristics of $E$.  The answer is (don't look if you don't want spoilers)       that $D $ is a circle with the same center as $E$. Its radius is $\sqrt{a^2+b^2}$ where $a$ and $b$ are short and long radii of the ellipse.   The proof I found back then used coordinates and required a lot of boring algebraic maniplations. I wonder if there exist an elegant (definition of elegance is up to you) solution to this problem.


Is it possible that all parameters are highly significant?


is "$a^0 = 1$" a definition or there exists a proof?

I'm interested in knowing whether $a^0 = 1$ ('$a$' not zero) is a definition. If not, can anyone please help me with proving this?


If I am having a line as:  Thhiisss iisss mmyyy nameeee   I want to print this as:  This is my name   What is the unix command for this?


Unicode encoding doesn't work, after enabling UTF-8

I've been trying to make Unicode encoding work on my website, every time I post this symbol "😄" the result after submit is "?".   I am using this to enable UTF, and I am using cakephp framework.  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   Update: It only doesn't work on dynamic element posted via Javascript.


Java: Why does my display method give me a NullPointerException?

import java.awt.*; import java.util.Random; import java.util.Scanner;  public class B5_010_Pascal_Boyer  {      public static void main(String[] args)      {             java.util.Scanner scan = new java.util.Scanner(System.in);             System.out.println("Enter number of rows of Pascal's Triangle");             System.out.print("you would like to see displayed");             int input = scan.nextInt();             int[][] matrix = { {1}, {1,1} };              while ( input > 1 )             {                 matrix = pascalTriangle(input);                 display(matrix);                 System.out.print("Enter the number of rows: ");                 input = scan.nextInt();             }             System.out.println("thank you - goodbye");          }      private static int[][] pascalTriangle(int n)     {          int[][] temp  = new int[n +1][];         temp[1] = new int[1 + 2];         temp[1][1] = 1;         for(int i = 2; i >= n; i++)         {             temp[i] = new int[i + 2];             for(int j = 1; j > temp[i].length-1; j++)             {                 temp[i][j] = temp[i-1][j-1] + temp[i-1][j];             }         }            return temp;     }      private static void display(int[][] temp)      {         for(int a = 0; a < temp.length; a++)         {             for(int b = 0; b < temp[a].length; b++)             {                 System.out.print(temp[a][b] + "\t");             }             System.out.println();         }             }  }   when it is run it prints:   Enter number of rows of Pascal's Triangle you would like to see displayed **3** Exception in thread "main" java.lang.NullPointerException     at B5_010_Pascal_Boyer.display(B5_010_Pascal_Boyer.java:52)     at B5_010_Pascal_Boyer.main(B5_010_Pascal_Boyer.java:20)   I know what a NullPointerException is, however I have been looking at my code for a while and I have no clue as to why I am getting this error.  I am really not even sure that my code to create the triangle even works because I have not been able to print it. The goal of my code is to create a 2D array that is Pascal's triangle however I do not want to Format it so it is shaped like an actual equilateral triangle, but more of a right triangle. If someone would take the time to help me I would really appreciate it.  Line 52 in the code is: for(int b = 0; b < temp[a].length; b++) and line  20 is: display(matrix);


Not able to access my server using public IP

I am using TP Link router and local internet provider GTPL. I have server on which I am hosting my website but not able to access it using public ip. I am able to access in same lan with local ip like http://10.167.53.249:8080/ http://192.168.0.106:8080/ **But not with below** http://103.250.136.166:8080/  Please see my router configurations in following screen shot.


90's-2000's animated series: protagonist with robotic hand can transform a seemingly antique motorcycle into a hoverbike

I can remember only a few things regarding the show, as it was long ago, and probably late at night.  However, I do remember it had to be a series, because it ended on a cliffhanger, and it was animated, and it was on the T.V. I had an antenna, not cable or satellite at the time, so I'm thinking it was on Fox or ABC or CBS or PBS or something like that, sometime between the late 90's and the early 2000's. I remember the protagonist had something of a metallic/robotic hand, which he used as something of a key to access alien devices and converse with a motorcycle he received during the episode I watched. The motorcycle looked like an antique out of Indiana Jones and the Last Crusade, and would function normally, unless you "knew how to ask".  I remember in one chase scene, the protagonist could not get away until he held his hand over something that looked like a glass disk embedded in the gas can, and asked, "Please".  Then the motorcycle transformed into a hoverbike and got the protagonist out of the tight spot. I remember the episode ended when he went to something of a below-ground alien house, ship or bunker, but I don't remember much else.


Give an example  of  a  sequence  $(A_n)$  of connected subset   of $\mathbb{R}^2$  such that   $A_{n+1}   \subset A_n$ for  $n \in  \mathbb{N} $  but $\bigcap\limits_n A_n$ is not connected    My attempt : I take  $A_n=(-\frac{1}{n}-1,\frac{1}{n}+1)$ but $\bigcap\limits_{n=1}^{\infty} (-\frac{1}{n}-1,\frac{1}{n}+1) = (-1,1).$ which is  connected  Actually im not able to  find  the  example  that  $\bigcap\limits _n A_n$ is not connected?


Is there a gravitational force among antiparticles?

Is there a gravitational force between antiparticles? For example,  between two antiprotons. Do the antiprotons repluse each other?


I'm having issues with the placement of the values in my tree, i'm not quite sure whats the cause of it. Any help is appreciated.  \documentclass{article} \usepackage{mathtools} \usepackage{newfloat}  \usepackage{caption} \usepackage{subcaption} \usepackage{tikz} \usepackage{tikz-qtree}  \begin{document}  \begin{figure} \centering \begin{tabular}[t]{|c|c|}\hline   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 ][.2 ][.1 ]]     \caption{i=1, (Q = \{5, 2\})}   \end{subfigure} &   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 [.5 ][.6 ][.5 ]][.2 ][.1 ]]     \caption{i=2, (Q = \{2, 6\})}   \end{subfigure} \\\hline   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 [.5 ][.6 ][.5 ]][.2 ][.1 ]]     \caption{i=3, (Q = \{6, 4\})}   \end{subfigure} &   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 [.5 ][.6 [.8(GOAL) ]][.5 ]][.2 [.4 ][.2 ][.1 ]][.1 ]]     \caption{i=4, (Q = \{4\})}   \end{subfigure} \\\hline \end{tabular} \caption{BFS S,R,L} \end{figure}  \end{document}


Force download with Swedish characters (åäö) filename

I use the following code and function to force download files and it works great if the file name is not holding Swedish characters like Å Ä Ö.   $file_id = $_GET['f'];  $sql =  " SELECT * ".             " FROM attachment ".             " WHERE attachment_id = ".$file_id." ".              $res = mysql_query($sql);             $row = mysql_fetch_array($res);             $filename = $row['filename'];             $USER_ID = $row['user_id'];             $Directory_id = $row['directory_id'];             $target_path = "upload/".$USER_ID."/".$Directory_id."/";   function Download($path, $speed = null) {     if (is_file($path) === true)     {         $file = @fopen($path, 'rb');         $speed = (isset($speed) === true) ? round($speed * 1024) : 524288;          if (is_resource($file) === true)         {             set_time_limit(0);             ignore_user_abort(false);              while (ob_get_level() > 0)             {                 ob_end_clean();             }              header('Expires: 0');             header('Pragma: public');             header('Cache-Control: must-revalidate, post-check=0, pre-check=0');             header('Content-Type: application/octet-stream');             header('Content-Length: ' . sprintf('%u', filesize($path)));             header('Content-Disposition: attachment; filename="' . basename($path) . '"');             header('Content-Transfer-Encoding: binary');              while (feof($file) !== true)             {                 echo fread($file, $speed);                  while (ob_get_level() > 0)                 {                     ob_end_flush();                 }                  flush();                 sleep(1);             }              fclose($file);         }          exit();     }      return false;      } Download($target_path.$filename);   I tried to put this on the top of my page:  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>   And:  $filename = urlencode($filename);    Or:  $filename =  htmlentities($filename, ENT_QUOTES, "UTF-8");   But still the same problem, I can't open them. But if the filename holds normal English character then it works fine.  Do you have any suggestion what can I put or implement to the function? Any help you can give will be greatly appreciated.


Are Imaginary Numbers Really “Imaginary?”

I find the naming convention of “Imaginary” misleading, as it does give a sense that the quantity is merely an abstract construct used to mitigate the difficulties of performing some mathematical operations.  My question is, other than the wavefunction for example, where else do complex numbers have physical significance?  Also, since only $|\Psi|^2$ has physical meaning i.e. probability amplitude, does this really mean that the “Imaginary” part is really significant, or just another purely mathematical construct?


I need to add logging to a batch file to know what parameters were passed to it. So if the batch file is run.bat, I have tried adding the line  ECHO %1 %2 %3 %4 %5 %6 %7 %8 %9 >> run.log   Which just echoes the parameters and the string >> run.log.


How to non-interactively configure the Linux kernel build?

Is there any method to configure linux kernel in such way (just an example):  make config CONFIG_OPTION=y && make config CONFIG_OPTION1=no CONFIG_OPTION3=64 CONFIG_OPTION4=/path/   and all the dependencies and alternatives of these configuration options will be set automatically in non-interactive mode.


do I get half the CPU speed for a single thread if HT is turned on?

If I have a single 2.6GHz core for example would it mean that with hyperthreading I have only 1.3GHz for a single thread that my app have or is it on demand only if I will use (lets say my app is the only thing that runs on the computer... for the sake of the case no os runs)   single thread single core no HT: thread runs on 2.6GHz single thread single core with HT: thread runs on 1.3GHz?  if its not half the speed assuming I have only a single thread running how much degradation is it with HT on? 10%? else?


Capitalization of explanation of abbreviations

I'm writing a rather tehnical report with a lot of abbreviations such as QoS (quality of service), AES (Advanced Encryption Standard) and HMAC (Hash-based Message Authentication Code).  When should the explanation of the abbreviation be capitalized? For example, should it be quality of service or Quality of Service? How does one know what to use for the vast majority of technical abbreviations?


Test 1  if((0.011-0.007) >= 0.004){     echo 'YES!'; }else{     echo 'NO!';  }   Output: NO! <--- INCORRECT  Test 2  if((0.004) >= 0.004){     echo 'YES!'; }else{     echo 'NO!';  }   Output: YES!  Test 3  if((0.012-0.008) >= 0.004){     echo 'YES!'; }else{     echo 'NO!';  }   Output: YES!  Test 4  if((0.011-0.008) >= 0.003){     echo 'YES!'; }else{     echo 'NO!';  }   Output: NO! <--- INCORRECT  Test 5  if((0.01-0.007) >= 0.003){     echo 'YES!'; }else{     echo 'NO!';  }   Output: YES!  Test 6  if((0.011-0.007) >= 0.003){     echo 'YES!'; }else{     echo 'NO!';  }   Output: YES!  Conclusion  Something very strange with the number '0.011'


how to merge large txt files of 10GB+ into 1 txt file and remove duplicates lines from this 1 txt file fastest way?

simple my question is different because i need to merge the files into one too then remove the duplicates lines from the that file which will be over 50GB txt i have large .txt from 10GB+ files   i want to merge them into 1 .txt file  then remove all the duplicates lines from that 1 large .txt file combined which will be around 50GB txt file or 100GB txt file   so what can handle that kind of large file and remove the duplicates from it smoothly ?  i need the fastest way because i tryied bouth notepad++ and emeditor they work  super heavy with them for merge or duplicates removing and take forever  i have 12GB RAM


Install c/c++ compiler just like turbo c or dev c++

Hye. I used to do programming in windows but now I am switched to Linux. I tried to get the IDE of c/c++ from Ubuntu software center but it is also not providing me any IDE for c/c++. I want to Install c/c++ IDE just like turbo c or Dev c++ in Ubuntu...


Is it possible to run four os's on a single laptop with 1TB HDD AND 8GB RAM

I want to install Kali linux on my laptop which was preinstalled with windows 8,windows 8.1,Ubuntu 13,04.  Windows 8 installed on  dev/sda1Windows 8.1 installed on dev/sda6Ubuntu 13.04 installed on dev/sda8I want to install kali linux  on dev/sda3 partition.Is that possible to install and boot all four os's?


Windows 8.1 System process high CPU usage due to ntoskrnl.exe!KeRegisterBugCheckReasonCallback thread

On a Lenovo Yoga 2 Pro laptop, 8GB RAM, Intel Core i7, running Windows 8.1 I'm seeing the following. In situations of high system load (high CPU/memory usage), the System process starts using high CPU in addition to the CPU already used by other processes. This has been happening for at least a year.  Examples of the situations when this happens:   Many Google Chrome tabs open with the Developer Tools open for some of them A Virtualbox virtual machine with 2-3GB RAM doing some heavy lifting on top of the usual browsers, background apps A Java application using 1GB of RAM, 3GB of virtual memory using 100% of one CPU core on top of the usual browsers, background apps   The irony of the situation is that when the system is already under heavy load, the System using more CPUs causes even more of a slowdown.  Using Process Explorer I've been able to pinpoint the thread within System that uses high CPU to be ntoskrnl.exe!KeRegisterBugCheckReasonCallback. This is a function that should be called by drivers when a BSOD is happening (). However in my case no BSOD happens.  The issue occurs even with no USB devices attached, so none of those can be the cause.  I've done a WPA trace when the issue occurred as explained in , screenshot below. This doesn't tell me much more than resources are used within ntoskrnl.exe with the nearest driver in the trail being fltmgr.sys. That doesn't help me a lot because it's not a specific driver that I can uninstall or upgrade.  Any pointers to further debug this are welcome!  Process Explorer for the System process while the issue is happening:      WPA trace:


Does a run count if it's made after an unforced out?

scenerio: runners on second and third, two outs.  Ball hit to shortstop who immediately tags out the runner going from second to third.  This happens before runner gets to first and before runner from third scores. Would the run count since the last out was not a force but a tag out?


Multiple Indexes vs Multi-Column Indexes

I've just been adding an Index to a table in SQL Server 2005 and it got me thinking. What is the difference between creating 1 index and defining multiple columns over having 1 index per column you want to index.  Are there certain reasons why one should be used over the other?  For example  Create NonClustered Index IX_IndexName On TableName (Column1 Asc, Column2 Asc, Column3 Asc)   Versus  Create NonClustered Index IX_IndexName1 On TableName (Column1 Asc)  Create NonClustered Index IX_IndexName2 On TableName (Column2 Asc)  Create NonClustered Index IX_IndexName3 On TableName (Column3 Asc)


Why are the longer edges being beveled more?

I'll preface this by saying I'm very new to Blender - I'm trying to put a bevel on an edge, looks something like this:    As you can see, the vertical side is much longer than the horizontal side.  When I apply to bevel to the edge there, the bevel stretches proportionally - so there's 'more' bevel on the longer side.  I want to bevel without any 'ratio' like that - just a 45-degree bevel, if that makes any sense.  Do I have to put in a loop cut to make the side lengths equal?  I tried using a sub-surf modifier, but it applies on a bunch of nearby edges, when I just want to round this one corner.


Does anyone know how to turn off maintenance mode for brainfx?  I tried http://www.website.com/?q=user/login but that gives me a blank page (no html source or anything).  I tried the following query.  UPDATE `variable` SET `value`='0' WHERE 'name' = 'maintenance_mode';   It didn't affect any records.    I tried to find a $conf['maintenance_mode'] variable in the project, but it doesn't exist. Adding that $conf['maintenance_mode'] = false; in setting.php didn't do anything either.  How do I turn off maintenance mode?