Question from the British Mathematical Olympiad

Question:  A $5×5$ square is divided into 25 unit squares. One of the numbers $1,2,3,4,5$ is inserted into each of the unit squares in such away that each row, each column and each of the two diagonals contains each of the five numbers once and only once. The sum of the numbers in the four squares immediately below the diagonal from top left to bottom right is called the score. Show that it is impossible for the score to be 20. What is the highest possible score?  What have I done so far:  The only possible way to reach 20 in the row immediately below the diagonal is by adding four 5s, i.e., $5+5+5+5=20$. It follows that all the squares in those particular four squares immediately below the diagonal must be filled with 5. We show that this is impossible given the statement of the problem.  Proof  Assume for the sake of contradiction that such a score is possible. We call two squares adjacent if they share any common edge. It it given in the statement of the problem that the diagonals contain all the given integers exactly once. Hence it follows that the diagonal above our problem set of squares must contain exactly one five. It also follows that at least two squares containing 5s each must be adjacent to each other in a row or a column. Hence it is impossible to contain four 5s in the given set of squares. Going back, we conclude that it is impossible for the score to be 20.  The part where I am stuck is finding the maximum possible score. I am guessing that all the integers in the four squares have to be distinct but I cannot seem to prove it.  Thank you.


Design pattern to create an arraylist for a combination of object and value pair

Wanted to know inputs for possible design pattern approach in java:  Scenario: Trying to create an arraylist for a combination of object and value pair. If Objects has A, B, C...etc If value has X1, X2, X3...etc  there could be an arraylist of Y1 for a combination of A & X1 there could be an arraylist of Y2 for a combination of A & X2 ..... etc, so on and so forth.   I tried with Factory Creational Design Pattern, however did not match quite good.Can anyone suggest a possible design approach for this issue ?  I cannot use Apache Pair in my implementation. ok I have added my problem Java class code:  import java.util.ArrayList; import java.util.List;  public class FieldsProvider2 { private MyObject object; private MyAction action;  public FieldsProvider2(MyObject object, MyAction action) {     this.object = object;     this.action = action; }  public List<Object> getList() {     if ((action != null && object != null)) {         if (Action.A == action) {             List<Object> fields = new ArrayList<>();             if (object.getTypeKey().equals(MYObject.X1)) {                 // fields.add(Y1);                 // fields.add(Y2);                  // fields.add(Y3);                 // fields.add(Y4);                  // fields.add(Y5);                  // fields.add(Y5);                  // fields.add(Y6);                 // fields.add(Y7);                  return fields;             }              if (object.getTypeKey().equals(MYObject.X2)) {                 // nothing             }              if (object.getTypeKey().equals(MYObject.X3)) {                 // fields.add(Y1);             }              if (object.getTypeKey().equals(MYObject.X4)) {                 // fields.add(Y1);                 // fields.add(Y8);                 // fields.add(Y9);             }              if (object.getTypeKey().equals(MYObject.X5)) {                 // fields.add(Y1);             }              if (object.getTypeKey().equals(MYObject.X6)) {                 // fields.add(Y1);             }              if (object.getTypeKey().equals(MYObject.X7)) {                 // fields.add(Y1);             }              if (object.getTypeKey().equals(MYObject.X8)) {                 // fields.add(Y1);             }              if (object.getTypeKey().equals(MYObject.X9)) {                 // fields.add(Y9);             }              if (object.getTypeKey().equals(MYObject.X10)) {                 // fields.add(Y10);             }              // Common items              // fields.add(Y11);             // fields.add(Y12);              // fields.add(Y13);             // fields.add(Y14);             // or             // fields.add(Y15);              return fields;         }          if (Action.B == action) {             List<Object> fields = new ArrayList<>();             if (object.getTypeKey().equals(MYObject.X1)) {                 // fields.add(Y1);                 // fields.add(Y2);                  // fields.add(Y3);                 // fields.add(Y4);                  // fields.add(Y5);                  // fields.add(Y5);                  // fields.add(Y6);                 // fields.add(Y7);                  return fields;             }              if (object.getTypeKey().equals(MYObject.X2)) {                 // fields.add(Y7);             }         }         //Action.C will start         //Action.D will start and so on...     return null; } }


How to disable the welcoming screen for when PC wakes up

Windows 7 (x64) has a blue welcome screen (blue grass picture) which shows my user icon in the center. After PC sleeps and wakes up, this screen is shown. How do I skip it, and not have to press the user icon?


Why is Excel truncating my 16-digit numbers?

If I type in a 16 digit number (format: number, no decimals) it changes the number on me. Example: 1234567812345678 changes the view to 1234567812345670.    If I type it in as a general format it changes the numbers above so it displays 1.23457E+15 but if you click on the cell, the display shows the last digit as a 0 instead of an 8 once again.   I opened the file on a different computer and same issue now with it.  I have changed the auto correction and auto formatting all to no avail.  Help!


How to turn off a frozen iPhone with a broken lock button?

What can you do when your iPhone is in Airplane Mode, the WiFi is off, and the lock button is broken. I can't log in to the phone. How can I turn it off?


Traveling on honeymoon to Seattle from San Antonio - Am I too fat for seat?

I am getting married this year.  My fiancé and I want to spend our honeymoon in Seattle. However I am extremely stressed out that I will not fit. I weigh about 315 pounds and am 5'5".  I am not an experienced flyer so any advice would be greatly appreciated.   Which airline is plus-size friendly?


Is it possible to include subscript and superscript text in the title of a legend item in QGIS ?  I have tried using some text but this just appears in the title with no change to the contents.  I am looking to have layer titles such as   Annual NO2 concentration (μg/m3)  The superscript is not a big issue, as I can use the character map to get a 3, but I don't know how to get the subscript.


SharePoint Current User View using JavaScript

I'm running SharePoint 2013, I would like to have a Current User Filtered View using Javascript.   the [Me] would not be feasible because I'm not using the "People Picker" as the field type. I used a text field in 4 different text fields. For instance, Field1_Text, Field2_Text, Field3_Text and Field4_Text can different Users. The form will have four different approval process; however, I would like to display the form whenever one of those text field has the current user listed. The Current User Filter Web Part, only allows for one field to be selected not all four fields, so that approach won't work either.   A custom view will be used for the date of the item. For instance, "Created Date" Filter = [Today] + 15. The data would only be displayed if the current user is listed on one of those approval "Text_Field" as noted above and the form was created 15 days from [Today]. But, my main concern is the Javascript aspect. I'm trying to get myself up to speed on the topic. Let me know if there is anything else that I can provide. As far as the .JS code, I'm very limited since I'm trying to read and learn from many of the posting on this site.  Thank you.


How does one go about starting an UX portfolio?

I've been visiting this site for a while and while I'm really curious about UX, I've become really frustrated switching between reading about theory and usability. I'm asking this question with the assumption that what I can do about implementing UX knowledge is mostly by wireframing and communicating the problems I am solving, but it seems like a nontrivial task when you don't have any direction.


How to fix Spectre variant 3a and variant 4?

How I can fix CVE-2018-3640 [rogue system register read] aka 'Variant 3a' and CVE-2018-3639 [speculative store bypass] aka 'Variant 4'. My status for them is VULNERABLE. I have Intel CPU and using kernel 4.17  I read on a site there is a framework called 007 that fix Spectre very easy, but I can't find it on github.


When should 12 (almost 13) year old daughter get a phone?

My daughter is almost 13 and she does not have a phone. I don't think she should have one yet but she says that all her friends have one, and that is true. She is responsible but I am not sure if I should buy her one yet because I want her to be safe on the Internet and on social media.  Currently I'm planning on getting her one when she turns 15 1/2 but she says that's too late.   Is there any good research on the effects of smart phones on adolescents of different ages? I'd like to make an informed decision I can talk to my daughter about.


In the module I am developing I need to add script which require jQuery.The will be added depending on configuration settings. Hence I am using template_preprocess_module(&$variables) where I am trying to add script by doing something like this:  function template_preprocess_module(&$variables) {   if (TRUE) {     $variables['jquery'] = ?;     $variables['script'] = 'path to script in module';   } }   Then in the template I will simply be rendering these variable in the head section. But I am facing trouble in adding jQuery, because I don't know its source (obviously I know its source in core but I need something over here which automates path). Can the source be known by using something like drupal_get_path() ? I am also not sure if this is the best way to add script conditionally, any suggestion regarding this? Thanks.


Ignored users still appear in the 'other rooms you're in' message preview

Well it might not be a huge issue to some (I suppose it depends on how you use the chat system) but when I "Ignore this user everywhere", their messages still appear on the sidebar for the 'other rooms you're in' if they say something. Albeit I can ignore this feature and the text within it, I just find it odd that I can still see it.   This is only a nuisance when you truly are annoyed by a user and ignoring them in the chat was the best possible alternative to leaving the room or starting an argument (no references here, but any long time chat user has been annoyed by some help vampire at one point in time or another and would just prefer to ignore them for good).   If you have no clue to the sidebar or preview I'm talking about: this is for you,    I have chosen to Ignore this user everywhere (Neal) and then switched to a new room, yet that users response appears in my 'preview' for the 'other rooms you're in' if he is also talking in them.  Note: My ignore of Neal was mostly due to jest, this in no way is to reflect on Neal but the chat feature (I hate to ever single anyone out here).


I'm making an app in Adobe Air and I want to make a robust looking UI. And it's quite hard to do in CSS, I just end up with lots of messy code that probably doesn't work that well anyway.  So does anyone know of a good UI CSS framework that focuses on a robust layout rather than pointless slidy  and datepickers.


Appropriate map projection for the Pacific Ocean

I've found this map that shows the Pacific Ocean from :    I'd like to produce a similar map, for the same region of the earth and I'd like to use the same projection as I think it illustrates well the distance between the continents.  I've searched for the name of this projection, but I don't think I know the answer yet. At first I thought it was Robison but according to Wikipedia:     The Robinson projection is a map projection of a world map which shows the entire world at once.   Which doesn't seem to be the case. (Can't see Europe and Africa here.)  So, my question is two-fold: what is the name of this projection? Should I use it to illustrate what I said earlier or should I use something else?


What is the name of the fast organ song in Parasyte -the maxim- ep17 at 6:35?

The song is found in episode 17 of Parasyte -the maxim- at 6:35 when a homicidal parasyte says 'one of us has died'.  The song is also found in episode 16 of Parasyte -the maxim- at 10:54 when Migi says 'shit' and Shinichi says 'no way'.  Thank you for your answer.


Do I need Transit visa or visitor visa for my travel through Germany (2 lay overs in Germany while returning from India to US)

I need some help in order to understand the type of visa required to travel through Germany airports. My itinerary to india is Boston-Munich-Mumbai and my return flight is Mumbai-Munich-Frankfurt-Boston. I hold indian passport and have US visa in the form of approved I797 but passport is not stamped while going from US to India. The plan is to get passport stamped and take the return flight as mentioned above. While going from US to India, I just have one layover in Munich but while coming back I have two lay overs- one in Munich and other in Frankfurt (both in the same country). Do I need a German visa for my returning flight to US? I am really confused- Do I need a airport transit visa? or Do I need a visitor visa? Basically what type of visa I need to get for my round trip- US to india, and India to US.  The more I read, the more I get confused. I tried calling German embassy in boston and also Lufthansa airline but I don't have any response yet. The whole terminology is confusing to me- Schengen vs transit or if they are same?   Can anyone please provide me the response based on my case and if someone in the same situation or have traveled in the past.


I have created an alias:  alias shh='sqlplus hfdora/hfdora@hfd1"     After creating this alias I was able to enter my database only by typing shh.  But after closing my shell, I wasn't able to find the alias next time. Even after typing only alias, shh was not showing in the list.  Is there any file to make an alias permanent so that it will not be erased?


how to perform ssh and scp equivalent function in python code

I want to login in different machine in the network and copy a file from that machine to my machine.I want to do this using python.Any idea how can i do this .I have python 2.5 a nd ubuntu 8.10


In the UK where I live, we are taught the abbreviation BIDMAS/BODMAS for the order of mathematical calculations:  Brackets Indices / Others Division Multiplication Addition Subtraction  I know that in the USA, the abbreviation PEMDAS is taught:  Parenthesis Exponents Multiplication Division Addition Subtraction  I notice that in the UK, division is performed first followed by multiplication, but this order is reversed in the USA. It seems to me that this can result in different answers for the same question, for example  What is $1 \div 2 \times 2$?  In the UK, with BIDMAS/BODMAS, division is performed first: \begin{align} 1 \div 2 \times 2 &= 0.5 \times 2 \\ &= 1 \end{align} Whereas in the USA, with PEMDAS, multiplication is performed first: \begin{align} 1 \div 2 \times 2 &= 1 \div 4 \\ &= 0.25 \end{align}  So what is the actual value of $1 \div 2 \times 2$? Or am I misunderstanding something?


How to show below javaScript code without brackets?

Code: let myClassFellows=[ ['Noor',1],['Jawaria',2]]; console.log(myClassFellows[0]);


I'm having a hard time trying to get my head around the fundamentals of gauge theory. I've taken classes in QFT and Particle Symmetries recently, both of which touch on the topic, but neither explained it in detail. Browsing the Wikipedia entry on gauge theory gives me the same heuristic arguments I've read hundreds of times, together with some mathematical formalism that's totally impenetrable.  Does anyone know of an introductory book that will explain gauge symmetries, the gauge group and their applications to a grad school student? Ideally I'd like a book which starts slowly but gets far, and isn't too basic. However I'm not looking for a text where you need to have done a couple of courses in differential geometry (fibre bundles etc) to get started!


Creating a point buffer along a road network

I have a road network and have added points indicating fire hall locations.   How would i go about creating buffers on those points following the road line.  The result am i looking for would create a buffer from the fire hall to 5km away on all possible roads/paths.   I do have the full OSGeo suite. Currently using QGIS 2.0.1  Thanks


I think I accidentally wiped out my ssd while installing Ubuntu

Today I was trying to install Ubuntu and dual boot with my already installed windows 10. I downloaded Ubuntu's latest stable version and burned it to a flash disk. I chose the language then I saw this message      The machine's firmware has started the installer in UEFI mode but it looks like there may be existing operating systems already installed using BIOS compatibility mode.If you continue to install Debian in UEFI mode, it might be difficult to reboot the machine into any BIOS-mode operating systems later.   If you wish to install in UEFI mode and don't care about keeping the ability to boot one of the existing system, you have the option to force that here. If you wish to keep the option to boot an existing operating system you should choose NOT to force UEFI installation here.   Then there were 2 options (go back or continue to UEFI mode). I clicked continue to UEFI.  Then I chose Something else. After that I accidentally clicked on "revert". After I clicked the bar on the top turned green and things look like this.      Now I can't boot to Windows. I also can't see my data from the Ubuntu. I used to see my data when I use the "try Ubuntu" before clicking on revert but now they are gone.  Is there is a way to get my partitions and data back? :'(  I am using a Dell xps 15 laptop. 512 GB ssd. I had 2 partitions + windows (450MB I think system partition).   Before trying to install Ubuntu I disabled fast boot and secure boot. I use UEFI and AHCI mode.  Here is my RESULTS file from the boot info script:


I have 2 different windows, my main window created in my first file and a QDialog window where the code is located in a second file... What I want to do is to be able from file2 to close the main window created in file1, close also the QDialog from file2 and create a new window in file3. The application must NOT quit.  Creating a new window with the code in file3 would be easy, I am not worried about that... The problem is that in file2, I'm unable to tell the main window to close.  Here is the code from the 2 files to be more clear...  main.py:  from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import QRegion, QPalette, QPixmap, QBrush import creation_partie # import sys   class Menu(QMainWindow):     def __init__(self):         super(Menu, self).__init__()       # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*          self.init_ui()         self.setWindowTitle("Bienvenue dans Skip-Bo!")       # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*       def center(self):         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def quitter(self):         self.close()      def creer_nouvelle_partie(self):         self.fenetre_creer_une_partie = creation_partie.NouvellePartie()         self.fenetre_creer_une_partie.setModal(True)         self.fenetre_creer_une_partie.show()      def next_step(self):         pass      def init_ui(self):         # --------------- Paramètres de la fenêtre --------------------         self.resize(1280, 720)         self.center()         self.background_picture2.load('background_menu2.png')         self.palette.setBrush(self.backgroundRole(), QBrush(self.background_picture2))         self.setPalette(self.palette)         # self.background_picture.setStyleSheet("background-image: url(background_menu.png);")         # self.setCentralWidget(self.background_picture)         # self.background_picture.setScene(self.scene)         # # --------------- Fin des paramètres -------------------------          # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*   if __name__ == '__main__':     app = QApplication([])     menu = Menu()     menu.show()     app.exec_()   creation_partie.py:  from PyQt5.QtWidgets import * # from PyQt5.QtCore import * # from PyQt5.QtGui import QRegion, QPalette, QPixmap, QBrush import main  class NouvellePartie(QDialog):     def __init__(self):         super(NouvellePartie, self).__init__()         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*         self.init_ui()      def init_ui(self):         # --------------- Paramètres de la fenêtre --------------------         self.resize(640, 325)         self.center()         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def texte_change(self):         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def center(self):         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def annuler(self):         self.close()      def confirmer(self):         print("Yup")         # send informations to the server backend of the game         self.close()         main.menu.close()     if __name__ == '__main__':     app = QApplication([])     nouvelle_partie = NouvellePartie()     nouvelle_partie.show()     app.exec_()   So... what I want to do, is that in the fonction confirmer in creation_partie.py be able to close menu from main.py. menu is a QMainWindow and fenetre_creer_une_partie is my QDialog.  Right now, the code compile and run fine until I click on the button that should close menu. PyCharm is not raising compiling error formain.menu.close()`, but when the code is about to be executed (at the moment I click my button), I get the following error:  module 'main' has no attribute 'menu'   How can I fix that?  P.S.: Sorry for the french variable and class names, I a french Canadian :) .  Thanks!  EDIT: Since the question has been closed, I will put my solution here: Basically, I created a function in ˙main.py˙ out of the class which close the main window. After that, the only thing I needed was to call that function in ˙creer_partie.py˙ by using ˙main.my-closing-function˙.


How do I handle a "No such file or directory" error for a header file from make?

When compiling a source package, I got an error from make that looked like:  In file included from foo.c:28:0: bar.h:23:18: fatal error: bar.h: No such file or directory  #include <bar.h>                    ^ compilation terminated. make[x]: *** [baz] Error 1 make[x]: Leaving directory    How do I handle this?


All norm in a finite dimensional topological space are equivalent

Definition If $V$ is a finite dimensional vector space then we say that the norm $||\cdot||_1$ and $||\cdot||_2$ are equivalent if and only if there exist two positive constant $m$ and $M$ such that $$ m||v||_1\le||v||_2\le M||v||_2 $$ for any $v\in V$. Lemma If $V$ is a finite dimensional vector space then the function $||\cdot||_\infty:V\rightarrow\Bbb R^+_0$ defined through the condition $$ ||v||_\infty:=\max_{i=1,...,n}|v_i| $$ is a norm in $V$. Theorem If $V$ is a finite dimensional vector space then all norm in $V$ are equivalent.  Clearly if $||\cdot||$ is a norm in $V$ then by triangle inequality $$ ||v||\le M\cdot||v||_\infty $$ where $M:=\max_{i=1,...,n}||e_i||$ for any basis $\mathcal{B}:=\{e_1,...,e_n\}$. Unfortunately I can't prove the other inequality. So could someone help me, please?


Not understanding variable scope in C# - methods access publics?

So I am pretty new at C# and most of my programming experience has actually come from years of PHP work. As far i can tell I've declared my variables correctly inside of my class. Yet, inside of my Main method I am getting compiler error CS0120 that the 'isnegative' variable does not exist in the current context.  Are variables not class wide?   namespace ConsoleApplication1 { class Program {     public int isnegative;     static void Main()     {         isnegative = 0;         for (int i; i = 0; i < 10; i++;)         {             if (isnegative == 0)             {                 i = i;                 isnegative = 0;             }             else             {                 i = i * (-1);                 isnegative = 1;             }             Console.WriteLine(i);         }     } }


What does the '{}' in 'find . -name "*.pyc" -exec rm -rf {} \;" mean?

This may be a naive question, but I did not find the answer after searching online and on stackoverflow. I did not know the right keyword for finding the answer. Thanks in advance for giving out a pointer!   My question is on the '{}' in the following command:  find . -name "*.pyc" -exec rm -rf {} \;   Why we need {} and \; here?


How many smartphones can I take on an airplane?

I'm a software developer and I need multiple different mobile devices for testing and debugging purposes. I also work on-the-go sometimes, so this is important. Furthermore, not everything can be tested on an emulator, so actual hardware devices are needed in certain cases.  So, is there any limit on how many phones one can carry on an airplane in their cabin baggage? Will I successfully go through security and customs with, say, five phones, a tablet, and a laptop? They're all different and not new. Does that depend on my origin and/or destination airport/country? Will I be required to prove somehow that I actually need these, and if yes, how?


When & why I need to use  web.AllowUnsafeUpdates = true, and why it is false by default:   web.AllowUnsafeUpdates = true;  //Update Item  web.AllowUnsafeUpdates = false;


Is no surname in Indian passport a problem?

I have booked a return ticket to Mauritius from Delhi, India for three adults and two children. The passports for the two children, a boy and a girl, have the surname field blank.   So, when booking the tickets through a website, I did not enter the surname of the children, and a popup asked me to confirm that the name I 'entered' is the one in the passport. I clicked 'yes' and booked the ticket.   In the final printout, it came out like this: XXXX Mstr (Child) and YYYY Ms (Child). That is, 'Mstr' and 'Ms' are shown as the first name of the boy and girl, respectively.   Will this a problem at the airline check in counter or at passport control?


How to split a file according to a column (including header) and rename the generated files?

I have a .txt that can be exemplified like this:  NAME | CODE name1 | 001 name2 | 001 name3 | 002 name4 | 003 name5 | 003 name6 | 003   I need to write a script to split this file according to the CODE column, so in this case I'd get this:  file 1: NAME | CODE name1 | 001 name2 | 001  file 2: NAME | CODE name3 | 002  file 3: NAME | CODE name4 | 003 name5 | 003 name6 | 003   According to some research, using awk would work:  $ awk -F, '{print > $2".txt"}' inputfile   The thing is, I also need to include the header to the first line and I need the file names to be different. Instead of 001.txt, for example, I need the file name to be something like FILE_$FILENAME_IDK.txt.


Let the sequence $(x_n)_{n \geq 0}$ defined by  \begin{cases} x_0=2017 \\ x_{n+1}=x_n+e^{-2018x_n} \end{cases} for every $n \ge 0$. Calculate $$\lim_{n\to \infty}x_n \text{ and }  \lim_{n\to \infty}\frac{\ln(2018+n)}{x_n}$$  I proved that $\displaystyle \lim_{n\to \infty}x_n=\infty$, but I don't realise how to find the second limit. I tried Cesaro-Stolz lema, but it doesn't work. Please help me!


I can't find my Bin file on minecraft 1.6.2!

I am currently trying to make my own texture pack for Minecraft, I keep looking for the BIN file on the folders but I can't find anything. I want to make my own texture pack but I can't seem to find it, or I can't even see any tutorials about it.  First of all: What folder are the textures anyway?  And also, how can I make my own texture pack?


Prove that a polynomial is irreducible or the field contains a $p$th root

An exercise from Lang:  Let $k$ be a field. Let $n$ be a nonnegative integer. Consider the polynomial $x^{p^n}-a \in k[x]$. Assume that $\text{char}(k) = p > 0$. Prove that either the polynomial $x^{p^n}-a$ is irreducible over the field $k$ or there exists a $b\in k$ such that $a = b^p$.  How to prove this statement? I am a little bit confused with this statement.


How to choose between 2D sprites versus 3D models for a 2D game?

I wanted to know how to decide between using 2D vs 3D models for games. What are the advantages/disadvantages of using 3D models versus 2D sprites in 2D games?


How do I install and uninstall kubuntu desktop environment?

I just want to try kde. How do I install it through the command line? If I don't like it, how do I uninstall it through the command line?


I wrote a Javascript RegExp test to detect date string format, I added an redundant "g" flag by mistake and found something interesting.  var s = "2009/03/10"; var regex=/^\d{4}[/]\d{2}[/]\d{2}$/g; alert(regex.test(s)); alert(regex.test(s)); alert(regex.test(s)); alert(regex.test(s));   I got a 'true' followed by a 'false', then another 'true', then another 'false'.  If I use a loop to execute it, I found something more interesting, I got four "true" in IE and Safari, and true,false,true,false in FF, Chrome.  for (var i=0; i<4; i++) {   var s = "2009/03/10";   var regex=/^\d{4}[/]\d{2}[/]\d{2}$/g;   alert(regex.test(s)); }   Does anybody has idea to explain why the Javascript regex behaves like that and what cause browsers return different results? ( related to variable declaration and life scope? )


CARES Act 401k withdrawal requirements - Is this a hardship?

From my understanding, financial hardships related to COVID-19 can qualify an individual to withdraw money from their 401k, with literally no penalty so long as it is repayed to a similar retirement account within 3 years. What qualifies as a COVID hardship? In my friends case, he lives at home with 3 people with preexisting conditions that make them vulnerable, they are also 60, 83, and 85 years old.  He also has to work from home now, so a combination of factors makes moving out more appealing (Reduce risk to family, and have a place to work comfortably and efficiently from home so that his job is secure, instead of the current situation where 4 people and 4 dogs share 975 sq feet, and he can be interrupted during meetings and heavily distracted while working) My friends bank account was essentially cleaned out in a bad divorce, but he has over $60,000 in his 401k and income such that he could withdraw 25,000 for a down payment and a preowned car, and realistically could repay that withdrawal in under 13 months (certainly within the 3 years set forth by the CARES Act) Would this qualify as a covid related hardship?  Certainly the parents and grandparents could deem it too dangerous to be exposed and kick him out, and would it be a hardship then? To clarify, he has not lost his job, and noone in his family has caught covid-19, but it is putting a strain on his ability to work, and exposing vulnerable parties.


Why isn't the center of the galaxy "younger" than the outer parts?

I understand that time is relative for all but as I understand it, time flows at a slower rate for objects that are either moving faster or objects that are near larger masses than for those that are slower or further from mass.  So, the illustrative example I always see is that if I were to leave earth and fly around at near light speed for a while or go into orbit around a black hole the time I experience would be substantially shorter than for those I left behind at home on earth and I'd come back to find that I've only aged however long I felt I was gone by my own clock but that on Earth substantially more time would have elapsed.  Following through on this model, the stars in orbit around the black hole at the center of the Milky Way are aging much much slower (relative to us), right?  So does it not follow that the center of the galaxy is some appreciable (I have no idea how to go about putting this in an equation so will avoid guessing at the difference) amount "younger" than the stuff further away from the center?   If this is not true, could someone please explain why not, and if it is true, can someone please point me to where I can calculate the age of the center of the galaxy :-)  And to be clear... what I'm asking is... if there was an atomic clock that appeared at the center of the galaxy when the center was first formed, and we brought it through a worm hole to earth today - how much time would have elapsed on that clock vs. the age we recon the galaxy currently is? (13.2 billion years)


I'm new to C/C++ Programming and I'm still learning some differences between pointer datatypes. But I struggled with these one:  int *const x1; const int *x2; char *x3[3]; char (*x4)[3]; double* x5, x6;   I think the first one should be a integer variable that points to a constant memory address And x2 should be a integer Pointer which is const, right?  I don't know if thats right. So can anyone explain me the differences between them?


I have a CentOS 6.4 64Bit Dedicated server used for hosting several websites. I recently checked the traffic graph for my server and discovered that the inbound traffic is very high (about 200-500 Mbit). I don't download anything and I have absolutely no idea why is the traffic so high. the inbound traffic is 200GB already but the HDD doesn't fill up with information. I checked for HTTP DDos but everything seems regular.  Some info:  RAM Usage: 20% CPU Load: 50%  Services in the server:   Apache (local usage only) Nginx (as proxy server) mySQL exim ftp(pure-ftpd) SSH   Allowed ports in csf:  TCP_IN: 20,22,80,2083,2087,21 TCP_OUT: 20,21,22,25,37,43,80,110,113,443,587,873,2086,2087,2089,2703  UDP_IN: 20,21 UDP_OUT: 20,21,113,123,873,6277,53  ICMP_IN is disabled.  Traffic graph:   I would appreciate any help. Thanks.  EDIT  I was attacked by DNS DDos Amplification    I was attacked by DNS DDos Amplification


Mechanical Engineering undergrad aspiring to publish

I'm an undergraduate student of Mechanical Engineering, now closing my third year of studies. Throughout the years however, I've always went a bit off coursework to study and research the area. By now I have some material that I believe it could be publishable, and I would like to work towards that goal.  Although my entire research is a bit spread, I have something specific in mind that I would like to try and publish and that is a study on optimal beam profiles. My question is, which would be the best journal to submit? I researched some on Elsevier but they seemed too professional to me.  In total, what would be the best journal to try and submit work that is analytical in nature, but related to mechanical engineering?


Double Integral Proof of the Gaussian Integral without Fubini's theorem

There are several ways of proving $I=\int_{-\infty}^{\infty} \mathrm{e}^{-x^2}\, dx = \sqrt \pi$, of which one of the ways is to consider $$I^2=\bigg(\int_{-\infty}^{+\infty} e^{-x^2} dx\bigg)\bigg(\int_{-\infty}^{+\infty} e^{-y^2} dy\bigg)=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}e^{-(x^2+y^2)} dxdy$$ and then convert to polar coordinates.  The step changing the product of two single variable integrals into a double integral can be justified using Fubini's theorem, the proof of which is beyond the standard undergraduate curriculum of many universities. Is there a more elementary way to justify this step?  Clarification: This is not a duplicate of the  requiring a proof of the integral. I am asking for justification of a step used in the accepted answer without using Fubini's theorem which is not something addressed there.


'68–95–99.7 rule' equivalent for multivariate normal distribution

The  is a convenient way of quickly getting an overview of the spread of some normally distributed data.  I am wondering if there is an equivalent rule in the multivariate case? and how would I go about proving/disproving this?


I generated a key and copied it to my target:  ssh-keygen ssh-copy-id username@hostname   I left the the location of the key as default and did not set any passphrase.  For a small while after that, I was able to ssh username@hostname without being prompted for a password, and then it stopped working for some reason.


Is there a way to circumvent windows path length limits without disabling it?

While disabling windows path length limits makes it possible for some applications to use longer paths others are still not capable of dealing with long paths, because they have some internal checks. How do I get around that?


How do I "add some context to explain the code sections"?

How do I format text here? I keep getting this message:        Please add some context to explain the code sections (or check that you have not incorrectly formatted all of your question as code).


Would an array that is always acessed better be global or local?

Imagine this javascript code is inside an already busy loop:  if (a==0) {      d=6; }else if (a==1) {      d=31; }else if (a==2) {      d=null; }   I thought of replacing it with:  var array=[6,31,null]; d=array[a];   Which would be faster? In case it is the array approach, is it faster to have this array as a global var? I am thinking "Yes, because if you make it local, the program becomes a bit slower because it has to declare the array every time". Thank you in advance.


If three dice are rolled, what is the probability that all three are the same number?

The dice are fair.  You have a $1\over6$ chance of getting the first number. A $1\over6$ chance of the second and so on.  Is it just $({1\over6})^3$ (1/216) or is that not accounting for the second and third roll properly?


Right Stack Exchange site for questions about the computer industry business model

I can't find any Stack Exchange site where to ask questions about open-source in general.  I need to write a paper that explains the historical developments of open-source in a professional and legal way. Therefore it would be interesting to find some publications about experiences companies have had with open-source. I've been to FOSDEM where some companies present a positive viewpoint about open-source. A paper however is only objective if it gives a balanced view about several opinions. Does anyone know any publications about this topic, or a Stack Exchange site where I can ask this question?  So to make a long story short: are there some pointers to publications with a negative view on Open-source?


I have a layer with column "ADDL_INFO" having values like BM 12.4 BM 140!5 BM 320.6 BM 22!5    I want to change '!' mark with '.'  How to change it in qgis 3.5?


European Rail Freight Map (shapefile or other ArcGIS format)?

I need European Rail Freight Map (shapefile or other ArcGIS format) for a GIS project.   Does anyone have this data?


How to find a nonlinear function $f:\mathbb{R}^2\to\mathbb{R}^2$ that is almost linear in the sense $f(\alpha (a,b))=\alpha f(a,b)$?

I need to find a nonlinear function $f:\mathbb{R}^2\rightarrow\mathbb{R}^2$ such that $f(\alpha (a,b))=\alpha f(a,b)$ for all $(a,b)\in\mathbb{R}^2$ and $\alpha\in\mathbb{R}$. I can't find anything. Context The requirement $f(\alpha (a,b))=\alpha f(a,b)$ says that $f$ respects the scalar multiplication, just as linear maps do. In particular, $f$ is homogeneous of degree $1$. To make it nonlinear, one has to somehow destroy the additive property $f(a+c,b+d)=f(a,b)+f(c,d)$.


How can I create a dictionary by mapping a regular list and a list of lists in Python?

Currently, I have the following two lists: list1 = ['DB00619', 'DB01048', 'DB14093', 'DB00173', 'DB00734', 'DB00218', 'DB05196', 'DB09095', 'DB01053', 'DB00274'] list2 = [['Imatinib', 'Imatinibum'], ['Abacavir', 'ABC '], [], ['6-Aminopurine', 'Adenin', 'Vitamin B4'], ['Risperidona', 'Rispéridone', 'Risperidone', 'Risperidonum'], ['Moxifloxacin', 'Moxifloxacino'], [], ['Diflucortolona', 'Diflucortolone', 'Diflucortolonum'], ['Bencilpenicilina', 'Bensylpenicillin', 'Benzyl benicillin', 'Benzylpenicillin', 'Benzylpénicilline', 'Benzylpenicillinic acid', 'Benzylpenicillinum', 'Penicillin G'], ['Cefmetazole', 'Cefmetazolo', 'Cefmetazolum']]  My question is how can I combine these two lists and create a library, like the following? e.g. mylib = {'DB00619': ['Imatinib', 'Imatinibum'], etc.....}


It is a subtopic of article about AI  WHY THE RECENT INTEREST IN AI SAFETY  It seems to me there is no verbs here. I would be grateful if you explain what structure is used here


Ubuntu Software no longer works on Ubuntu 20.04

I have just upgraded to Ubuntu 20.04. Before the upgrade, the updater informed me that it would no longer support Ubuntu Software. After the upgrade is successful, I found that I can't open Ubuntu Software, but when I go to terminal and type gnome-software, I can use Ubuntu Software.  I also checked all the apps. I found that there are 2 Ubuntu Softwares in my system. One is named "Ubuntu Software", which doesn't work at all and the other is named only "Software"    How can I fix this issue? How can I delete Ubuntu Software completely? Or is there another way to cope with this?


Why I can not see $(this) of the link in console.log?

Good day, I'm trying to receive this of the link in the console.      $('.bestehende_edit').click(function(){              console.log($(this));         })   Maybe I need to use delegate but I don't know how. Please explain to me why it happens and what I need to do?  $.ajax({       method: 'POST',       dataType: 'json',       async: true,       url: "/" + "<?echo $admin_type?>" + "/get_kredit_history",       data: {         id: << ? echo $credit - > id ? >       },       headers: {         'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')       },       success: function(data) {           $('.bestehende').css('display', 'none');           $.each(data, function(key, value) {             $('.kredits_area').append(               '
' +               '

Kredit ' + (key + 1) + '
' +               ' ' +               ' ' +               '
' +


When/why does the principle of least action plus boundary conditions not uniquely specify a path?

A few months ago I was telling high school students about Fermat's principle.   You can use it to show that light reflects off a surface at equal angles. To set it up, you put in boundary conditions, like "the light starts at A and ends at B". But these conditions by themselves are insufficient to determine what the path is, because there's an extra irrelevant stationary time path, which is the light going directly from A to B without ever bouncing off the surface. We get rid of this by adding in another boundary condition, i.e. that we only care about paths that actually do bounce. Then the solution is unique.  Of course the second I finished saying this one of the students asked "what if you're inside an elliptical mirror, and A and B are the two foci?" In this case, you can impose the condition "we only care about paths that hit the mirror", but this doesn't nail down the path at all because any path that consists of a straight line from A to the mirror, followed by a straight line to B, will take equal time! So in this case the principle tells us nothing at all.  The fact that we can get no information whatsoever from an action principle feels disturbing. I thought the standard model was based on one of those!  My questions are   Is this anything more than a mathematical curiosity? Does this come up as a problem/obstacle in higher physics? Is there a nicer, mathematically natural way to state the "only count bouncing paths" condition? Also, is there a "nice" condition that specifies a path in the ellipse case? What should I have told that student?


I know what a CPU is(I think). It's the thing who's speed is measured in GigaHertz(these days).  However, you hear a lot about a GPU, and letting the GPU take over, not letting the CPU but the GPU do it, GPU-based rendering, etc...  What is this GPU anyway? How can I access it and use it to my advantage? What am I missing out on here?


Multilingual beamer presentations from a single souce?

I have a beamer presentation of which I have two language versions (german and english), more languages are upcoming. I keep both versions in one source and select the one to typeset with the comment package. But this gives me only a presentation with one language.   Can I create a presentation with multiple languages that allows me to switch between them on the fly (either per presentation or per slide)?


Let $f : \mathbb{R}^2 \to \mathbb{R}$ be a continuous map such that $f(x) = 0$ for only finitely many values of $x$. Is it necessary that either $f(x) \leq 0$ for all $x$, or, $f(x) \geq 0$ for all $x$  I don't think its necessary because if $f(x,y)=x$ then $f$ is continous and it takes both positive and negative values.


How should I handle a client who is asking me to copy?

A company has approached me to design t-shirts. They want me to incorporate some famous band's picture as well as their logo...but I know they are asking me to copy.  If you have ever faced a similar issues, what was your approach?  How would you deal with the client?


Efficiently find the generators of a cyclic group

Is there any efficient method to find the generators of a cyclic group?  Edit: The (cyclic)group here refers to a general multiplicative group of prime modulo. Is there any efficient algorithm to find the generators of the (cyclic)group.


Is it possible to have different applications set to different locales?

In Windows 7 you can change the system locale to change how non-unicode characters are interpreted in different programs. Let's say that I want to use language X for most cases, but language Y for one single program. It is extremely tedious to change the system-wide locale and reboot every time I want to use this one program.  Is there a way to set locale on a case-by-case basis in Windows 7?


When Two Variables are Equal in Javascript

If I declare two variables to be equal to each other and then I edit one of them, will both variables still be equal? For example, if I do this:  let arr1 = [2, 3, 4, 5]; let arr2 = arr1; var c = arr1.pop() console.log(arr1); // prints [ 2, 3, 4 ] console.log(arr2); // prints [ 2, 3, 4 ]   Both variables are still equal even though I have not stated arr2 = arr1 after the pop function.  However, if I redeclare the array:  let arr3 = [2, 3, 4, 5]; let arr4 = arr3; arr3 = [1]; console.log(arr3); // prints [ 1 ] console.log(arr4); // prints [ 2, 3, 4, 5 ]   arr4 maintains its value.  Could someone explain to me why this is so? Thank you!


How to exclude a specific string constant?

Can regular expression be utilized to match any string except a specific string constant (i.e. "ABC")? Is it possible to exclude just one specific string constant?


when wanting to download third-party software like wire shark or yubico application like personalization tool do I have to install via command line or is it automatically installed like in windows 10?


Can I take a running process and redirect its stderr / stdout?

I'm running a find.  It's generating a lot of "Permission denied" errors, that I really don't care about. Other than by stopping that find, and starting a new one that sends all errors to /dev/null? What I'd like to do: ctrl-z fg 2> /dev/null  But that doesn't appear to work


We currently have a 3-year-old daughter and twin 2-year-old boys.  We are both 32 years old and have decent jobs.  I have many reservations on having another child, but my wife does not seem to want to listen to the reasons I have these reservations, she only says she doesn't feel like she is done yet.  Some of my concerns are as follows:   Cost of Daycare (already pay $23,000/year) New house we built last year would not be big enough. Need different vehicles to fit 4 kids When they are older we will have to choose who's events we can go to and who to disappoint Cost of school when they are older Not having enough time with each of the kids to make them feel special Not having any adult time  Very hard to find baby sitter for 3 under three, it would be worse for 4. My personal sanity (I have 2 jobs and no time to myself already) Strain on our relationship (feel like roommates sometime instead of husband/wife)   I could add quite a few more but I think you get the idea.  Please any advise will be appreciated.


In Google Chrome, can I mute sound in a single tab? Suppose a tab has a youtube video that I would like to silence. However, I still want to hear the audio from another tab.


How to work with very large number like 100 digits or so?

I want to do arithmetic operations like adding two 100 digit long number then how can I perform using the programming language like python or any other as long long int can support till 20 digits max.?


Can the Night King get past the wall without a dragon?

I've always struggled with why everyone is afraid of the Night King in Game of Thrones and the army of the dead after it's revealed by Benjen that there's magic in the wall that prevent undead from passing through.   So, if Daenerys never flew Viserion North, who was then killed by the Night King...Does the Night King and the army of the dead have any way of breaking down / getting through the wall without Viserion or another dragon?   Note: I've read  answers, and none of them give a good enough explanation of how he would get past the wall without a dragon.


I know answers are $4$ and $2$ but can't solve this.


I tried to upgrade my computer from Ubuntu 19.04 to 19.10. I tried first using the graphical manager, but it didn’t work. I then opened a terminal and typed sudo do-release upgrade but I got this error message:  Traceback (most recent call last):   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeQuirks.py", line 185, in _get_from_and_to_version     di.version('%s' % self.controller.fromDist).split()[0] AttributeError: 'UbuntuDistroInfo' object has no attribute 'version'  During handling of the above exception, another exception occurred:  Traceback (most recent call last):   File "/tmp/ubuntu-release-upgrader-r0ftfkno/eoan", line 8, in <module>     sys.exit(main())   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeMain.py", line 238, in main     if app.run():   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeController.py", line 2082, in run     return self.fullUpgrade()   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeController.py", line 1919, in fullUpgrade     if not self.doPostInitialUpdate():   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeController.py", line 925, in doPostInitialUpdate     self.quirks.run("PostInitialUpdate")   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeQuirks.py", line 97, in run     func()   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeQuirks.py", line 116, in eoanPostInitialUpdate     self._get_from_and_to_version()   File "/tmp/ubuntu-release-upgrader-r0ftfkno/DistUpgrade/DistUpgradeQuirks.py", line 191, in _get_from_and_to_version     (r.version for r in di.get_all("object") AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all' === Command terminated with exit status 1 (Tue Apr 14 13:31:08 2020) ===   To fix this, I ran:   sudo dpkg -a --configure sudo apt update sudo apr upgrade sudo apt dist-upgrade sudo do-release-upgrade -d   Except sudo do-release-upgrade -d, these commmands worked when I ran them, but didn’t fix the upgrade problem.  Could someone tell me what must I do to fix this problem?


When I used to type sudo apt-get update it says error 404  Not Found [IP: 91.189.95.83 80] on 12 hits.


How does one pile two lines under a union or intersection symbol in display mode? For example $\bigcup_{a,b \in \mathbb{R}; a+b=x} ... $ displays everything in one line, as it should, but I would like to put those two statements one above the other. I'm sure it's been asked before and I apologise, but I just don't know what to look for.


What is the proper contraction for “should not have”

I’ve been struggling with this one for a while, and it’s something I’ve tried typing/ writing on numerous occasions but it never looks correct in my mind. When speaking, I tend to say “should not have” as if it was one word (I.e I should not have had that donair last night) and when I picture the contraction for this word it looks like it would be “shouldn’t’ve“. Is this proper English in the first place?


Output of following code with integer, float, char variable

When I run following, it gives me output as 20. but int is of 4 byte,float is of 4 byte and character array is of 10 byte, then the total is 18 byte. Why I am getting output as 20 byte?  #include<stdio.h>  struct emp {     int id;     char name[10];     float f; }e1; main() {     printf("\n\tSize Of Structure is==>%d\n",sizeof(e1)); }


If $$ A =         \begin{bmatrix}         3 & 4 \\         4 & -3           \end{bmatrix}$$  Can someone find $\mathbf e^A$ ?  Edit 1:- I got this question in my fucntional analysis paper ! How is it even related to functional analysis ? Can somebody explain ?


Can I Make Extension Methods For System.IO.Path Class?

How Can I Make Extension Method For System.IO.Path Class what i mean that i need something like below:  Path.GetExtension(sFilePath)    i want to make method:  Path.GetMimeType(sFilePath)   Extension Method:  public static string GetMIMEType(this Path sPath,string sFilePath) {         string sExtension = Path.GetExtension(sFilePath).ToLowerInvariant();          if (sExtension.Length > 0 && dicMIMETypes.ContainsKey(sExtension.Remove(0, 1)))         {             return dicMIMETypes[sExtension.Remove(0, 1)];         }         return "unknown/unknown"; }   but when compile above code method get error ('System.IO.Path': static types cannot be used as parameters).  Thanks All,


We know that the genetic code is universal. My query is why the mitochondrial genetic code is different from universal genetic code?


Definition of symmetric random variable [in terms of distribution function ]

This is what i know about symmetric distributions: The distribution of rv (random variable) $X$ is symmetric about $a$ iff $$  P ( X \le a - x ) = P ( X \ge a + x )  \qquad \forall x  \in \mathbb{R} $$ I just want to confirm ,.,is this " iff " correct ? i mean it is clear to me that if $x$ is symmetric about $a$ it will satisfy above equation, is the converse also true ?


How open NTFS USB in Virtualbox using WIndows

My main computer is Ubuntu 15.10. I have virtualbox working properly and followed the steps in the following link so that the virtual Windows 10 can recognize USB devices:   Although the virtual Windows10 can recognize my USB keyboard and mouse, it can't recognize my USB drive in NTFS format (I recently converted it to NTFS from FAT). How can I get the virtual Windows10 to recognize the NTFS USB?


Can I use Karabiner to disable built in keyboard during start up

The D key on my built-in keyboard (MacBook Pro) is stuck and it keeps looping into self diagnostic when I boot up. I would like to disable the keyboard during computer startup and go straight to the external keyboard but have not found a way to do this.  If I install Karabiner on my MacBook Pro and disable in Karabiner settings the built in keyboard, after I turn off the MacBook Pro and start it up again with the external keyboard plugged in, would the built in keyboard function during the start up or would it be disabled?   If not is there another way to disable the builtin keyboard during startup?


UK standard visitor visa for job interview [Refusal]

this is my first post and I would like to know what should I provide after getting my UK visitor visa refusal. [please help]    ** This isn't the same question as here  as i got refusal as i didn't meet the requirements for paragraphs V4.2 to V4.10    I have an interview and I am still a student. I have provided documents which show that I am a student and provided my parent's financial bank documents and also a document showing my savings in the bank despite the fact that the company sent me an invitation letter stating that they will take care of all of the financial aspects till I go back to my country. I also provided a traveling ticket and hotel reservations.  However i got the following decision :  "With your visa application, other than an invitation letter, you have supplied no supporting documentation pertaining to your own financial circumstances in your country. As a result, I am unable to ascertain the veracity of the statements surrounding your financial circumstances or of any assets or savings you have , I am not satisfied that you have demonstrated sufficient ties to [my country] and the lack of supporting documentation submitted with your application casts doubt over your application as a whole. It is the intentions of the applicant that are paramount in considering any application and without this information and on the documentation before me on the balance of possibilities , I am therefore not satisfied that you intend to leave the UK at the end of your proposed visit or that you will not live in the UK for extended periods through frequent or successive visits. Furthermore, I am not satisfied that you are genuinely seeking entry for a purpose that is permitted by the visitor's routes and that you will not undertake any prohibited activities set out in V4.5 - V4.10 . Appendix V 4.2 - 4.10 "  What should I provide more to support my documents for the second time when applying to avoid getting my visa refusal again?


Making a delay function in minecraft function 1.12

I want to make some delay inside function, and i've made this:   scoreboard objectives add run stat.playOneMinute  scoreboard players set @a[score_run_min=40] run 0  execute @e[score_run_min=10,score_run=10] ~ ~ ~ say 3 execute @e[score_run_min=20,score_run=20] ~ ~ ~ say 2 execute @e[score_run_min=30,score_run=30] ~ ~ ~ say 1 execute @e[score_run_min=40,score_run=40] ~ ~ ~ say START!   I set /gamerule doLoopFunction to this file and run it with /function. In my imagination it will like say 4 times and reset then say again. But it just resets the timer and the timer runs overtime. When i activate the function again at exactly time it says. Now how can i make it run like my imagination.Thanks.


About Poincaré-Hopf theorem: can we find and draw $v$ with only one zero on $S$?

Disclaimer: It turns that that there is a positive answer to a more general question than my original question (see ), but this answer isn't what I am really looking for: I would like some visual constructions. Also I don't want to make a new post because an answer has already been posted.   The Poincaré-Hopf theorem (for surfaces) states that if $v$ is a smooth vector field with isolated zeros on a compact surface $S$, then the sum of the index of these zeros is equal to the Euler characteristic of $S$:  $$\sum_{x\text{ zero of }v} ind(v,x)=\chi(S).$$  Also during the proof that I know, we constructed explicitly a vector field $v$ on $S$ with isolated zeros, namely by triangulating the surface. My original question was:     In the case where $\chi(S)\neq 0$, i.e $S$ is neither a torus nor a klein bottle, can we ask that $v$ has only one zero $x_0$, which therefore satisfies $ind(v,x_0)=\chi(S)~?$   So it turns out that this is true in general (even in higher dimensions). What I really want to know, now that the existence of such vector field is proven, is this:     Can we provide some (nice) pictures of these vector fields $v$ on $S$?   This can be done when $S$ is the sphere $S^2$, by pulling back the constant vector field $\frac{\partial}{\partial x}$ on $\Bbb R^2$ via the stereographic projection and extending this pulled-back vector field to $0$ on the north pole. The picture is as follows (with a zoom on the right):    For the case where $S$ is the protective plane $\Bbb{RP}^2=S^2/_{\{\pm id\}}$, this is also possible.  If we take the vector field on the sphere which is drawn below (each trajectory stays in horizontal hyperplanes basically) then this vector field has two zeros (the north pole $N$ and the south pole $S$), both of degree one. Moreover, this vector field is invariant under the antipodal map, and therefore it gives rise to a vector field on $\Bbb{RP}^2$ and this vector field has only one zero, namely $x_0=\{N,S\}$, with degree $1$.    For the case $S=M_g$ of the connected sum of $g\geq 2$ torus, I tried to do drawings and write $M_g$ as a polygon with edges identified, but I can't find an example. For example at least when $g=2$, I am hoping to find a comprehensive picture (on the embedded surface or on the polygon with edges identified).  I haven't thought about the other cases yet (connected sum of projective planes), but it should be of the same difficulty.  Any help would be greatly appreciated!


What verb, phrase or phrasal verb do you use when you are waving your hand to scare off or kill a fly? Can I say swat at? For example:  I swatted at a fly for hours with no success.  I am sure there are others phrases, but I can't remember it. It sounds like spat away or bat away.


Tangential acceleration in circular motion?

A lot of my problems have objects moving in circular paths with tangential and normal components of acceleration.  If the tangential component is non-zero though, the speed is changing so the radius of its path would also be changing.  So how can its path be considered circular? The size of of its radius of curvature of constantly changing.


How to print the characters horizontally?

def rand_gen1():     import random     for i in range(8):         print random.choice('0123456789abcdefghijklmnopqrstuvwxyz')   The above piece of code prints a string of 8 random chars or ints or both vertically. I need it to print like 'abcd123b' i.e. horizontally.  What changes do I need to make ?


Primary key for link/junction table with time-dependent data

I want to link two tables in such a way that for any given time period the relationship is one-to-one, but over time the relationship can change.  As an minimal example, suppose I want to list the leaders of various countries in a database that tracks many politicians, including those in positions other than 'leader'. I can create a table of politicians, and a table of countries, like so:  CREATE TABLE politician (   id integer unsigned NOT NULL,   name varchar(45) NOT NULL,   PRIMARY KEY (id) );  CREATE TABLE country (   id integer unsigned NOT NULL,   name varchar(45) NOT NULL,   PRIMARY KEY (id) );   Now, if every country had only a single leader forever, I could just link these with a table such as:  CREATE TABLE country_leader (   countryid integer unsigned NOT NULL,   leaderid integer unsigned NOT NULL,   PRIMARY KEY (countryid, leaderid),   KEY fk_countryleader_country_idx (countryid),   KEY fk_countryleader_politician_idx (leaderid),   CONSTRAINT fk_countryleader_country FOREIGN KEY (countryid) REFERENCES country (id) ON DELETE NO ACTION ON UPDATE NO ACTION,   CONSTRAINT fk_countryleader_politician FOREIGN KEY (leaderid) REFERENCES politician (id) ON DELETE NO ACTION ON UPDATE NO ACTION );   However, this situation obviously isn't the case, because existing leaders are sometimes re-elected (possibly even with some time between two different terms in office), and when they aren't then new leaders take over. So I think that a better link table would look something like this:  CREATE TABLE country_leader (   countryid integer unsigned NOT NULL,   leaderid integer unsigned NOT NULL,   termstart date NOT NULL,   termend date NOT NULL,   PRIMARY KEY (???),   CONSTRAINT ???,   .... );   So my question is, what is the best way to fill in the missing PK and constraint information in the junction table country_leader? Or should I be using a different approach to solve this problem?


I have a dilemma where I have a string of binary code that is all one line. Like this 0110000101110000011100000110110001100101 (or apple), but I need a way to read every 8 characters to form the full code for the letter so I can convert it.  For some background on how I store the binary, I store it in a dict with the keys as the letters and binary as a string: binary = {"a": "01100001"}, later I swap the keys and values. I can't find a way to read the string in 8 characters chunks like so 01100001 = a or 01100101 = e, but it has to happen all at once in a for a loop.  def binary_string(bin):     res = dict((v, k) for k, v in binary.items())     data = []     for bit in bin:         if bit in res:             data.append(res[bin])         else:             print("Couldn't find " + bit + "'s letter")     load = str(data).strip("[]")     return load   I am looking for a way to say: for every 8 characters in this string: append the letter equivalent to a list, and from there I have no problem creating the output to my desire.


Why is $(C([a,b]),||\cdot||_{1})$ not complete?

Question: I'm supposed to show that $(C([a,b]),||\cdot||_{1})$ with $||\cdot||_{1}:=\int^{b}_{a}|f|dx$ is not complete.  My attempts: I am trying to find a function sequence $f_{n}:[0,1]\rightarrow \mathbb{R}$ in  $(C([0,1]),||\cdot||_{1})$ that is a Cauchy sequence but that diverges regarding $||\cdot||_{1}$. Is this correct?  I can think of countless examples that either converge with respect to $||\cdot||_{1}$ OR are Cauchy but I can't find any sequences that are BOTH. One strategy I've been trying is to push a function into the domain that isn't defined on the whole domain e.g. $f_{n}:[0,1]\rightarrow\frac{1}{x-\frac{1}{n}}$ but until now still in vain.  Any ideas would be greatly appreciated :)


How to install 32-bit Windows apps on 64-bit Ubuntu (ver : 14.04)?

I am getting errors while running 32-bit windows applications via Wine 1.7 on Ubuntu 14.04 64-bit. Please help.


JavaScript Promises: Failure to understand when Resolve is in scope

I've been trying different ways of resolving a Promise with inconsistent results. I've included two code snippets, and I'm unsure of what is happening differently so that the first resolves successfully while the second fails.  In this first attempt, I include an IIFE in the Promise, and the IIFE recognizes resolve despite the fact that I didn't pass this into the function itself. The result is "test" being successfully logged to the console:  const testFunction = function() {   return new Promise(function(resolve) {   !function() {     resolve();   }();   }); };  !async function() {   await testFunction();   console.log('test'); }();   In the next example, I created a separate function which is called within the Promise. However, this other function doesn't seem to know what resolve is unless I define the function to take a parameter and then pass resolve through later on. This version below does not work:  const printSomething = () => {   resolve();   }  const testFunction = function() {   return new Promise(function(resolve) {     printSomething();   }); };  !async function() {   await testFunction();   console.log('test'); }();   I expected that since printSomething is running within testFunction, just as the IIFE was, that resolve would be available. Any explanation to clear this up would be helpful. Apologies in advance if this is actually a failure of understanding scope in general and not specific to Promises.


I reinstalled MiKTeX and now I can't make bibliographies anymore. I have a file called a.tex containing \documentclass{book} \usepackage[backend=biber]{biblatex} \bibliography{b}  \begin{document} \cite{a} \printbibliography \end{document}  and b.bib containing @book{a,     title={a},     author={a} }  Even after compiling multiple times with LaTeX and biber, there is no bibliography and it says that the citation is undefined. Am I missing something? Why doesn't it work? I installed the latest updates in the MiKTeX console.


i have problem. I Dont know why, but i cant render anything in "CUDA" and "OptiX" but OpenCL work fine. And i cant use Cykle render beacuse it's very laggy. I Have newest  version of Blender and i have RX 590 Red Dragon 8gb. Why something like that happend to me?   Look i have screenshot, how i can "turn on" my gpu?


I was trying to change the msg_max queue size on my ubuntu 14.04 system. Here is the console output:  $ sudo echo 500 > /proc/sys/fs/mqueue/msg_max -bash: /proc/sys/fs/mqueue/msg_max: Permission denied  $ $ cat /proc/sys/fs/mqueue/msg_max 1000  $ sudo echo 500 > /proc/sys/fs/mqueue/msg_max -bash: /proc/sys/fs/mqueue/msg_max: Permission denied  $ sudo sh -c "echo 500 > /proc/sys/fs/mqueue/msg_max" [sudo] password for XXX:  $ cat /proc/sys/fs/mqueue/msg_max 500   My question is why the first approach using echo directly is not working while the other one using sh -c works?


Can you round a .NET TimeSpan object?  I have a Timespan value of:  00:00:00.6193789  Is there a simple way to keep it a TimeSpan object but round it to something like 00:00:00.62?


Let A and B be square matrices of same order. Are the characteristic polynomials of AB and BA same? A and B may be invertible or not.

If A or B are invertible than I am able to prove that characteristic polynomials of AB and BA are same. But in second case I am sticking.


Use the binomial theorem to prove that for $n$ a positive integer the following holds

\begin{equation} \left(1+\frac{1}{n}\right)^n = 1 + \sum_{k=1}^n\left\{\frac{1}{k!}\prod_{r=0}^{k-1}\left(1-\frac{r}{n}\right)\right\}\,.\tag{1} \end{equation}  Proof.  By the binomial theorem  $$\left(1+\frac{1}{n}\right)^n = 1+ \sum_{k=1}^n  {{n}\choose{k}}\left(\frac{1}{n}\right)^{k}.$$ Hence, to prove $(1)$, we must prove that   $$ \sum_{k=1}^n  {{n}\choose{k}}\left(\frac{1}{n}\right)^{k} = \sum_{k=1}^n\left\{\frac{1}{k!}\prod_{r=0}^{k-1}\left(1-\frac{r}{n}\right)\right\}\,,\tag{2} $$  for all positive integers $n$.   At present I can't find any reasonable quantity that if added on both sides leads to equality for $n+1$, i.e. the quantity that completes the proof. Any hint is appreciated.  EDIT: A similar question has been asked in  and  posts. What I'd like to do is to prove that (1) (or (2)) holds for any integer $n>0$. @Netchaiev's answer and those provided in the aforementioned posts are correct for a specific $n$, but what about for an arbitrary integer $n>0$ ?   I guess that the proof-by-induction should do the job but I don't see how.


In Revenge of the Sith, Palpatine orders clone commanders to execute 66 which is to kill the Jedi as their are now traitors to the Republic but why didn't the Clones kill Anakin since he is a Jedi.


I made an application for a UK visa for my 72-year-old mother-in-law. The main reason was for her to come and celebrate with us my son's 2nd birthday, since she hasn't ever met the grandchildren. I honestly had no idea of her travel history so I ticked no to the question whether she had ever been refused a visa? After submitting it online, my husband (her son) told me she has been refused a visa twice, before we he had met (in 2011 and 2012).  The application was refused and she was given a 10-year ban. I feel so sorry and sad because I caused this. The old woman had no part in this; she is heartbroken and we don't want to lose her because of this.  Is there any way we can lift the ban and reapply? She keeps saying that if she meets her grandchildren and dies a day after, she will forever rest peacefully.


Install unstable Qgis-master alongside release version

Good day I have the release version of Qgis (2.16) installed into Mint and it can be updated just with apt install qgis whenever a notification comes out that a new version is released.  I want to also install the latest master (2.99) alongside 2.16 for testing but I don't want 2.16 to be overwritten in case there is a problem with master.  Unlike the Windows scenario where you can install different versions of the osGeo4W package to have several versions of Qgis, I haven't been able to work out a way of just creating a 2nd Qgis installation alongside the existing one. I haven't been able to find a simple install package I can download, just repositories, but I haven't been able to work out how to get the master version from them.


I am so confused,  how to get a solution of following differential equation:  $$(y')^2 -xy' + y = 0$$  My Thought:  Try solving $y'$ to get $y' = \dfrac{ x \pm \sqrt{x^2 - 4y}}{2}$ and now its unsolvable. Kindly help, appreciated.


What are the equivalent IPV6 versions of IPV4 special-use adresses?

I'm trying to make a private network with 5 computers bellow an external  with , but internally I want to use . To do this I need to use private special-use IPV6 addresses, such as the well-known 192.168.x.x or 10.0.0.x  blocks.  Does someone know what are the private IPV6 addresses for this specific use?


I was using Blender for some time without issue. Recently I have found I am unable to save even a brand new document.  I am given the error message: "cannot open file  for writing: No such file or directory".  I have seen a similar post before which simply recommended blender needs to be run with administrator privileges. The account that is unable to save is the administrator.  I have posted a query to the microsoft forums but I also wished to see if there is a chance this is a blender issue.  Thanks


Short story where a snail-like alien creature preys upon the protagonist in the end

The description of the story may be a little bit wrong since I read this story many years ago. Also, the short story is not recent (thinking maybe written in the 50s or 60s) and it is science fiction/horror.   It deals with this man who is going to buy a relic from a seller and the seller tells this story about alien creatures which don't have any other senses besides the touch, they behave just like snails and are really slow. The thing is the aliens use objects to prey. When other creatures touch these objects they enter a trance-like state and become hypnotized so they are unable to move to the advantage of the aliens which have the time to hunt them. As the seller tells this, he deposits the relic in the man's hands and he becomes instantly unable to move. The story ends with an alien snail-like monster entering the room and slowly going in the protagonist's direction.  I have read other threads with similar questions, however, this is not On The Fourth Planet.


Why is the upper Riemann integral the infimum of all upper sums?

I was reading the theory of Riemann integration when I cam across the following ,   If $f$ is bounded on $[a,b]$, and $P = \{x_0,x_1,x_2.......x_n\}$ is a partition of $[a,b]$, let $$M_j = \sup_{x_{j-1}\leq x\leq x_j}f(x)$$ The upper sum of f over P is $$S(P) = \sum_{j=1}^{n} M_j(x_j-x_{j-1})$$ and the upper integral of $f$ over $[a,b]$, denoted by $$\int_{a}^{b^-} f(x)dx$$ is the infimum of all upper sums.  The theorem similarly goes on to state the result for lower sums.  My doubt is : I do not understand how is $$\int_{a}^{b^-} f(x)dx$$ the infimum of all upper sums. I understand that if we refine the partition P, then the upper sum would decrease, so it may be a lower limit for all the upper sums computed on the refinements of P (but still being the lower limit does not prove that it is the infimum) and what about those partitions for which P itself is the refinement of?  How do I know that it will be a lower limit for those, let alone a infimum?


I have a function that takes an array of strings and map each string to a Date instance. The function boils down to the following code.   Private Function ParseDates(dates() As String) As Date()   Dim res() As Date   Dim i As Integer    If UBound(dates) >= 0 Then     ReDim res(UBound(dates)) As Date   End If     For i = LBound(dates) To UBound(dates)     res(i) = #01/01/2000#   Next i   ParseDates = res End Function   The function works just fine as long as the argument dates is nonempty. When dates is empty res is not given a dimension. As a result, the returned value is not enumerable causing to users of this function to crash if the result is enumerated in a loop.  parsedDates = ParseDates(input)  For i = 1 To UBound(parsedDates) ' Suscription out of range   ...   How do I instantiate and return an empty array, when dates is empty?   If you call Split("",".") you receive an object with type String(0 to -1). I need my function to return a object of type Date(0 to -1) as Date() is not an actual array.   I have tried with ReDim res(-1) this causes an Subscript out of range error.


Using rsync to ensure two directories have exactly the same files

I want to clone one very large directory (many terabytes of multiple-gigabyte files) into another on another drive. I have been using this command:  ionice -c 3 rsync -avz /path/to/sourcedir/ /path/to/destdir/   The process takes over a day and more often than not gets interrupted, hence the use of rsync to be able to resume without restarting from zero. The theory should be that the above command is idempotent, so when anything fails I should just be able to reissue the same command to let it work out where it was interrupted and continue from there.  Now, because the point of the operation is to retire and recycle the source drive, before doing that I wanted to be super-sure that all files had been properly copied. So I used the approach in  to compare each file byte by byte. Sure enough, there were a number of files that had a different hash.  So the theory question: does rsync, unlike what I thought I understood, work merely on file names, rather than content, or at least length?   And the (more important) practice question: are there other options I could be using instead, to force rsync to produce an exact clone of the source directory? In particular, in the case in which rsync is launched when the dest directory already has a file with the same name as one in the source directory, but with different content, I want the command to ensure it is replaced (or "completed") with the actual original file from the source directory.


What's the name of the two diagonals in a 2D plot?

In a 2D plot (with x and y), what's the correct name of the diagonal lines, i.e. the line at 45° and that at 135°?


Old book series about a young shadow user

About 15-20 years ago I read a book about a young boy / man who lives in a sheltered community. They are protected by some sort of force field and most if not all of them can control some sort of shadow. He does something and gets thrown into a hole to "rot" there by one of the highest members of the community. But thanks to his shadow he manages to escape out of the hole and the communities place (an old fortress?).  He then gets into the surrounding lands and befriends a girl who travels on a ship that travels over land (some sort of pirates or junk gatherers). They hate those shadow users. Still though she helps him.   He then wants to get back to the community to warn them about the plans of their leader (which lead to their destruction / death).  From what I also remember his father was also once thrown into the hole and died there?  That is about all I remember there sadly.


Loading more comments inverts comment order

Tap "2 more comments..."    SE App 1.4.1 / iPhone 5s / iOS 9.2


For loop is not iterating within setTimeout

I'm trying to figure out why this for loop does not render out 0,1,2,3 like its suppose to.  It renders 4, 4 , 4, 4.  How would i get this to print 0, 1, 2, 3 with the setTimeout still in place ?  for (var i = 0; i < 4; i++) {        setTimeout(function() {              console.log('The index of this number is: ' + i);        }, 3000);  }


Quick question:  "The duo known as Pin Up Club owes its name to..."  In this sentence, am I correctly referring to 'the duo' with 'its name'? Or should this be 'their name'?  Thank you in advance.


The scroll bars are too narrow to use, both in Ubuntu 20.04 windows and in application (Firefox) windows.  How can I make the scrollbars wider?  I'm new to Linux and I expected it to be more configurable; is Ubuntu Gnome not the best in configuration flexibility? I left Microsoft because, although XP was the best OS I've every used (almost infinitely configurable), Windows 7 has lost most of that user control.  Ubunutu is worse than even Windows 7 in that respect - VERY limited flexibility in the desktop. I installed Ubuntu 20.04 LTR and so expected Gnome 2, but apparently Gnome 3 was installed.  How can I get Gnome 2 back?  I also don't like snapd.  Should I just try another distro, like Mint or Debian and use KDE - something less proprietary?  Ubuntu is pretty useless to me if I can't even use the skinny scrollbars and Gnome provides no way to fix that(I'm 72). Thanks, AnneF


Can I have multiple DHCP servers on one network?

This is a  about Redundant DHCP Servers.   Is it possible to have more than one DHCP server on the same LAN? What are the implications of doing this?    What happens if there is more than one DHCP server available? How do my clients know which one to use?  How can I have DHCP servers supplying addresses to more than one subnet\network segment? How can I configure multiple DHCP servers to supply addresses for the same subnet.


How to create pick list of state and country in Lightning component?

I am making an component in lightning. i want to know how can we use the state and county picklist in this particular code.  secoundly the functionality of save and cancel button is also not working in the lightning component.Help me out.  Thanx
                     <form class="formbusiness">
Account Information

Business Account Info

                 <ui:inputText aura:id="b_cname" class="form-control" value="{!v.newBAccount.Name}" placeholder="Company Name" required="true"/>                 <ui:inputNumber aura:id="b_bphone" class="form-control" value="{!v.newBAccount.Phone}" placeholder="Phone" required="true"/>                 <ui:inputEmail aura:id="b_bemail" class="form-control" value="{!v.newBAccount.Email__c}" placeholder="Email"/>

                 <ui:inputText aura:id="b_bstreet" class="form-control" value="{!v.newBAccount.BillingStreet}" placeholder="Billing Street"/>                 <ui:inputText aura:id="b_bcity" class="form-control" value="{!v.newBAccount.BillingCity}" placeholder="Billing City"/>                 <ui:inputText aura:id="b_state" class="form-control" value="{!v.newBAccount.BillingStateCode}" placeholder="State"/>                 <ui:inputText aura:id="b_country" class="form-control" value="{!v.newBAccount.BillingCountryCode}" placeholder="Country"/>                 <ui:inputNumber aura:id="b_zipcode" class="form-control" value="{!v.newBAccount.BillingPostalCode}" placeholder="Zip Code"/>

Respective Contact

                 <ui:inputText aura:id="b_rcfirstname" class="form-control" value="{!v.newBRCAccount.FirstName}" placeholder="First Name"/>                 <ui:inputText aura:id="b_rclastname" class="form-control" value="{!v.newBRCAccount.LastName}" placeholder="Last Name" required="true"/>                 <ui:inputNumber aura:id="b_rcmobile" class="form-control" value="{!v.newBRCAccount.MobilePhone}" placeholder="Mobile" required="ture"/>

                 <ui:inputEmail aura:id="b_rcemail" class="form-control" value="{!v.newBRCAccount.Email}" placeholder="Email"/>                 <ui:inputNumber aura:id="b_rcphone" class="form-control" value="{!v.newBRCAccount.Phone}" placeholder="Phone"/>

             <ui:button label="Save" press="{!c.createBAccount}"/>             <ui:button label="Cancel"/>
             </form>


How to assign permanent drive letters to removable USB hard drives

I have scripts that expect specific drive letters for hard drives. Windows sometimes assigns the different drive letters (e.g. I expected my Maxtor drive to be E:, but it's now F:, therefore my scripts will fail), depending on the order of how the drives are plugged into my laptop.  In Windows 7, how do I assign a permanent drive letter to a drive?


Answers Not matching with this question about float and double values

int main()  {     float f=0.5;     if(f==0.5)         printf("True\n");     else         printf("False\n");  }   The answer is True in this case. If i take f value as 0.1 or 0.2 or 0.3 etc, the answer is False. Can anyone explain the reason for this.


Prove that $|x| + |y| \le |x-y| + |x+y| $

I tried working from both sides: $| |x| + |y|| = | |x| + |x| - |x| + |y|| = | 2|x| + |y| - |x|| \le |2x| + | |y| - |x| |$ $\Longrightarrow||x| + |y|| = |x| + |y| \le |2x| + | |y| - |x| |$ Then, $|2x| = |x - y + x + y| \le |x-y| + |x+y| $ Can someone help me from this point on?


If a character can use a +X magic weapon as a spellcasting focus, does it add the bonus to spell attacks or spell save DCs?

My 5e College of Swords bard can use a weapon as a spell focus for their spell casting.   If they have a +1 rapier and cast a spell requiring a spell attack roll, do they get the +1 added to their spell attack bonus? What about spell damage?  Likewise, if they cast a spell requiring a saving throw, do they get the +1 added to the spell's DC?


How to enable 4GB in my Windows 7 64 bit?

I have the following machine configuration:   Intel Core 2 Duo E6300 1 x 2048 MBytes memory chip 2 x 1024 MBytes memory chip 1 x Radeon HD 4870 Motherboard : Gigabyte 945P-S3 Windows 7 RTM 64-bit   In both Windows and the BIOS I have 3.25GB memory available. How can I enable it to support 4GB?  EDIT: I've sort of upgraded the CMOS version, and Windows acknowledges I have 4GB but is only using 3.25GB.    I guess it is hardware after all?


Constructing perfect set without rationals by removing open neighborhood around rationals

Let $\{r_n: n\in \Bbb N \}$ be all rationals and $\epsilon_n = \frac 1 {2^n}$. Then is    $$ F = \bigcap_{n=1}^\infty \left ( \Bbb R\setminus B(\epsilon_n; r_n) \right ) $$   perfect? If not how can it be modified so that ($F$) it can be made perfect?   This is last part of problem 3.4.9 from Understanding Analysis - Abbott. I am hard time proving or disproving it.     Does there exists an enumeration of $\Bbb Q$ which leaves an isolated point under given conditions?  My guess is if I take sub-sequence $n_k$ s.t. $r_{n_{k+1}}$ is boundary point (always on right side) of $B(r_{n_k}; 1/2^{n_k})$. Suppose I begin with rational $x$ whose index is under some enumeration is $n_1$, then I must end up at some irrational number $r$.\  Now suppose I begin with rational $y$ whose index is $m_k$ such that $r_{m_{k+1}}$ is boundary point (always on left side) of $B(r_{m_k}; 1/2^{m_k})$ and I end up with same irrational number $r$ as above.  Does such $y$ exist, and disjoint sequence $(n_k), (m_k)$ exist?


NullPointerException when reading a properties file in Java

I am  using the following code to read a properties file:  Properties pro = new Properties(); InputStream is = Thread.currentThread().getContextClassLoader().     getResourceAsStream("resources.properties");  pro.load(is);   And when I execute the code I'm getting the following error:  Exception in thread "main" java.lang.NullPointerException   at java.util.Properties$LineReader.readLine(Properties.java:418)   at java.util.Properties.load0(Properties.java:337)   at java.util.Properties.load(Properties.java:325)   at com.ibm.rqm.integration.RQMUrlUtility.RQMRestClient.getResource(RQMRestClient.java:66)   at com.ibm.rqm.integration.RQMUrlUtility.RQMRestClient.main(RQMRestClient.java:50)   Why am I getting a NullPointerException? And where should I save the resources.properties file?


What program generated output "Memory pressure relief"?

I am running two background jobs eclipse and wine in my terminal emulator lxterminal, when the terminal shows   Memory pressure relief: Total: res = 39469056/39215104/-253952, res+swap = 35393536/35139584/-253952   I was wondering what program generated the output?  Thanks.


Does Gentle Repose work on a Circle of Spore Druid's Fungal Infestation Ability?

The Circle of Spores Druid feature Fungal Infestation states:  If a beast or humanoid that is Small or Medium dies within 10 feet of you, you can use your reaction to animate it, causing it to stand up immediately with 1 hit point. The creature uses the zombie statistics. It remains animate for 1 hour, after which time it collapses and dies.  Circle of Spore druids also gain access to the  spell, which states:  You touch a corpse or other remains. For the duration, the target is protected from decay and can’t become undead. The spell also effectively extends the time limit on raising the target from the dead, since days spent under the influence of this spell don’t count against the time limit of spells such as raise dead.  There seem to be some good arguments that they cannot work together:  First, Gentle Repose states the target cannot become undead, which would seem to preclude Gentle Repose working on a fungally infested creature that appears to be in some sense raised from the dead. Second, gentle repose states you touch a corpse or other remains - one could argue that using the zombie statistics, the fungally infested entity is neither a corpse or remains, but an undead zombie.  However, there are also some reasonable arguments that they could work together:  First, the Fungal Infestation does not say that the creature is undead or a zombie, but that it uses the statistics of a zombie, which might leave room for a RAW interpretation that the features could work together (for example, it could be considered a fungally infested corpse or fungally raised remains). Second, Gentle Repose says that it extends the time limit of raising the target from the dead and makes reference to spells like Raise Dead, which in flavour are similar to what happens with Fungal Infestation.  RAW, can a player cast gentle repose on a zombie created by Fungal Infestation?


Fourier transform of a function with sine

I don't know how to compute the Fourier tranform of this function:  $f(x) = \frac{\sin \pi a x}{\pi x}$  I know that $\frac{\sin \pi a x}{\pi x} = \frac{e^{i \pi a x} - e^{- i \pi a x}}{2i \pi x}$  Then I plug this function in the formula for the Fourier transform and I get:  $$\int_{\mathbb{R}}\frac{e^{i \pi a x} - e^{- i \pi a x}}{2i \pi x} e^{-i s x} dx =$$  $$= \frac{1}{2 \pi i } \int_{\mathbb{R}} \frac{e^{ix( \pi a - s)} - e^{- i x( a \pi +s)}}{x}  dx=$$  $$=\frac{1}{2 \pi i } \int_{\mathbb{R}} \frac{e^{ix( \pi a - s)}}{x} dx - \int_{\mathbb{R}} \frac{e^{- i x( a \pi +s)}}{x}  dx$$  What should I do know? We can get rid of $i$ in the exponent by changing variables, but that doesn't help much


Attach CSS classes to programmatically created blocks

Is there a way to set CSS classes to blocks when creating them via hook_block_info and hook_block_view? I tried to use '#attributes', '#classes_array' and '#attributes_array' options but with no success. I understand that I can do it in preprocess function but I believe this is not a right way.


Can a Wild Magic Barbarian restore a 7th(+) Level Warlock's spell slots?

In the recently released preview of the Wild Magic Barbarian that will be in Tasha's Cauldron of Everything (), I noticed the 6th level feature 'Bolstering Magic'. This feature has two applications. One acts as a Bless-type option, the second one reads:  Roll a d3. The creature [you're touching] regains one expended spell slot, the level of which equals the number rolled or lower (the creature’s choice). Once a creature receives this benefit, that creature can’t receive it again until after a long rest.  Suppose this effect is used on a Warlock of level 7 or above, and for the sake of argument suppose we rolled a 3 on the d3. All of their spell slots are of spell level 4. What happens?  Nothing, the Warlock doesn't have the right type of spell slot to regain The Warlock has (expended) spell slots of Level 4 and higher, and now has a level 3 spell slot Something else happens, namely ...


Is it possible to transform Ubuntu 16.04 to an Ubuntu server? Without deleting and reinstalling...


I'm on vacation in NYC. Can I visit/tour the Stack Exchange Headquarters?

To make this question less localized: "If one is in New York City, is it possible to tour the Stack Exchange Headquarters?"      Original Question (7/14/2012):  I live in Los Angeles (Orange County actually) and this is my first time in New York City!  My girlfriend and I are staying in a friends apartment on the upper east side of Manhattan; we have 7 day unlimited subway passes and are doing all the touristy stuff.  I thought it would be fun one afternoon to come say hi to the people that run my favorite network of sites.  My girlfriend knows Stack Overflow as "that site I am always on" and when I mentioned the idea to her she also thought it would be fun to visit the SE HQ.    So, can my girlfriend and I come tour the Stack Exchange office(s) sometime in the next few days while we are here in NYC? (We are here until Wednesday (7/18) morning, so Monday or Tuesday would be perfect [assuming the offices are closed on weekends])


Forming a Possesive of an Already Possesive Name (Possessive of "Xyz's" is ...?)

How does one formulate a possessive of a name that is itself already in possessive form ("'s")?  Is the name just treated as a unitary term and modified accordingly?  Is this even possible in formal English?  Actual example in context from  :     Two best lists I've found:         -- though I'm loathe to ever link there as I dislike the mods so much, Chiron deserves props for creating and frequently updating this almost   comprehensive list         -- needs updating but includes a few outside Chiron's ambit/Gizmo's' policy (What is the possessive of a name that is itself a   possessive?)   Yes, I could have finessed the issue by reformulated the sentence slightly (i.e., "policy of").    As a former data processing developer, I've found person names an especially difficult concept to model and implement.  Thank goodness I never had to deal with the glyph used by the musician formerly known as Prince.  Does anyone have an example of an actual person's name with this formulation?  I used to work with someone who collected "odd to Western sensibilities" example names but I've lost touch.    This is a problem I've had in other contexts with corporate names.  My favorite pizza place is "Mia's".  In line with the US Supreme Court ruling, I frequently hear a business treated as a person in colloquially usage.  Some may take exception to "though", prefer an attributive rather than possessive in the context of "policy", or otherwise question my choices herein.  This is a linguistics forum.  Have at it in the comments unless applicable to the question.  (Have fun.  Bonus point from me for a comment with an especially amusing or thought provoking example or that is generally witty or pithy if remotely on point.)   Whether/when a possessive of a noun ending is "s" is formed by a trailing apostrophe or apostrophe-s is mildly off topic unless directly applicable (i.e., because example is a proper name, already in possessive form, or an exception).


replacecmpd does not let me choose my own label

I'm trying to make use of the \replacecmpd command of the chemnum package in LaTeX in combination with eps files produced by ChemDraw. While this works great for the automatic numbering of chemicals by numbers, it will not let me choose my own label although the CTAN provides an example of how to do this.    The EPS file shows 2 chemical compounds with "TMP1" and "TMP2" underneath them I can replace them by "1" and "2" using the standard \replacecmpd{X1} command What I want though, is for LaTeX to write "Compound 1" instad of "1" both in the figure as well as in the text whenever I refer to that compound by \cmpd{X1}.   I'd greatly appreciate any help, thank you guys! :)  Here's my minimal example:  \documentclass[12pt,a4paper,titlepage,twoside,numbers=noenddot,openright,BCOR12mm]{scrreprt}  \usepackage[utf8]{inputenc} \usepackage{pdfpages} \usepackage{graphicx} \usepackage[crop=off]{auto-pst-pdf}  \usepackage{chemnum}  \usepackage{psfrag}   \setchemnum{init,log=verbose}  \graphicspath{{../EPS/}{../Compounds/}}  \begin{document}  \begin{center} \begin{minipage}{\linewidth} \centering \replacecmpd[tag=Compound1]{X1} \replacecmpd[tag=Compound2]{X2} \includegraphics{Compounds.eps} \end{minipage} \end{center}  \end{document}   edit: I also noticed that I cannot reproduce the example provided in the CTAN manual about chemnum. Any ideas why that might be the case?


I was thinking about the definition of the conservation of momentum, which says that momentum is conserved unless outside forces are acting on the system, and I was wondering that if the system is the universe, if momentum must be conserved.  To put it more clearly, is momentum in the entire universe conserved?  (I know about the second law of thermodynamics, but I do not think that it applies if we are considering individual particles since there are no "heat losses" at that level (elastic collisions in Kinetic Molecular theory, etc).)


Sum of squares of the quadratic nonresidues modulo $p$ is divisible by $p$

Let $p$ be a prime number with $p > 5$. Prove that the sum of the squares of the quadratic nonresidues modulo $p$ is divisible by $p$.  My idea is to use the fact that any quadratic residue is congruent modulo $p$ to one integer in the set $\{1^2,2^2,\ldots,\left( \frac{p-1}{2} \right)^2 \}$. And none of the quadratic residues are congruent to each other. So the quadratic nonresidues must all be in the set $\{ \left( \frac{p+1}{2} \right)^2 , \left( \frac{p+3}{2}\right)^2 \ldots, (p-1)^2\}$. So the sum of the quadratic nonresidues must be given by $$\sum_{k=1}^{p-1} k^2 - \sum_{k=1}^{\frac{p-1}{2}}k^2 = \frac{(p-1)p(2p-1)}{6} - \frac{\left( \frac{p-1}{2} \right) \left( \frac{p+1}{2} \right) p}{6} = \frac{p}{6} \left( (p-1)(2p-1) - \frac{1}{4}(p-1)(p+1) \right).$$ Is this the correct approach? Prove that the term in parenthesis is an integer divisible by $6$?


How can I enable the drivers for beats audio speakers for hp envy dv6?

I recently shifted to Ubuntu.  My beats audio speakers connected to my laptop are not working. I am using an hp ENVY dv6 laptop.  What should I do?


Would it be possible to make a 36×36 mm "full frame" sensor?

since all lenses are round, full frame cameras' sensors can be 36 × 36 millimeters. Correct? Is it possible, and if so, why it has not been done yet?  Would that qualify it as medium format?