Code: public class ContactUsFormTest {  WebDriver driver; @BeforeMethod public void run() { System.setProperty("webdriver.chrome.driver", "Driver Path"); driver=new ChromeDriver(); driver.get("URL"); driver.manage().deleteAllCookies(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);  } @Test(dataProvider="contactUs") public void contactUs(String firstname,String preference,String lastname,String email,String text,String phone) throws InterruptedException {         driver.findElement(By.id("first_name")).sendKeys(firstname);     //drop down handling     Select sel = new Select(driver.findElement(By.id("preference")));     sel.selectByVisibleText(preference);     driver.findElement(By.id("last_name")).sendKeys(lastname);     driver.findElement(By.id("email")).sendKeys(email);     driver.findElement(By.id("textarea")).sendKeys(text);     driver.findElement(By.id("phone")).sendKeys(phone);     Thread.sleep(2000);     driver.findElement(By.name("submit")).click();     Thread.sleep(3000);     //Validation     Assert.assertTrue(driver.getTitle().contains("Successful submission"), "Page title verified-Submission UnSuccessful");     System.out.println("Page title verified-Successful submission");  }  @DataProvider(name="contactUs") public String[][] formData() throws Exception {     Thread.sleep(3000);     ExcelDataConfig eData=new ExcelDataConfig("Excel sheet path");     int rows=eData.getRowCount(0);         String[][] data1=new String[rows][6];         for(int i=0;i<rows;i++)     {         data1[i][0]=eData.getData(0, i, 0);//first name         data1[i][1]=eData.getData(0, i, 1);//preference         data1[i][2]=eData.getData(0, i, 2);//last name         data1[i][3]=eData.getData(0, i, 3);//email         data1[i][4]=eData.getData(0, i, 4);//text         data1[i][5]=eData.getData(0, i, 5);//phone     }     return data1;  }  } I am fetching the data from the excel sheet while performing test I am getting below error. Error: [Utils] [ERROR] [Error] java.lang.NullPointerException at dataDrivenFramework.dataDrivenFramework.ExcelDataConfig.getData(ExcelDataConfig.java:31) at dataDrivenFramework.dataDrivenFramework.ContactUsFormTest.formData(ContactUsFormTest.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) Here is ExcelDataConfig class: public class ExcelDataConfig { XSSFWorkbook wb; XSSFSheet sheet1;  //Constructor public ExcelDataConfig(String excelpath) {          try {     File file=new File(excelpath);      FileInputStream fis=new FileInputStream(file);     wb=new XSSFWorkbook(fis); }  catch (Exception e) {          System.out.println(e.getMessage());  }  }  public String getData(int sheetNumber,int row,int column) {     sheet1=wb.getSheetAt(sheetNumber);     String data=sheet1.getRow(row).getCell(column).getStringCellValue();          return data; }   public int getRowCount(int sheetIndex) {     int row=wb.getSheetAt(sheetIndex).getLastRowNum();     row=row+1;     return row;      }  } I have no clue why I am getting this.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I asked this question on EL&U Meta and it was suggested I post it here.  Does anybody know if there is a way that I could print out all of my answers and or questions on E&U or another SE site without going to each individual page and printing it off?  Also, do we want there to be a print button on pages? I quite often want to print out other peoples answers. It's a bind having to select them etc.

Is there a way to quickly save all my Stack Exchange content across all Stack Exchange sites, as hundreds of HTML pages? (for me probably 15 or 20 sites: SO, dsp.SE, unix.SE, etc.)?  The ideal way would be one .HTML file for each question that I asked / answered / commented? What would be the ideal tool for that?    Remark: I've already read interesting questions like  but it doesn't exactly answer my concern here.


Public class AutoConvertLeads {     @InvocableMethod     public static void LeadAssign(List<Id> LeadIds)     {         LeadStatus CLeadStatus= [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true Limit 1];         List<Database.LeadConvert> MassLeadconvert = new List<Database.LeadConvert>();         for(id currentlead: LeadIds){                 Database.LeadConvert Leadconvert = new Database.LeadConvert();                 Leadconvert.setLeadId(currentlead);                                 Leadconvert.setConvertedStatus(CLeadStatus.MasterLabel);                 MassLeadconvert.add(Leadconvert);         }                  if (!MassLeadconvert.isEmpty()) {             List<Database.LeadConvertResult> lcr = Database.convertLead(MassLeadconvert);         }     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


I am new to Linux and am trying to wrap my head around the concept of super users in the context of the sudo command. If I am the superuser, and only user on my system, why do I not have all permissions to all files? Why must I use the sudo command and enter my password? I'm trying to grasp conceptually how I can think of this.

This question is actually non Ubuntu-specific. My understanding is that sudo is to prevent non-authorized users from doing administrative and other potentially harmful operations. The premise is that someone is here in front of my PC using it... or maybe remotely (but in that case they should know my login password to connect to the computer, and this is usually the same as my sudo password...) So someone is in front of my PC and she cannot delete certain important files or dirs or install harmful software without knowing my sudo password, but she can do a lot of other harmful and privacy-violating things without sudo. So, wouldn't it be better instead asking for admin privileges each time before opening the file manager or the terminal? I know this may be time-consuming and exhausting...


Prove/Disprove $$\lim \sup a_n  = -\lim \inf -a_n$$  Intuitively it seems like a proof, as $\sup(a_n)=-\inf(-a_n)$ and then taking the limit from both sides, but it is informal and I am not sure that it is correct.

How can we prove that $\liminf x_n = -\limsup (-x_n)$?  The definitions we are using are $\limsup x_n = \lim\limits_{n\to\infty} \sup\{x_k; k\ge n\}$ $\liminf x_n = \lim\limits_{n\to\infty} \inf\{x_k; k\ge n\}$


I have multiple pages with some input fields. On this page, I have a previous and next button as well as a save (submit) button. When I press the save button, it will save the user input in the database.  However when I press next or previous, I'll get an alert with:'The user input is not saved yet, untill you click the save button.' Pressing OK will go to the next page and cancel will make it stay on this page. This is what I want, however the alert will always pop up whenever I press next or previous even when there's no user input or in case of editting the user input has not changed. So I dont want the alert to popup whenever nothing has changed or nothing is filled in.  This is my javascript function:  function something(evt) {         if ( ! confirm("The user input is not saved yet, untill you click the save button.") ) evt.preventDefault(); }   buttons:  <a onclick="something(event)" href=""> </a>   Also on some pages, there are select boxes as well. These have standard values and the select boxes cant be empty so I can't check on the select boxes. The check should only be on textareas and textfield.  I am not able to figure out how to accomplish this.  How would I get to check if the user input(textarea, textfield) has changed or is not empty in my case?

I have a requirement to implement an "Unsaved Changes" prompt in an ASP .Net application.  If a user modifies controls on a web form, and attempts to navigate away before saving, a prompt should appear warning them that they have unsaved changes, and give them the option to cancel and stay on the current page.  The prompt should not display if the user hasn't touched any of the controls.  Ideally I'd like to implement this in JavaScript, but before I go down the path of rolling my own code, are there any existing frameworks or recommended design patterns for achieving this?  Ideally I'd like something that can easily be reused across multiple pages with minimal changes.


I am sure this question or similar has been asked but I cannot find it by searching so adding it to make it more accessible: what is the command/environment to add newline linebreak in \sum \prod so the expression is on two rows instead of one line hard to read?    MWE  \documentclass{article} \usepackage{amsmath,amsfonts}  \begin{document}  $$\sum^{N_{cut}}_{i=1,\newline e_1\in C_i,e_2\not\in C_i} \prod_{j\in C_i} p_j-\sum^{N_{cut}}_{i=1,e_2\in C_i,e_1\not\in C_i} \prod_{j\in C_i} p_j\geq 0$$  \end{document}

Is there a way to force a line break inside a math mode text?  My example:  \[   \underbrace{....}_\text{Some long text that should be multiline} \]   Trying  \text{Some long text that\\ should be multiline}   Didn't do the trick.


I tried installing build-essential and I keep getting this error:  (Reading database ... 375528 files and directories currently installed.) Unpacking linux-image-3.2.0-51-generic (from .../linux-image-3.2.0-51-generic_3.2.0-51.77_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-51-generic_3.2.0-51.77_amd64.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.2.0-51-generic': No space left on device No apport report written because the error message indicates a disk full error                                                                               dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-51-generic /boot/vmlinuz-3.2.0-51-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-51-generic /boot/vmlinuz-3.2.0-51-generic Errors were encountered while processing:  /var/cache/apt/archives/linux-image-3.2.0-51-generic_3.2.0-51.77_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Even if I try to install anything else I still get the same error, tried searching for someone with the same problem, found some but it didn't help me fix my problem.  Filesystem           Size  Used Avail Use% Mounted on /dev/mapper/mc-root   13G  4.7G  7.3G  39% / udev                 2.0G  4.0K  2.0G   1% /dev tmpfs                791M  256K  791M   1% /run none                 5.0M     0  5.0M   0% /run/lock none                 2.0G     0  2.0G   0% /run/shm /dev/sda1            228M  228M     0 100% /boot

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


I typically like to browse through various Stack Exhange sites in which I'm not registered yet. And at times I want to see list of questions after I read one question on that site. Tapping on the site icon brings me to the left side panel, from which I cannot choose the site I'm currently at, since I'm not registered in it.  Is there a way to go to question list from the question view? Or am I missing something obvious here?

Maybe I'm just stupid, but I can't figure out how I'm supposed to get from a question (in the Android App) to the site the question is on.   I know I can open the left drawer, tap "All Sites", and type in the name of the site I want to go to, but it seems like there should be a way to get from a question to its site without all that rigmarole. (Tapping the back button works if I was on the site in the first place, but if I get to a question from my feed or from a link in my browser or something, that doesn't help.)


I have seen question like this but the answers were not what I was looking for.  On my Ubuntu 18.04 laptop, I want to install windows back, as I got the laptop off of a friend that switched it from windows to Ubuntu. But for some reason when I am installing windows it says that the hard drive has to be formatted to NTFS for windows to be installed. How do I do this?  Edit: This is NOT a duplicate. The answers on other pages are not actually giving correct instruction on what I want to do. When I go into the windows installer by changing boot order in BIOS, I get to "Where should windows be installed?" But when I click on my hard drive it says that windows can be installed because it is not in the NTFS format. What I want to know is how to change my hard drive to this NTFS format so windows can be installed onto it.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Difference between continuity and uniform continuity of a function?

I understand the geometric differences between continuity and uniform continuity, but I don't quite see how the differences between those two are apparent from their definitions. For example, my book defines continuity as:  Definition 4.3.1. A function $f:A \to \mathbb R$ is continuous at a point $c \in A$ if, for all $\epsilon > 0$, there exists a $\delta > 0$ such that whenever $|x-c| < \delta$ (and $x \in A$) it follows that $|f(x)-f(c)| < \epsilon$.  Uniform continuity is defined as:  Definition 4.4.5. A function $f:A \to \mathbb R$ is uniformly continuous on $A$ if for every $\epsilon > 0$ there exists a $\delta > 0$ such that $|x-y| < \delta$ implies $|f(x)-f(y)| < \epsilon$.  I know that in Definition 4.3.1, $\delta$ can depend on $c$, while in definition 4.4.5, $\delta$ cannot depend on $x$ or $y$, but how is this apparent from the definition? From what appears to me, it just seems like the only difference between Definition 4.3.1 and Definition 4.4.5 is that the letter $c$ was changed to a $y$.   My guess is that the first definition treats $c$ as a fixed point and it is only $x$ that varies, so in this case, $\delta$ can depend on $c$ since $c$ doesn't change. Whereas for the second definition, neither $x$ or $y$ are fixed, rather they can take on values across the whole domain, $A$. In this case, if we set a $\delta$ such that it depended on $y$, then when we pick a different $y$, the same $\delta$ may not work anymore. Is this somewhat a correct interpretation?  Anymore clarifications, examples, would be appreciated.


I usually compile .tex files online. Though I will be without Internet connection for the following days and yet absolutely must work with some .tex stuff.  Now I know this is the stereotypical question that warrants a "UTFSE" response, but believe me when I say I have been fiercely looking for "tutorials" on how to do that on the Internet but to be completely honest, so far they couldn't be less useful for me --- all go over my head. I am not a programmer and just can't follow the lingo. MikTeX site is down. I downloaded proTeXt but that seems to be for Linux; "pdflatex mydocument.tex" did not work, there was no file such as pdflatex on any of the folders in proTeXt. As per someone else's suggestion, I am downloading TeX Live, but it is looking like it ain't gonna be straightforward.  Can anyone break it down to me plain and simple?

I am new to TeX/LaTeX. How do I install TeX on Windows (7)? It seems that there are many different implementations, so which one is best for my OS?


I have two tables Student_Attendance and Students.  I am using this query:  SELECT     sa.Student_Id,      sa.Attendance_Date,      CASE WHEN sa.Attendance_Status as Status FROM student_attendance sa  INNER JOIN courses c      ON c.Course_Id = sa.Course_Id INNER JOIN students es      ON es.Student_Id =  sa.Student_Id WHERE sa.Course_Id = 1  ORDER BY sa.Attendance_Date DESC;   I am getting this result from above query:         But I want something like below:        In the student_attendance table there are more than 50 rows.   How 7 attendance_date rows should be converted into 7 columns as I have given below?  Can someone help me please?


I have a question regarding 2d lists in python after initilizing the list when I assign a value to an index of list I will get all the indexes assigned with the value I'm really confused can someone explain why this is happening also how should I fix this issue class_list = [[0] * 3] * 10 print(class_list)  class_list[2][1]  = 10 print(class_list)  and this is result:  [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]] [[0, 10, 0], [0, 10, 0], [0, 10, 0], [0, 10, 0], [0, 10, 0], [0, 10, 0], [0, 10, 0], [0, 10, 0], [0, 10, 0], [0, 10, 0]]

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Let the two events be $A$ and $B$.The condition for both to be mutually exclusive is that their intersection should be a null set and the condition for independence is that their intersection should be equal to the product of the two probabilities. Now how do I proceed? Or do I just have to write that if the the events are both mutually exclusive and independent then one of the events will have zero probability ?

Two events are mutually exclusive if they can't both happen.  Independent events are events where knowledge of the probability of one doesn't change the probability of the other.  Are these definitions correct? If possible, please give more than one example and counterexample.


Let $X$ be a metric space. Every sequence in $X$ has a convergent subsequence in $X$ then $X$ is a compact metric space. Let $\{O_i\}_i$ be any open collection that covers $X$. I know that choosing an $O_i$ open set in the cover set which covers the limit point, and choosing other finite points by other $O_k$ I can reduce the cover to finite cover. But how about other points in the space $X$. I also tried to contrapositive: Assume $X$ is not compact so there exists an infinite cover that we cannot reduce it to the finite cover. So choosing $x_i$ in each $O_i$ we can construct a sequence $x_n$ but since finite $O_i$ cannot cover whole $X$, $x_n$ has no subsequence that has limit. (so vague)  Is the statement correct?  How to prove that?

I've got a question: I'm trying to prove that every metric space is compact if and only if the space is sequentially compact. In all the proofs I have found, they used the Bolzano-Weierstrass theorem. Is there a way to prove this fact without using Bolzano-Weierstrass?  Thanks so much!!


I have a column in a table that shows date and time and I would like to know what is the recommended header. These are the current choices:        I prefer the last one but it doesn't explicitly say that there is time information while the first two do say that but seem too explicit as it is obvious by looking at the values.

I have a table with a date time column.  Right now the label reads "Closure Date" and it seems fine to me.   I was wondering it was better practice to label it something like "Closure Date/Time".  See this  for the example. Screen shot:    Option 1 is the current usage.  Two is the alternative.


I'm trying to combine the syntax for orthogonal edges (p |- q) with the syntax for calculation relative coordinates ($ (a) + (1,0) $). Example:  \draw ($ (node1.south) + (1,0) $) to ( ($ (node1.south) + (1,0) $) |- node2.north);   However, I get an error:  Package pgf Error: No shape named ($ (node1 is known.   There is an obvious work-around in this case, but for educational purpose I'd like to understand why this syntax does not work, and how to solve the problem in general? Intuitively the documentation would suggest that I can simply combine these two syntaxes.   Update -- MWE:  \documentclass{report}  \usepackage{tikz} \usetikzlibrary{calc}  \begin{document} \begin{tikzpicture} \node at (0,  0) (node1) {Hello}; \node at (0, -2) (node2) {World};  % working: \draw ($ (node1.south) + (1,0) $) to ( node1.south |- node2.north);  % not working: \draw ($ (node1.south) + (1,0) $) to ( ($ (node1.south) + (1,0) $) |- node2.north);  \end{tikzpicture} \end{document}

How do I combine the !.5! operator with the -| operator?  I want a node that has x-coordinate equal to the average of x coordinates of nodes A and B, and a y-coordinate equal to the average the y coordinates of nodes C and D.


In my computer I have both a Sound Blaster Live! 5.1 SB0220 card and a Realtek ALC850 chipset on an  motherboard. My game crashes on launch, just after the Bethesda logo fades. I've tried both cards with multiple drivers, with the same results.  I've seen the workaround which involves changing the audio sample rate to 16bit 44100Hz, but to the best of my knowledge, both cards seem to only support a 16bit 48000Hz sample rate. Are there any other workarounds, or does Skyrim simply not support my hardware?

Whenever I boot up Skyrim, it crashes as soon as it reaches the main menu with no dialog or anything. I thought this was related to my using dual monitors somehow, but I disconnected the other monitor and the game still crashed. I tried running the game in different resolutions, both full-screen and windowed, at various quality settings; no dice. My computer does meet the minimum requirements to play Skyrim.  How do I fix this problem?


When I go to render, for some reason Blender opens a finished render from another file. Why is this happening?

Blender is rendering an older version of my project, not the most recent one. I have made it using the Blender Render but it does not want to render in cycles either. A black and grey screen is rendered as if everything is transparent. Checked general camera, lighting and compute devises in case I messed something up but I can't find anything. All my textures and objects look normal, does anybody know what is wrong or what to check?  Ok added link:


Does this process happen when a user has a single account in three different sites initially and all three are below 200 and say after a year one of them crosses 200, so does the user get +100 for each of the three sites?

Not sure if it is a bug or not, but it feels like a bug to me. When I got to 200 rep on SO the other day I got +100 rep to all my accounts including SO. So my rep jumped up to 300 on SO.  Considering there are others on SO with rep between 200 and 300 I think it is possible that the +100 was supposed to apply only to the linked accounts, not to the account with 200+.


I am working on a script that contains a line similar to  "command /path/to/directory/*example*"  If the directory contains files that are named 1example.txt, example.tmp, example.war it will run the command on all of them. I would like for the command to be run on all of them except for the .war.  Is there some way of doing this cleanly?  The "/path/to/directory/*example*" is a string that is passed through.

I have several files with the same base filename. I'd like to remove all but one  foo.org #keep foo.tex #delete foo.fls #delete foo.bib #delete etc   If I didn't need to keep one, I know I could use rm foo.*.    demonstrates ^ to negate a match. Through trial and error, I was able to find that  rm foo.*[^org]   does what I need, but I don't really understand the syntax.   Also, while not a limitation in my use case, I think this pattern also ignores foo.o and foo.or. How does this pattern work, and what would a glob that ignores only foo.org look like?


I am currently using the script below to take my inputs and convert them to what I want with some validation included. I have got my server side validation set up and would like to have some client side also, I have validated the lengths of the inputs but now need to ensure that they only contain numbers. This is for the Variables day, month and year. I have tried using IsNumeric() but to no avail  <script type="text/javascript"> function timeMachine() {      var day     = $("#date_day").val();     var month = $("#date_month").val();     var year    = $("#date_year").val();      if (day == "" && month == "" && year != ""){         if (year.length != 4){             alert("Please enter a valid year!");         } else{             window.location = "/date/" + year ;         }        } else if (day == "" || month == "" || year == ""){         alert("Please enter a full date!");     } else{         var myDate = new Date(year, month-1, day);          var monthNames = [ "january", "february", "march", "april", "may", "june","july", "august", "september", "october", "november", "december" ];             window.location = "/date/" + year + "/" + monthNames[myDate.getMonth()] + "/" + day;     }     return false; } </script>   Thoughts?

What's the cleanest, most effective way to validate decimal numbers in JavaScript?  Bonus points for:   Clarity. Solution should be clean and simple. Cross-platform.   Test cases:  01. IsNumeric('-1')      => true 02. IsNumeric('-1.5')    => true 03. IsNumeric('0')       => true 04. IsNumeric('0.42')    => true 05. IsNumeric('.42')     => true 06. IsNumeric('99,999')  => false 07. IsNumeric('0x89f')   => false 08. IsNumeric('#abcdef') => false 09. IsNumeric('1.2.3')   => false 10. IsNumeric('')        => false 11. IsNumeric('blah')    => false


Hi all,  I understand the StackOverflow team is not fond of localized content.  However, what about localized area51 sites ?  As an example, I'm thinkg about requesting a french only DIY house building site, as we have numerous candidates to such projects in our country (yep, even french can come take a look at what happens over the ocean ;-)).  I understand site text may not yet be localized (things like the "questions", "tags", "how to format", "notify" and all other contents that are site globals).  But is it envisionned ?  And if so, will sites like the one I would like to promote be elligible as valid area51 projects ? (besides, the chosen name for the galaxy of stackoverflow-like sites is totally awesome).

I want to propose for a Persian version of Super User (I will explain why later) so I want to create a proposal in Area 51, but this means non-English question and answers, Is this OK? P.S: This may be a question for other non-English proposals too. Update: The main question is: How can non-English site proposals pass the Commitment phase? How can the English community support non-English proposals? You can find some information in  about the Stack Exchange 2.0 Site Creation Process (specially Commitment phase):  How does this thermometer work? Intuitively, if Jon Skeet says that he’ll participate in the Sock Puppet Stack Exchange, that commitment is a better sign that the site will succeed than if we get a commitment from a random Internet user who has never participated in Stack Overflow. Sure, they’re both wonderful people, I’m sure, but Jon Skeet has proven that he likes to participate in Stack Overflow so it’s a good bet that he’ll participate in SockExchange, too. .... we’re going to require a selection of existing users with certain badges and reputation that proves that they’ll participate. For instance (and I’m making these numbers up), we might require that a site get at least 100 commitments from people with the Teacher badge, at least 20 from people with the Enthusiast badge, and at least 50 from people with a reputation of 1000 or more on some of our sites.


I accidentally closed Word withous saving a file. I had autorecover enabled. I immediately realised my mistake and pulled the plug on the computer and connected the hdd to another. How can I recover my document (t was not saved beforehand)  EDIT: I found parts of the document in the ~WRS and ~WRF files. Th e problem is to persuade Word to reconstruct the original, like it does with Autorecovery…

My computer restarted while I was asleep because of system updates (need to turn that off), and when I opened up Word the first time after it restarted, it gave me a pane on the left hand side that showed me all the documents I had opened.  I chose one of the documents but I want to open them all, how can I bring that pane back?    Update:  I forgot to mention I'm on Word 2007.  I've found that if you go to      C:\Users*YOURUSER*\AppData\Roaming\Microsoft\Word   you can see the autorecovery files.  Mine are still in there, but I don't want to touch them, I'd rather bring back that pane and do it right just in case they disappear as soon as I double click haha...


Let $G$ be a finite abelian group and $x,y \in G$ so, such that the order of $x$ and $y$ is coprime. Then the order of the element $xy$ is the product of the orders of $x$ and $y$.   Thoughts. Let $p$ be the order of $x$ and $q$ be the order of $y$. Then all the elements of $\langle xy \rangle$ have the form $x^my^n$ for $m,n \in \mathbb{N}$. Obviously, $(xy)^{pq} = 1$. Thus the order of $xy$ divides $pq$. I hope this is right. Now I would like to use the coprimeness of $p$ and $q$ which means $\mathrm{lcm}(p,q) = pq$. Does from there the statement follow?

Let u and v be elements of a commutative group, and suppose that their   orders are r and s, respectively. Show that if r and s are distinct   primes then the order of uv is rs.   I will use the follwing theorem to proof this.  Theorem: Let x be an element of order m in a finite group G. Then $$x^s=1$$ in G if and only if s i a multiple of m.    My attempt  We can here see that $$(uv)^{rs}=[commutative]=u^{rs}v^{rs}=1^s1^r=1$$ By the theorem, this tells us that this is true only if only rs is a multiple of the order of $uv$. Let the order be $ord(uv)=k$. We know that every positive integer can be written as $$a=bm+l, 0<=l<b$$ and since $r$ and $s$ is primes (positive integers), $rs$ can be written as $$rs=km+l, 0<=l<k$$ This gives ut that $$1=(uv)^{rs}=(uv)^{km+l}=1^muv^l=(uv)^l$$ If l>0 then the equation $(uv)^l=1$ contradicts that the positive integer k is the least positive integer for which $(uv)^k=1$. Therefore l=0 and $rs=km$ . We can here see that $rs$ is a multiple of k (and this proof also the theorem).  $$rs=km => k | rs => k|r     ORk|s$$ But we know that $r$ and $s$ are distinct primes, so k must be equal to one of the primes.  $$k=r => (uv)^k=(uv)^r=1v^r=v^r=1$$ And since we know that $ord(v)=s$ the theorem tells us that $r$ must be a multiple of $s$. But since both of them is primes, we get that $r=s$ but this is a contradiction (r and s are distincts as the exercise tells us).   Now, we try with $k=s$. Same as above, we get that $s=r$ which is a contradiction. Neither k=r nor k=s is right since by the theorem we get that $k=r=s$ and we have that $r$ and $s$ are distincts. This tells us that k cannot be equal to r nor s, since this gives us that $r=s$. And since we know (and as i did proof)that  $$rs=km$$, this tells us, as i wrote before, that $$k|rs$$ Since k is neither equal to $r$ or $s$, this tells us that k must be equal to $rs$. Therefore $$ord(uv)=k=rs$$.  Edit: i know that this can be prooved by l.c.m(x,y) but we have not used it so far. That's why i did not proof it with l.c.m(x,y)


I wanted to RESEED all the identity columns in that database, so I need to create a script so I can find out which column in which table has the identity property.

I need to write a query that resets the identity on all tables that have an identity column and are empty.


cause i want to change the color of some black lines by locking the layer and coloring just the lines but since it's one page even the white space get colored. don't you guys have an easy way to do that beside wand and eraser. (cause i might have this probleme for all my images and i think it's annoying to use wand every time)

Hi everyone here a problem I have,  basically I want to remove all white from this image so I can paint beneath the illustration.  When I remove the white using magic eraser or the magic wand I'm still left with loads of 'white enclosed spaces'   < this is my problem. It seems like I'll have to go into the image and use the magic wand individually for each white space?.  Is there an easier way to remove all of the white automatically?


Folder Structure:    main    |__ sub1       |__ __init__.py    |__ sub2       |__ test.py   I need to import inside test.py:  from .. sub1 import SomeClass   It shows this error :     ValueError: attempted relative import beyond top-level package.   Thank you for responses.

Imagine this directory structure:  app/    __init__.py    sub1/       __init__.py       mod1.py    sub2/       __init__.py       mod2.py   I'm coding mod1, and I need to import something from mod2. How should I do it?    I tried from ..sub2 import mod2 but I'm getting an "Attempted relative import in non-package".  I googled around but found only "sys.path manipulation" hacks. Isn't there a clean way?      Edit: all my __init__.py's are currently empty    Edit2: I'm trying to do this because sub2 contains classes that are shared across sub packages (sub1, subX, etc.).  Edit3: The behaviour I'm looking for is the same as described in  (thanks John B)


I'm trying to get all files by mask in some directory without recursively searching in subdirs. There is no option -maxdepth 0 in AIX for that.  I've heard about -prune, but still can't get how it works.  I guess the command should look something like  find dir \( ! -name dir -prune -type f \) -a -name filemask   but it doesn't work.  Could you please write a correct command for me and explain how it will work?  UPD  It seems command  find dir ! -path dir -prune   prints all files and catalogs in dir, but not files and catalogs in dir/*, so I can use it for my case.

I noticed recently that  do not include the -maxdepth primary.  For those unfamiliar with it, the purpose of the -maxdepth primary is to restrict how many levels deep find will descend.  -maxdepth 0 results in only command line arguments being processed; -maxdepth 1 would only handle results directly within the command line arguments, etc.  How can I get the equivalent behavior to the non-POSIX -maxdepth primary using only POSIX-specified options and tools?  (Note: Of course I can get the equivalent of -maxdepth 0 by just using -prune as the first operand, but that doesn't extend to other depths.)


We all know that there is a sentence "He is a very man". In this sentence I suppose that "very" refers to "man":noun. So in this case, very should be treated as an adjective, isn't it?

Use of very as an adjective is (in my experience) most frequently attested in phrases like     ...the very person I was looking for.   To use adjective very with the indefinite article sounds quite bizarre in this case:     ?...a very person I was looking for.   But consider this sentence, where indefinite a is used:     Visualizing a very transformation of the master-slave relation, Thomas presses further: the slave is brother to the master, even doubly a brother.   OED treats the two uses as separate senses of the word, with the following definitions:           (first use):      With limitation (usually expressed by the or a possessive) to particular instances      (second use): Really or truly entitled to the name or designation   Here are two respective examples quoted in OED:     What would you say to me now, and I were your verie, verie Rosalind? (1616)   Thence we went into Queen Mary's room, and saw that beautiful portrait—that very queen and very woman. (1857)   Clearly, the difference in meaning between the two senses is quite light, and it seems to me like a kind of difference which is recurrent enough to have its own term. What is the proper term? Are there other English words having similarly related pairs of senses? And lastly, is OED jumping the gun in treating these as two senses? Could the difference in meaning instead be due to the choice of determiner?


I am trying to create a regex for a currency in USD starting with any number of digits followed by 2 digits following a decimal point followed by a digits within round brackets. I want just the part before the round brackets. Like $179.29 (3). Output should be $179.29.

A quick search for currency regex brings up . The problem I have in choosing one is that regex is difficult to verify without testing all the edge cases. Does anyone have a regex for U.S. currency that has been thoroughly tested? My only requirement is that the matched string is U.S. currency and parses to System.Decimal:  [ws][sign][digits,]digits[.fractional-digits][ws]   Elements in square brackets ([ and ]) are optional.  The following table describes each element.   ELEMENT             DESCRIPTION ws                  Optional white space. sign                An optional sign. digits              A sequence of digits ranging from 0 to 9. ,                   A culture-specific thousands separator symbol. .                   A culture-specific decimal point symbol. fractional-digits   A sequence of digits ranging from 0 to 9.


I have a link generated within a JavaScript file that contains the following code:  jQuery(".url").append('');   I would like to alter the path variables when user is not logged. In Drupal terms this would look like: global $user; if (user->uid == 0) {..redirect page.} or global $user; return !(bool) $user->uid;  How can I use the $user->uid property with JavaScript code?

I have set theme handler for a form in Drupal and this handler has a template file. What is the easiest way to send a value from PHP to JavaScript in that include file?


I am studying Qt, I find it really amazing and a bit easier because I've already used MFC in Microsoft.  I've developed a scientific calculator for educational use. But what faced me is:  I want float high precision like in real-world calculators so after searching I've found this function:      long double ldRes =  std::sqrt(3);     QMessageBox m;     m.settext(QString::number(ldRes, 'g', 30));     m.exec();   The output:  1.73205080756887719317660412344   While the output, according the , of the same operation to the same precision, should be:  1.73205080756887729352744634151   So it is apparent that the result is not the same so can anyone advise me how to get correct float-precision in my applications using Qt? or any other library?  Should I use GMP MPIR MPFR?  Thank you!

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


So my previous question states that: We are given the sequence $𝑘_{n}= 6^{({2}^n)} + 1$. We must prove that the elements of this sequence are pairwise co-prime, i.e prove that if m ≠ n then $𝑔𝑐𝑑(𝑘_{m},𝑘_{n}) = 1$.  I previously proved that $k_n | k_{n+1} - 2$  Then using answers I got on my previous question I was able to show that if $p | k_n$ then it follows that $p | k_{n+1} -2$. Using this I could say that that if $p|k_{n+1}$ then $p|(k_{n+1} - (k_{n+1} -2)$. This means the only prime that could divide $k_n$ and $k_{n+1}$ is $2$, however all the terms in the sequence are odd so therefore $gcd(k_n,k_{n+1})=1$.  This therefore proves that every pair of numbers in the sequence are coprime however I'm struggling to extend it to show every element is coprime so I need to show $gcd(k_m,k_n)=1$.   All help is very much appreciated as always cheers.

We are given the sequence $k$n = 6$^{{({2}^n)}}$ + 1. We must prove that the elements of this sequence are pairwise co-prime, i.e prove that if m $\neq$ n then $gcd$($k$m,$k$n) = $1$.   I have proved that $k$n | ($k$n+1 - $2$) however I can't seem to extend this proof in order to prove every element is co prime.   All help would be greatly appreciated, cheers.


I have performed a simple linear regression which consists of an intercept and 20 variables in R. The variables can be seen as two groups, call the parameters for the first group the alpha group and for the second group the beta group. I now wish to test if the beta group as a whole is insignificant, and if the reduced model (only containing the alpha parameters) is not significantly worse than the full model. If I would look at the parameter's p-values alone, I might discard too many parameters. On the other hand, I could look at the F statistic alone, but then that would determine if the full model as a whole is significant.  How would one go about doing this in R?

What does it mean to use anova to compare models? For example, if I have two models  $$    \text{model}_1 \colon y = b_0 + b_1 x_1 + b_2 x_2  $$ and  $$    \text{model}_2 : y = b_0 + b_1 x_1 + b_2 x_2 + b_3 x_3 $$ and I use anova(model1, model2) in R, then is it the same as testing the null hypothesis $b_3 = 0$? If not, then what hypothesis exactly is getting tested here? And if yes, then why not simply use the summary of the lm function to test whether $b_3 = 0$, i.e. what is the whole point of using anova then?


Answered in post below  I have a network interface I don't recognize or understand.   ip a s provides the following (sanitized) output:  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host         valid_lft forever preferred_lft forever 2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000     link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff     inet 192.xxx.xx.xxx/xx brd 192.xxx.xx. scope global dynamic noprefixroute wlp2s0        valid_lft 2347sec preferred_lft 2347sec     inet6 xxxx::xxxx:xxxx:xxxx:xxxx/xx scope link noprefixroute         valid_lft forever preferred_lft forever 4: enx9cebe80718e1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000     link/ether xx:xx:xx:xx:xx:x brd ff:ff:ff:ff:ff:ff   The relevant output from ifconfig (which I installed for familiarity) is:  enx9cebe80718e1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)         RX packets 138  bytes 30067 (30.0 KB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 573  bytes 98070 (98.0 KB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   Traffic is happening, but small.  My understanding of networks is next to nothing, but nevertheless, all the interfaces I have seen are short, e.g. wlp2s0.  My question is, what is enx9cebe80718e1? And where is the entry for 3:?  system and background:   Lubuntu 18.04 (recent reinstallation due to confirmed hack) on a Dell XPS13 L321x.  Internet connection via a) Android phone's hotspot (now), b) wireless 4G dongle (last fornight) wireguard is usually on, but was not for the info provided in this post rkhunter a short time ago gave clean    bill of health, but I don't update that regularly. ufw is enabled. (So too is fail2ban)

Under consistent network device naming scheme, what does 'eno' stand for in network interface name eno16777736 for CentOS 7 or RHEL 7?


the dll has a private method how can I call this method from my application?  Public Class FormAcceptanceBid2018      Public OpenType As ClassStorage.enumBidFormOpenType     Public ItemID As Integer      Private Sub FormAcceptanceBid2018_Load(sender As Object, e As EventArgs) Handles MyBase.Load              ....              If ItemID > 0 Then                 FillForExistingItem()             Else                 FillFormNewItem()             End If             ...          End Sub End Class   If I make this method public then everything works like this  FormAcceptanceBid2018 accepBid = new FormAcceptanceBid2018();                     accepBid.ItemID = idBid;                     accepBid.OpenType = ClassStorage.enumBidFormOpenType.ExistingItem;                      accepBid.FormAcceptanceBid2018_Load(null, null);                          accepBid.SaveBid();   Found on the Internet what can be called through reflection but I don’t understand how to fill in the variables accepBid.ItemID and accepBid.OpenType  typeof(FormAcceptanceBid2018).GetMethod("FormAcceptanceBid2018_Load", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(new FormAcceptanceBid2018(), null);

There are a group of private methods in my class, and I need to call one dynamically based on an input value. Both the invoking code and the target methods are in the same instance. The code looks like this:  MethodInfo dynMethod = this.GetType().GetMethod("Draw_" + itemType); dynMethod.Invoke(this, new object[] { methodParams });   In this case, GetMethod() will not return private methods. What BindingFlags do I need to supply to GetMethod() so that it can locate private methods?


Find a finite automaton that recognizes the language $$L=\{w\in\{a,b\}^*\mid\text{$w$ has an odd quantity of $a$ and an even quantity of $b$}\}.$$ Indicate whether the automata is deterministic or not.     I tried to find a regular expression for $L$: $$(a(aa)^*+(bb)^*)^*$$ but then I realized that $\lambda\notin L$ since there is not odd quantity of $a$, so my final regex is $$(a(aa)^*+(bb)^*)^+$$ I am not able to find an automata for this language. I tried with:    but if we call $z=a(aa)^*+(bb)^*$ then I am not able to graph $z^+$.  How can we get the automata?

I'm having trouble understanding the wording of one of my homework questions. Since this question appears early in the chapter, I have a feeling that I'm misinterpreting it.  Give a finite automaton that that accepts the following language: The language over $\{a, b\}$ of any even number of $a$'s and any odd number of $b$'s.   I'm having trouble with the usage of "and". Is it asking for an FA that accepts any string that is either an even number of $a$'s or an odd number of $b$'s, e.g. $aa$, $bbb$, $aaaa$, etc, but not accept strings like $aabbb$, $abbab$.   Or, is it asking for an FA that accepts any string that contains an even number of $a$'s or an odd number of $b$'s, e.g. $aabbb$, $ababb$, etc.   The first case is relatively simple, but I've been struggling with the second. I haven't even managed to convince myself that it is a regular language (because I haven't been able to come up with a regular expression that matches it).   My questions: Which interpretation seems most likely. Is the second case a regular language, if so, give a regular expression that recognizes it.


why lines of Lyman series are absent in absorption spectrum of hydrogen ?

Why is it that the Lyman series for hydrogen atom is available for both absorption and emission, but the Balmer series is only available for emission?   The book I'm reading doesn't contain any detail about such a discrepancy. Our professor didn't teach this either. I looked  this up on the internet but I did not come across any valid answer.   Any help would be appreciated.


So I would like to show that any closed hypersurface (a smooth, compact, and boundaryless manifold of dimension $n$ embedded in $\mathbb{R}^{n+1}$) is orientable. This is an exercise in Guillemin and Pollack's book and the book suggests that the reader use the separation theorem of Jordan and Brouwer.   I understand a fair some of the argument: At each point $p$ in the manifold $M$ consider the tangent space $T_pM$ which can be identified as $\{p\} \times \mathbb{R}^{n} \subset \{p\}\times \mathbb{R}^{n+1}$. We now may assign to each point on the Manifold a normal vector, given by (normalized) vector $v_p$ that spaces the space $\left(\{p\}\times \mathbb{R}^{n}\right)^{\perp}$. Of course, this choice could be multivalued, we might pick $v_p$ or $-v_p$, depending on how we feel, but the point is that we can make a continuous choice of normal vector. To do this, most proofs say something like the following: the Jordan Brouwer theorem allows us to write: $$ \mathbb{R}^{n+1}\setminus M = U_1 \sqcup U_2 $$ where $U_1,U_2$ are both connected components of $\mathbb{R}^{n+1}$ and $U_1$ is bounded whereas $U_2$ is unbounded. It is then said that one should choose at each point the "inward" or "outward" pointing normal (intuitively, the normal whose arrow points towards $U_1$ or the normal whose arrow points towards $U_2$). However, this is seems difficult for me to state rigorously. Does anyone have any ideas as to how one formalizes a normal "pointing inwards" or "pointing outwards"?

Some books on mean curvature flow (e.g. Mantegazza, Ecker) state that an embedded hypersurface in $\mathbb{R}^{k+1}$ is orientable (Mantegazza page 3, Ecker page 110).  In other words, they assume the existence of a globally defined (unit) normal field along the embedded hypersurface.    Does anyone know how to prove this?  Isn't the Mobius strip able to be embedded in Euclidean space, yet it isn't orientable?  For some definitions, let $M$ be a smooth $k$-dimensional manifold.  A smooth map $\varphi:M\rightarrow\mathbb{R}^{k+1}$ is a hypersurface (an immersion) if its differential is injective.  It is an embedding if it is also a homeomorphism onto its image $\varphi(M)$.  An immersed hypersurface is a subset $S\subset\mathbb{R}^{k+1}$ which is a $k$-dimensional manifold such that the inclusion map $\iota:S\hookrightarrow\mathbb{R}^{k+1}$ is an immersion.  An embedded hypersurface is a subset $S\subset\mathbb{R}^{k+1}$ which is a $k$-dimensional manifold whose topology conicides with the subspace topology inherited from $\mathbb{R}^{k+1}$ and the inclusion is an embedding.    We can also characterise an embedded hypersurface using single-slice adapted charts: Each point $p\in S$ is contained in a coordinate neighborhood of a single-slice chart $(U,\mathsf{u})$ on $\mathbb{R}^{k+1}$ adapted to $S$ such that $U\cap S=\{(u^1,...,u^{k+1})\;|\;u^{k+1}=0\}$.  The pair $(U\cap S,\mathsf{proj}_{\mathbb{R}^k}\circ\mathsf{u}|_{U\cap S})$ is then a chart for $S$ and as we range over $p\in S$ we get an atlas for $S$.


When I click the Github button under Open Source Contributions, I only see my own repos and a couple of the repos that I have made contributions to; there are about 5+ other repos that I have made contributions to which are not showing up at all, and I can't add them manually using "other".  Furthermore, there is no difference in the couple of non-owned repos I have contributed to that DO show up, and the others that DON'T show up; I made just as many, if not more, contributions to the ones that are missing.    How can I fix this?  Is there no other way to manually add Github open source contributions?

I've got a repo that I contribute to within an Organization that I administer. I'm trying to add it to careers, but it won't allow it. Is this on purpose? I don't really want to fork it to my personal account, since I won't be maintaining it from there.


I Run a batch file which saves as a filename.txt format but I need to know how to provide command which saves as filename_dd/mm/yy.txt format.   For Example I need it to save as Superuser_10-Oct-2016.txt format.  Please Help.

In a batch file I need to extract a month, day, year from the date command.  So I used the following, which essentially parses the Date command to extract its sub strings into a variable:  set Day=%Date:~3,2% set Mth=%Date:~0,2% set Yr=%Date:~6,4%   This is all great, but if I deploy this batch file to a machine with a different regional/country settings, it fails because month, day and year are in different locations.   How can I extract month, day and year regardless of the date format?


Who are the       "creators"   referenced in Transformers: Age of Extinction? Is there any such reference in the cartoon series, or comics?

Son: Dad, where do Transformers come from?   Me: The planet of Cybertron.   Son: Who made the Transformers?   Me: Transformers make each other. Remember how Wheeljack and Ratchet made the Dinobots?   Son: But who made the first Transformer?   Me: ...


i have a string of numbers, and i want to multiply these numbers  string myS = "731671765313"; int product = 1;     for(int i = 0; i<myS.length(); i++)         product *= myS[i];   How to convert the string element to int because the result is totally wrong. I tried casting it to int but in vain.

What's the C++ way of parsing a string (given as char *) into an int? Robust and clear error handling is a plus (instead of ).


I have schengen visa (tourist) issued by swiss embassy,  with single entry,  one month  visa. can I enter france (wish to go to paris from Geneva by train)  after I complete my 10 days stay in Switzerland ?

I am visiting a friend in Switzerland for ten days. I have already got visitor's visa for the same on my Indian passport. Particulars mentioned on my visa are:  1. 'Etats Schengen' , 2. Single entry 3. Dates of visit. & 4. Type of visa : C.  I understand that having already got ‘Etats Schengen' visa, I can travel to all Schengen countries.  I am also planning to visit Paris for a day during my stay in Switzerland. However, I never mentioned this in my visa application. I am planning to take a train from Geneva to Paris and book a hotel in Paris for one night. Can I possibly plan my Paris trip this way as I have Schengen visa, or I am not allowed to travel out of Switzerland as I never mentioned this in my visa application?   Also what does Single entry on my Schengen visa means: does it mean that I can enter and leave Switzerland only once or it means that I can enter and leave the Schengen region only once.


in citations (not in the bibliograpy) I want to supress the page numbers from the bib-File if a number is given with the cite.  What I get:   What I want:     1 Emma Sigfridsson und Ulf Ryde. Comparison of methods for deriving   atomic chargesfrom the electrostatic potential and moments. In:   Journal of Computational Chemistry 19.4(1998), S. 377-395, S. 591.   My mwe:  \documentclass[ngerman]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{csquotes}  \usepackage[backend=biber,   style=ext-verbose-ibid,   isbn=false, url=false, doi=false, eprint=false,   dashed=false, ]{biblatex}  \addbibresource{biblatex-examples.bib}  \begin{document} Lorem\autocite[591]{sigfridsson} ipsum\autocite[123]{sigfridsson} dolor\autocite[592]{sigfridsson} \printbibliography \end{document}

Can anyone tell me how to avoid mentioning both the pp. and the p. in footnote citing of an article? I kinda find it ugly and redundant. Here is what I mean:     18J.R.R. Tolkien. “On Fairy-Stories”. In: The Monsters and the Critics and Other Essays. Ed. by Christopher Tolkien. London: George Allen and Unwin, 1983, pp. 109–161, p. 141.   In this case, I need to mention p. 141, but I wish to remove pp. 109–161. I don't want to have pp. omitted in all citations, but only when a specific page is mentioned.  I'm using the following:  \usepackage[bibstyle=verbose,citestyle=verbose-trad3,autocite=footnote,backend=bibtex,backref=true]{biblatex}


I'm trying to make a program in which if you type in "open" to the java console it ends.  When I type in open, the if statement below doesn't run.              if(input=="open") {                 System.out.println("You escaped!!");                 break;             }   I've also tried .equals and it still doesn't work      if(input.equals("open")) {         System.out.println("You escaped!!");         break;     }   However when I print out input as shown below, the input is open.  This makes no sense because if the input was open, then the if statement above should have run.              else{                 //otherwise check what was written                 System.out.println(input);             }   Here is my full code:  class Password {     public static void main(String args[]) throws java.io.IOException {         //holds letters put in         char letter;          //holds full line of input         String input;           for(;;){             input="";              //makes the input equal what was inputed on the line             for(;;){                 //gets next char                 letter=(char) System.in.read(); //get a char                 //if the line hasn't ended then add that char to input                 if(letter!='\n'){                     input+=String.valueOf(letter);                 }else{                     //other wise line has ended so input is finished                     break;                 }             }             //if open was typed in then end the program             if(input.equals("open")) {                 System.out.println("You escaped!!");                 break;             }else{                 //otherwise check the input                 System.out.println(input);             }         }     }   }

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


I need to clear the terminal cache, I have tried with history -c but it clears the cache in that terminal session, but if I open another session and type history it shows all the previous commands.

I want to clear all previous commands from the history of my server. I used history -c and it seems all things are cleared but when I ssh to the server, all the commands are still there.  How can I clear them permanently?


This is what I am ultimately trying to achieve:  //When the user clicks the liveshow button this happens     $(".liveshow-button").live('click', function() {         if ($(".liveshowDiv2").css('display') == 'none') {             $(".liveshowDiv2").fadeOut(ifadeOutSpeed, function() {                 $('#wrapper-div').animate({ height: $('.liveshowDiv1').height() + "px" }, iresizeSpeed, function() {                     $('.liveshowDiv1').fadeIn(ifadeInSpeed, function() {                     });                 });             });         }         else {             alert('This never gets displayed');             $(".liveshowDiv1").slideUp('fast');         }     });   Basically I want to toggle between liveShowDiv1 being displayed and hidden when you click this button.  But since other things on the page can make liveShowDiv1 hidden, I can't just make a toggle function to do this.  I have to check somehow to see if liveShowDiv1 is being displayed or not.  When it not displayed: display = none  When it is showing display is not in the style tag at all  How can I tell in JQuery when this div is displayed?

Is it possible to toggle the visibility of an element, using the functions .hide(), .show() or .toggle()?  How would you test if an element is visible or hidden?


I am trying to silence the warning from the question   I tried:  \usepackage{silence} \WarningFilter*{hyperref}{Option `hyperfootnotes' has already been used}  \usepackage{hyperref} \usepackage{bigfoot}   And it works, however I want to only silence that warning which specifically points to the line 61, not all the other warning which just starts with:  Option `hyperfootnotes' has already been used   Then I tried writing:  \WarningFilter*{hyperref}{Option `hyperfootnotes' has already been used,.*setting the option has no effect on input line 61.}   And:  \WarningFilter*{hyperref}{Option `hyperfootnotes' has already been used,% (hyperref)                setting the option has no effect on input line 61.}   But none of them worked. How can I silence a multi line warning?  ...(D:\User\Documents\latex\texmfs\install\tex\latex\oberdiek\rerunfilecheck.sty Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 82. ) \Hy@SectionHShift=\skip185 ) (D:\User\Documents\latex\texmfs\install\tex\latex\bigfoot\bigfoot.sty Package: bigfoot 2015/08/30 2.1 makes footnotes work   Package hyperref Warning: Option `hyperfootnotes' has already been used, (hyperref)                setting the option has no effect on input line 61.  (D:\User\Documents\latex\texmfs\install\tex\latex\ncctools\manyfoot.sty Package: manyfoot 2005/09/11 v1.10 Many Footnote Levels Package (NCC)  (D:\User\Documents\latex\texmfs\install\tex\latex\ncctools\nccfoots.sty Package: nccfoots 2005/02/03 v1.2 NCC Footnotes Package (NCC) ) ...     Minimal Example:  \documentclass{memoir}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}  \usepackage{silence} \WarningFilter*{hyperref}{Option `hyperfootnotes' has already been used, (hyperref)                setting the option has no effect on input line 61.}  \usepackage{hyperref} \usepackage{bigfoot}  \begin{document}      Bit cut\footnote{bigfoot}.  \end{document}

I am trying to specifically silence a warning which happens a a specific file called bigfoot.sty   Looking over the silence package documentation  it seems impossible to silence a warning for a specific line as on input line 61.  However, can I silence a warning which is coming from a file like bigfoot.sty?  This is the code I tried to so far:  \documentclass{memoir}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}  \usepackage{silence} \WarningFilter*{hyperref}{Option `hyperfootnotes' has already been used,\MessageBreak setting the option has no effect on input line 61.}  \usepackage{hyperref} \usepackage{bigfoot}  \begin{document}      Bit cut\footnote{bigfoot}.  \end{document}   But due the on input line 61. at the end of the warning, it is not being silenced.  This is the warning:  D:\User\Documents\latex\texmfs\install\tex\latex\bigfoot\bigfoot.sty:61: Package hyperref Warning: Option `hyperfootnotes' has already been used, (hyperref)                setting the option has no effect on input line 61.


I am trying to do problem $1.5.5$ from Algebraic Geometry by Robin Hartshorne. The problem states:     For every degree $d>0$, and every $p=0$ or a prime number, give the equation of a nonsingular curve of degree $d$ in $\mathbb{P^{2}}$ over a field of characteristic $p$.   I have polynomials that work for every case except for the case where $p=d=3$ .I have tried several different polynomials of degree $3,$ but they always seems to have a singular point.Any help/ hint would be greatly appreciated.

For each $d>0$ and $p=0$ or $p$ prime find a nonsingular curve in $\mathbb{P}^{2}$ of degree $d$.    I'm very close just stuck on one small case. If $p\nmid d$ then $x^{d}+y^{d}+z^{d}$ works. If $p\mid d$ then I have chosen the curve $zx^{d-1}+xy^{d-1}+yz^{d-1}$. After some work using the Jacobian criterion for nonsingularity I arrive at $3z=0$. As long as $p\neq 3$ this curve is nonsingular. But I haven't been able to deal with the $p=3$ case. Any ideas? Thanks in advance.


In Watamote Episode 9, Tomoko is angry at her little brother and says:     Does he have to be better than his big sister at everything?   Is he Kenshi***? That bastard!      What does she mean by Kenshi***?

In episode 9, there are these three references I didn't get:     The first one is around minute 5, when Tomoko goes to see Yuu-chan at her uncle's café. She sees the names of two cakes ("Tarte Chiboust au Caramel" and "Bijou des Rois"), and then says this:   The second is around minute 15, when Tomoko is cleaning her stuff up. She wonders why her brother is trying to be better than her at everything, then says the following:    She then says "I'm gonna make him cry for this." The third one is around minute 17, when Tomoko is cleaning her stuff up and finds the cicada shells. She remembers why they were there, says "A memory best left forgotten", and then:     What do these three different situations refer to?


Sometime in the last week or two, the F2 button stopped working.. F1 (decrease screen brightness) still works, but not F2.  Is there any kind of fix for this, or is the button broken for good?

This is an attempt to write a canonical QA for this issue, as per the Meta post:   I expect it to be periodically edited with the goal of becoming a comprehensive information resource.  I have a MacBook Pro that has a key(Shift, Return,   Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position.    It's possible that my favorite beverage was spilled (or some other liquid damage).  It's also possible that I have no idea what happened.  It was working yesterday and suddenly today it's no longer working.  Is there any way to bypass or remap the key?  Can I  have the system ignore it completely?  (This question can also apply to external USB keyboards or the Bluetooth keyboards)


Having problems with copy to selected across the board.  I'm trying to add a modifier to all selected objects. It's Greyed out. They are meshes in their own collection, no other objects.  (skip to the end for main question) Yesterday, I was selecting all objects and trying to add a material. Copy to selected was available but wouldn't do anything. I had to join every object and then separate (which isn't the worst), but the objects were tied to shrink-wrap and probably had to use copy to selected to get them working again...  How do I add a modifier to All selected objects?

Is it possible to add a modifier to more than one mesh at once?  I have a lot of unique objects,  and I want to set a subdivide modifier to them, would I have to do each one individually?   I have tried selecting all the objects and then adding a modifier, but as I expected, it only added it to the active object.


I am looking for an function that returns all view modes per content type. I already tried to use mobile_theme_entity_view_mode_alter but this function will return all available view modes for a node entity. What I need are the available view modes per node type...  any suggestions?

I need to have a list of all available view modes for an entity type so I can use it as the #options in a select field.  Any ideas? Thanks


Something always bugged me about Newton's equations (or, equivalently, Euler-Lagrange/Hamilton's): Determinism, which is the philosophical framework of classical mechanics, requires that, by completely knowing the state of a system at a given instant, $\textbf{x}(t_0)$ and the law by which the system evolves, which, in dynamics, looks something like $$m\ddot{\textbf{x}}=f(\textbf{x},\dot{\textbf{x}},t)$$ You know the exact state of the system at any instant, forwards in time and, when defined, backwards. But global uniqueness theorems state that, for this to be true, the function $f$ needs some properties, namely that it doesn't "blow up" anywhere in the domain (iirc it's enough for $f$ to be uniformly continous). My question then can be posed as such: are there any systems in which the forces that naturally arise violate the global existence/uniqueness theorems? And if so, then what does this tell us about the system?

In Sean Carroll's book "The Big Picture," he states ():      Classical mechanics, the system of equations studied by Newton and   Laplace, isn't perfectly deterministic. There are examples of cases where a unique outcome cannot be predicted from the current state of the system. This doesn't bother most people, since cases like this are extremely rare—they are essentially infinitely unlikely among the set of all possible things a system could be doing. They are artificial and fun to think about, but not of great import to what happens in the messy world around us.   What are some of these situations he is referring to?   My first guess was something like the conceptual equivalent of a ball sitting exactly atop a hill and asking which direction it will roll. But that doesn't seem right—this would be a case where the "true" solution is that the ball wouldn't roll at all, while in reality there will always be tiny disturbances that cause the ball to roll in some direction. I don't think this is what Carroll is referring to. He seems to suggest that the "true, exact mathematical outcome" is not uniquely determined for certain classical systems.  I've heard that uniqueness theorems for solutions to differential equations don't generally apply to non-linear equations, and wonder if this may have something to do with it. Elucidation and examples would be much appreciated.


What is a good mirror lens for my Nikon D5200? I love taking wildlife pictures and need a better telephoto lens. I am using a Nikkor 55-300 AF and it works well, but I need about twice that power. I take a lot of late afternoon pictures and need something that will allow me to take them in low light. Will a mirror lens work well in low light? Camera will use both lens, with or without autofocus.

I've recently seen these Rokinon/Opteka mirror lens with whooping focal length (like 500mm, 600mm, 800mm, 1000mm) at a cheap price. And I have seen some of their same pictures in Flickr and vendor sites. But the only thing is that they usually starts from smaller aperture (f/5.6 and upwards)   Now what I was wondering, as they are cheap with quite good IQ - are they good for any bird photography or wild life photography in proper daylight?


Given the following related to an ML-inequality for $R > 1$:  Estimation of the numerator from the function $f(z)$ is supposed to develop as follows:  I'm wondering why and how exactly the power $3ix$ cancels out (why does it vanish/equal to zero) in the equality $|e^{-3y+3ix}| = e^{-3y}$ ?

Let $z \in \Gamma (R)$ where this is the upper semi circle centred at the origin with radius $R>1$. Let $z=x+iy$ with $x \in \mathbb{R}$ and $y \geq 0$. So   $$|e^{i \lambda z}|=|e^{i \lambda z}| |e^{- \lambda y}|= |e^{- \lambda y}|$$  where $\lambda \in \mathbb{R}^{+}$.  How can the last equality possibly be true?


I want to detect the outliers in a time series data which contains the trend and seasonality components. I want to leave out the peaks which are seasonal and only consider only the other peaks. As I am new to time series analysis, Please assist me to approach this problem.  The coding platform am using is Python.

I'm currently using Twitter's AnomalyDetection in R: .  This algorithm provides time series anomaly detection for data with seasonality.  Question: are there any other algorithms similar to this (controlling for seasonality doesn't matter)?  I'm trying to score as many time series algorithms as possible on my data so that I can pick the best one / ensemble.


Like the title says, are the terms probability density function and probability distribution (or just "distribution") interchangeable? If not, what is the difference?

I am new to probability course and find concepts very confusing. I am learning maximum likelihood estimation and as a starting point for that do we find the density or the distribution?   In general, do we find the distribution from density or is it vice versa and how does one find it? For example, for Gaussian distribution do we find the density of a variable or the distribution so as to estimate unknown parameter A in the case x[n] = A + w[n] where w[n] are uncorrelated gaussian noise. This may sound too trivial but I am really confused. In many contexts I have come across where pdf = prob. density function and in some areas I find pdf = prob distribution function !!


Could LaTeX be used to take notes in class on 5'5 smart phone well? Is there some application or method to use LaTeX on phones?

I used  app in my Android phone. But this app does not support XeLaTeX and requires an internet connection to be used.  Is there any distribution of TeX for Android? How I can install TeX on my Android phone?


I perform binominal log reg to predict the presence of a disease using 9 variables. One of the variables was log transformed because it was not normally distributed. This log transformed variable came out of the log reg equation with a negative coefficient although in the univariate analysis it significantly has a higher mean value in the group with the disease. Can this be possible? Thanks in advance for any answers.

In my logistic regression the sign of coefficients of a variable (location distance of an amenity) changes based on other variables (with time -ve, with travel distance +ve) in the model. When the location distance is the only variable in the model, it has +ve sign.    Should the variable need to maintain the +ve sign no matter what other variables are added in the model? Does changing sign signify a multicollinearity issue? Some IVs are gaining significance while in a bivariate model, they didn't show significance and vice versa. Is it okay to add variables that don't have much significance (ex: travel distance has a significance of 0.33 individually, but 0.05 when added with other variables) but becomes significant in the model? thanks.


The number of ways in which $3$ men and their wives can be arranged in a line such that none of the three men stand in a position that is ahead of his wife  what i try  let men be $M_{1},M_{2},M_{3}$ and wives be $W_{1},W_{2},W_{3}$   arrangements as   (i) $M_{1}W_{1}M_{2}W_{2}M_{3}W_{3}$ or   (ii) $M_{1}M_{2}M_{3}W_{1}W_{2}W_{3}$  ways total is $1+2!\cdot 3!\cdot 3!=73$  but original answer is different from mine How do i solve it Help me plese

In how many ways can 3 men and their wives be made stand in a line such that none of the 3 men stand in a position that is ahead of his wife?  What is the best way to tackle such problems?   Here is how I am tackling this problem      M1 M2 M3  -> Men     W1 W2 W3  -> Wives      a.      1  2   3   4    5    6      W1 M1  W2  M2   W3   M3     ->         With the above in mind, W1 M1 is a pair and W2 M2 is a pair, W3 M3 is a pair.     so, there can be 3 interchanges - if we assume that W1 M1 stick to each other.      b.        W1 W2  M1  M2   [W3   M3]  W1 W2 can interchange in 2 ways.  M1 M2 can interchange in 2 ways   4 ways..* 2 ( when W3 M3 will be at first) = 8 ways.          c.  W1 W2  W3  M1   M2   M3      W1 W2 W3 can be arranged in 3 ways     M1 M2 M3 can be arranged in 3 ways.     total ways are 9 ways.       -----------------      so adding all -  20 ways.   However, the answer is not 20 ways. What is wrong in my thought process here?


I've come to learn more about induction recently for proving things, and one thing stands out to me.  It seems like you could just data-mine patterns and guess a relationship you think might be correct, prove it with induction, and then that's it. You don't necessarily learn anything about why the underlying relationship is correct.   For example if I saw the Towers of Hanoi problem (number of moves to complete given number of discs $n$), I could theoretically just look at the data, guess $2^n-1$ and prove it with induction, and be right, even though I didn't need to go through generating functions or fancy recurrence expansions or characteristic polynomials and what have you.   This leads me to wonder:  Are there any proofs that exist by induction alone, i.e. where some other proof or derivation does not exist? Something that is true but not necessarily known why, through some alternative means?

Proofs that proceed by induction are almost always unsatisfying to me. They do not seem to deepen understanding, I would describe something that is true by induction as being "true by a technicality". Of course, the axiom of induction is required to pin down the Natural numbers and certainly seem to be indispensable in one form or another.   However, I am still interested in the following: Are there any "natural" theorems in mathematics that seem unlikely to fall to any method other than induction for whatever reason? I would not include examples that proceed by breaking down a structure into smaller components that are more easily handled - somehow these proofs satisfy whatever criteria for beauty I have in my mind.   An example of a theorem that does have an inductive proof and a more "superior" proof is Fermat's little theorem. It is perfectly possible to prove it by induction but the proof through group theory seems better - perhaps because it is more easily generalizable. I would like examples where it seems like the "neat" proof is unlikely to exist.  This is probably very philosophical and I do not really have a concrete question but I am sure I am not alone in feeling this way.


I have the following input string:  '1893', '9', '3536286', '{FormatDate(2019-01-24 11:46:22,yyyy-MM-dd)}', '{FormatDate(2019-01-23 11:46:26,yyyy-MM-dd)}', '', 'S', ''   When implementing the following regex expression:  {FormatDate\((.*),(.*)\)}   My expression evaluates to:  Full Match - {FormatDate(2019-01-24 11:46:22,yyyy-MM-dd)}', '{FormatDate(2019-01-23 11:46:26,yyyy-MM-dd)}  Group 1 - 2019-01-24 11:46:22,yyyy-MM-dd)}', '{FormatDate(2019-01-23 11:46:26  Group 2 - yyyy-MM-dd  I would like a regex expression that matches {FormatDate(2019-01-24 11:46:22,yyyy-MM-dd)} and {FormatDate(2019-01-23 11:46:26,yyyy-MM-dd)} separately.   It would seem that the comma separating the two params within {FormatDate(param1, param2)} is not recognised?  Any help would be greatly appreciated!

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Suppose I have a circular markov chain. At each state, you are equiprobable to transition to the state immediately to your left or right.   I'm interested in the probability of visiting the jth state last?  That is to say, what is the probability of reaching all the other states at least once before the jth state?

For a graph $G$, let $W$ be the (random) vertex occupied at the ﬁrst time the random walk has visited every vertex. That is, $W$ is the last new vertex to be visited by the random walk. Prove the following remarkable fact:      For the   random walk on an $n$-cycle, $W$ is uniformly distributed over all vertices different   from the starting vertex.


I have read and understood that a normal force has got nothing to do with torque on a physical pendulum. But I can't understand in which direction the normal force points to. Can someone help?   is confusing me. Please help.  This image. Can you explain the direction of normal force in it?

Consider a compound pendulum pivoted about a fixed horizontal axis, illustrated by the force diagram on the right:  # Okay, I can't figure out where the normal force on the pendlum should point (this force isn't indicated in the diagram). On the one hand, I think it should point in the same direction as the tension force on the left-side diagram, in order to produce the rotation. But on the other hand, shouldn't the normal force point towards the pendulum rather than away from it? In any case, I know that normal face is perpendicuar to the contact surface, but how does "contact surface" fit into the context of this scenario? Please help me understand the concepts involved.


I need to calculate the number of days for a given month in python. If a user inputs Feb 2011 the program should be able to tell me that Feb 2011 has 28 days. Could any one tell me which library I should use to determine the length of a given month.

Is there a way using Python's standard library to easily determine (i.e. one function call) the last day of a given month?  If the standard library doesn't support that, does the dateutil package support this?


I have been seeing some dust of Fiberglass(?) floating in the air. Is breathing it, in unhealthy? I was unaware of the equipment in the attic, which I discover all the wrong  wiring connections from the lights. i have work as a electrician and i have never see anything like this. Alot of fiberglass and tapes.

My attic floor is covered with fiberglass insulation. I go to the attic very often. Sorting out winter/summer clothes. Or I go up to search for stuff as my attic is a short term storage.   2 weeks ago, we had water damage up in the attic which softened the floor and the ceiling of my son's room. A quarter of the ceiling collapsed and exposed some of fiberglass insulation. To dry up the wetness, windows were opened all the time. I am worried that particles of the fiberglass are all spread out throughout the house, through the ventilation, and my family may have been inhaling it for too long (2 weeks).   My hubby had a severe nose bleed the other day which required him to seek urgent help. At the hospital, they found out his big vein had burst. The bleeding only stopped after his nose was cultured . Now I wonder if we have all accumulated a handful of fiberglass in our lungs.  In particular I'm worried about my son's health in particular as he's only 14 years old. I have been having some pinching-like discomfort in my chest down to my abdomen and funny feeling in my mouth; a burning sensation.  I do not know if we should be at home while the ceiling will be ripped off... is it risky?  Insurance is carrying out the repairs.  Anything else I have to be aware off?


It seems Einstein's equivalence principle is neglecting time dilation. If an observer is at rest in an inertial reference frame, free of any gravitation, she will experience time flow at the "native" rate of a universe empty of mass and energy. However, an observer in free fall at the surface of the earth will experience time flow at a rate determined by earth's gravitation, which is slower than the native time flow rate. This seems to imply non-equivalence?

A clock near the surface of the earth will run slower than one on the top of the mountain.  If the equivalence principal tells us that being at rest in a gravitational field is equivalent to being in an accelerated frame of reference in free space, shouldn't the clock near the earth run increasingly slower than the other clock over time?  If those two clocks are considered to be in two different frames of acceleration, the one near the earth will have a greater acceleration than the one on the mountain, and thus over time, their relative velocity will increase over time which will increase the time dilation.  Or is this not a proper use of the equivalence principle?


I have tried the code:  \begin{thebibliography}{0} \bibitem{item1} author 1 and author 2 \textit{The title}. Thesis. SchoolName, 2018. \end{thebibliography}   It outputs "References", but since I am using only one reference, I want to use "Reference"; that is, without the "s".  EDIT I used \documentclass{article}. What worked for me was using  \renewcommand\refname{Reference}

Is there a way to rename (or do away with the name of) the bibliography page that is output using BibTeX?  If so, is the name dependent on the bibliographystyle, or is it something inherent within the BibTeX functionality?


In the movie Avengers I, when the Cap said,“At this point, I doubt anything would surprise me.” Then the director Fury answered,“Ten bucks says you’re wrong."   I understand that Fury was betting ten bucks that the cap was wrong. My questions are:  1) 'Ten bucks' is a plural, why use 'says' instead of 'say'?  2) It's not the first time I heard this expression and it seems most time people use 'says'; so is it a fixed phrase ? Or some kind of abbreviation for some sentence? If so, could anyone help to show me the complete version? Thanks a lot.

Are the two sentences correct or is one of them incorrect?     1) Five billion dollars is earmarked for the project.   2) Five billion dollars has been earmarked for the project.   I know dollars are countable. So I think both 'is' and 'has been' are correct here.   Also, do they differ in meaning?


FDIC insures each account up to $250,000.  A few billion / 250,000 = way too many bank accounts.  So how do the ultra rich insure their fortunes?

I am curious how a millionaire would guarantee the safety of his money, given that the FDIC only insures up to $250K of an individual's deposits at a bank.  If someone had $3 million that they wanted to put into the bank, would they have to open up 12 different bank accounts and deposit $250K into each one, so that all of his money is insured by the FDIC?  Or is there an easier way to guarantee the safety of all his money?


I am an Indian citizen who applied for a UK tourist visa (short stay, multi-entry) to be issued from India. I wish to travel to Dublin. Would I be entitled to enter Ireland? Note: I will first enter the UK.  I appreciate your response if anyone had experienced a similar situation.

I am an Indian Citizan holding a UK tourist visa (short stay, multi entry) issued from Singapore. I wish to travel to Dublin . Would I be entitled to enter Ireland.  Note: I will first enter U.K.  My visa doesn't have stamp of BIVS @british Irish visa scheme  Appreciate your response If anyone had experienced similar situation.


The pagefile is currently automatically allocated through Windows 10 itself. It seems that it has allocated 5888 MB of disk space. My system has 32 GB of RAM available and my intention was to lower the pagefile in size so that more of the faster RAM would be used instead of the virtual one. Is there any real merit in doing so? . But I'm still wondering if the answer to that still holds true in 2021 Thank you!

I just upgraded my Windows 7 machine from 12GB to 24GB RAM - both for running more VMs and for future proofing.  My C drive is an SSD with 129GB formatted size.   I was surprised to find out that the SSD only has 68GB free (most of my files are on D: to G:). Researching I found 24GB of my precious C: SSD are taken up by the virtual memory pagefile in the root.  Do I need such large amounts of virtual memory when I have 24GB or RAM? I bought this size of memory so I'd not have to go to disk.


Both Linux and Windows support TCP keep-alive packets. They can be activated and configured with (system-dependent) setsockopt calls, see e.g.  for the Linux case. When using boost::asio there appears to be support for keep-alive messages, see . However that page only covers activating it. In several new responses to an  it was pointed out that Boost has recently added the means to configure timeouts on operations (which obviates the need for setsockopt and #ifdef code-branches for different systems). However, a  still suggests calls on the native sockets.  My question is: How can I configure the time interval and timeouts of keep-alive packets using boost::asio?

can you set SO_RCVTIMEO and SO_SNDTIMEO socket options in boost asio?  If so how?  Note I know you can use timers instead, but I'd like to know about these socket options in particular.


I am quite new to programming, at least on the level that I am currently attempting. I've been creating a character class for use in a 2D fighting game engine that will hold a BufferedImage arraylist of frames of character animation. Everything in the program compiles and runs fine, except that I keep running into a NullPointerException in the following code:      public void addImage(String image) throws IOException   {     this.character.add(ImageIO.read(new File(image)));   }   I am not sure exactly how to fix this, as my low level of general Java knowledge (I only have 1 2 semester high school class by a shoddy teacher under my belt) prevents me from correctly understanding the descriptions on how to fix the problem on various websites. Could somebody describe how to solve this in a clean and concise way? Thank you!

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Let's say I have 2 Terminals open in the background.  I click on the Terminal icon on the dock, it shows me the preview of two windows and I click on the first one. I discover that this is not the right one.  Now I click on the icon again, get the preview of two windows again and select the second one. I get same terminal again! Ubuntu has switched the order of the previews in the meanwhile.  Is there a setting that keeps the order of these window previews stable?

In the Ubuntu dock on Ubuntu 18.04, multiple windows of the same application are grouped and orange dots are shown to tell you how many windows of the application are opened. When you click on the icon, a small screen capture of each of the windows is shown.  However, these screen captures are shown in an order that's based on which window was last active on the desktop. This is something that clashes with the way I use the dock. I'm used to mentally mapping the windows to their dock positions. As such, I will often be trying to get to "the top one" and then I end up needing several clicks before I actually get to the terminal (or some other application) that I was looking for.  Is there some way to make sure that the order of these screen captures does not change whenever a window becomes active?


I'm upgrading to a dedicated server, and I've decided between two servers, but I don't know which to choose. The differences between the two configurations are:  Server 1: Intel Xeon W3520(4 cores/ 8 threads), 2.66 GHz+, 32 GB ECC RAM, 2 X 2TB SATA Server 2: Intel Xeon E3 1225v2(4 cores/ 4 threads), 3.2 GHz+, 32 GB Non-ECC RAM, 3 x 120 GB SSD  The server will be a LAMP, and probably Debian 7.  After searching I found that ECC RAM is definitely optimal for a server, especially for mine (I got 40,000 monthly hits on shared hosting), and .  The first server also has 8 threads to Server 2's 4, but server 2 has 3.2 GHz+ and I get the all-important SSDs. The reduction in sze available is not important to me.  I couldn't find an answer online. Should I go for server 1 because of its ECC RAM and double the # of threads, or should I go for the SSDs, and higher CPU frequency?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I would like to save my chat logs, or my chat history, for archival purposes. Most chat clients that I use already have a logging function of some kind.  Does the Diablo 3 game client save the chat session anywhere on the drive?

I'd like to take some in-game notes, for example significant items I sold at the AH (with links to the items), some tips or various things I want to remember, etc.  For instance by sending chat messages to myself and saving the log somehow.  Is that possible?


I'm working on a problem in which I need to pull a random String from a keySet. Just wondering if anyone can give me some direction here. I'm pretty lost on it. I've found quite a few ways to do it if I were using an int, but not a String. For example I want to quiz a user on States and their Capitals, and to pull out a random Key from the keySet for the question. Here's the set: Set<String> states = stateCapitals.keySet();

How do I pick a random element from a set? I'm particularly interested in picking a random element from a HashSet or a LinkedHashSet, in Java. Solutions for other languages are also welcome.


I know how tu use bevel and emboss but it seems to be more than that … Thanks for ur answers !!

I've been trying to figure out how to get this shaped chrome effect, it’s really clean and I’d love to play with it in Photoshop.


I am defining a element in html

  and I am setting the inner html like this document.getElementById("dict").innerHTML=
ಒಂದ್
;  but the render is gibberish à²’à²‚à²¦à³  expected result ಒಂದ್  what am i missing here?

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


I would like kindly to ask if there is any on the web, free plot engine for  a plane phase potrait? Thanks a lot.

I haven't got Matlab, nor have I found a suitable online tool. Could someone plot the phase diagram for the following, or point me in the right direction?  $$\frac{dx}{dt} = y - x, \frac{dy}{dt} = x(4 - y)$$


I'm trying to make something that allows the user to change the "price" of an item. It's working so far, but my problem is that the prices show up as empty values on the first load of the page, giving me the "undefined index" error, which means that the user has to input prices first before it works as intended. I want to make it so that the prices have predefined values before loading.  Any help would be much appreciated.  <?php  $price1 = $_POST['price1']; $price2 = $_POST['price2']; $price3 = $_POST['price3']; $price4 = $_POST['price4']; $price5 = $_POST['price5']; $price6 = $_POST['price6'];  ?>
Admin
  <form method="POST" action="admin.php">

     Product Name	     Price	     Change Price

     Double Cheesy Quarter Pounder	     <?php echo "PHP" . $price1;?>	     <input type="text" name="price1">

     Crispy Bacon Burger	     <?php echo "PHP" . $price2;?>	     <input type="text" name="price2">

     Mushroom Burger	     <?php echo "PHP" . $price3;?>	     <input type="text" name="price3">

     Triple Bacon Burger	     <?php echo "PHP" . $price4;?>	     <input type="text" name="price4">

     Cheesy Bacon Fries	     <?php echo "PHP" . $price5;?>	     <input type="text" name="price5">

     Chocolate Frappe	     <?php echo "PHP" . $price6;?>	     <input type="text" name="price6">

 <input type="submit" value="Confirm">  </form>

In Ruby you can easily set a default value for a variable   x ||= "default"   The above statement will set the value of x to "default" if x is nil or false  Is there a similar shortcut in PHP or do I have to use the longer form:  $x = (isset($x))? $x : "default";   Are there any easier ways to handle this in PHP?