Proof or Counterexample on the Convergence of a Series

So one of my professors proposed a problem to me and it has stumped me for some time now. Here's how it goes:  Suppose you have a sequence $a_n$ of real numbers such that $$\lim_{n\to\infty} a_{n} = 0$$ and suppose the sequence of partial sums $s_n$ is bounded. Prove that $s_n$ converges or give a counterexample.  I'm hoping to figure this out without anyone handing me the complete solution, so if someone could point me in the right direction with a hint, it would be much appreciated.


What does it mean: terminated by signal SIGSEGV (Address boundary error)

When I test the following code with #define N 100  , there's no error accures. But I change it into #define N 1000, error show's that fish: “./file” terminated by signal SIGSEGV (Address boundary error). Can somebody help? I'v tried to find answers from google, but I can't understand other's solutions which since to be same error different problem.... I know that multiply two matrix can work in a large amount such as 1000*1000 matrix. But I'm new to learn this multiply matrix. #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> #define N 2000  int main(){    struct timespec t_start, t_end;    double elapsedTime;    int i, j, k;    int a[N][N], b[N][N], c[N][N], cc[N][N];        for( i=0; i<N; i++ )     for( j=0; j<N; j++ ) {         a[i][j] = rand();         b[i][j] = rand();         c[i][j] = 0;         cc[i][j] = 0;     }     // start time     clock_gettime( CLOCK_REALTIME, &t_start);       for( i=0; i<N; i++ ){         for( j=0; j<N; j++ ) {             for( k=0; k<N; k++ ){                 c[i][j] += a[i][k]*b[k][j];             }         }     }     // stop time    clock_gettime( CLOCK_REALTIME, &t_end);     // compute and print the elapsed time in millisec    elapsedTime = (t_end.tv_sec - t_start.tv_sec) * 1000.0;    elapsedTime += (t_end.tv_nsec - t_start.tv_nsec) / 1000000.0;    printf("Sequential elapsedTime: %lf ms\n", elapsedTime);       // start time    clock_gettime( CLOCK_REALTIME, &t_start);      #pragma omp parallel for private(i, j, k)      for( i=0; i<N; i++ )     for( j=0; j<N; j++ ) {         cc[i][j] = 0;         for( k=0; k<N; k++ )             cc[i][j] += a[i][k]*b[k][j];     }     // stop time    clock_gettime( CLOCK_REALTIME, &t_end);     // compute and print the elapsed time in millisec    elapsedTime = (t_end.tv_sec - t_start.tv_sec) * 1000.0;    elapsedTime += (t_end.tv_nsec - t_start.tv_nsec) / 1000000.0;    printf("Parallel elapsedTime: %lf ms\n", elapsedTime);      for(i=0; i<N; i++){         for(j=0; j<N; j++){             if(cc[i][j] != c[i][j])                 break;         }     }         if(i==N && j==N)         printf("Test pass!!!\n");      else         printf("Test failed!!!\n");    return 0; }     Tried to google SIGSEGV but couldn't found what's wrong?


A question about the number of points of the preimage of a regular value.

I would like to have some explanation about a fact which is written in the first chapter of Milnor's book "topology, from the differentiable viewpoint". The fact is the following: Suppose $M,N$ be two differentiable manifolds of the same dimension. Let $f: M \rightarrow N$ be a differentiable map with $M$ compact and let $y \in N$ be a regular value. We define #$f^{-1}(y)$ to be the number of points in $f^{-1}(y)$, thus $f^{-1}(y)$ does not contain any critical point. And now the part which I do not understand: the book says that an observation that can be made about #$f^{-1}(y)$ is that is locally constant as a function of $y$ (where $y$ ranges only through regular values). I don't understand how to figure out this fact, I tough considering #$f^{-1}: f^{-1}(y) \rightarrow \mathbb{N}$, but still remains unclear to me why it should be a locally constant function. Could someone please can explain to me this fact maybe also (if I am not asking too much) giving a simple example.


Left-aligned text on same line as numbered equation

I currently have this:    With the following code and preamble:  \documentclass{article} \usepackage{amsmath}  \begin{document}  $\backslash c_{t}$ \begin{equation} {C_{t}: \pi D_{1}U(c_{t},L_{t})+\pi(-1)p_{t}=0 \iff D_{1}U(c_{t},L_{t})-p_{t}=0} \end{equation}  \end{document}   I want to have the "\c_t" on the same line, left-aligned.  I have tried my best to Google around but nothing seems to be right. One person suggested I put it in a table, but that seems cumbersome, especially to do this numerous times.


Simplification of a Combinatoric problem (n k)^2

How do I simplify the sum $$\sum_{k=0}^{n} {n \choose k} ^2?$$ I have tried, but the best I did was  $$\sum_{k=0}^{n} {\frac{n!n!}{k!k!(n-k)!(n-k)!}}.$$


Mathematically, what are the drawbacks of R-squared in evaluation a regression model?

I kept seeing articles about the drawbacks of R-squared (and that's why we need to have adjusted R-squared).   One drawback is that: "Every time you add a predictor to a model, the R-squared increases, even if due to chance alone. It never decreases. Consequently, a model with more terms may appear to have a better fit simply because it has more terms." ().  Mathematically, why does this happen? And mathematically, why adjusted R-squared can solve this problem?


Simple networking, now that UNet is deprecated

I'm prototyping a two-player typing game in Unity. I don't have any experience making multiplayer games, so I'm not sure how to best approach the netcode.  For this game all I think I really need is an API for sending messages to and from a server - the two clients only care about what the other one is typing, and there isn't any gameplay that's even remotely related to physics. Looking into UNet, it seems like the parts based on synchronizing game objects do more than my game needs, but the  from the HLAPI seems like a good fit. That said, this is a real time game, so low latency is ultimately more important than any API style considerations.  The wrench, however, is that Unity is deprecating UNet without shipping any replacements. I'd start working with HLAPI, but I don't want to have to replace all of the networking code down the line or even have to shut down the game when Unity's servers go down, if that's what will happen after using HLAPI.  So as a beginner to multiplayer development, with relatively low API requirements, where do I go when Unity multiplayer is in flux? Should I learn the DOTS-Netcode mentioned in ? Should I go with a third party solution like Photon? Or will the HLAPI be sufficient, even post-deprecation?


Develop for iPhone using Windows plateform?

can I develop an application for iphone using windows plateform? Thanks in advance,


Natural language date/time parser for .NET?

Does anyone know of a .NET date/time parser similar to  (handles stuff like "tomorrow" or "3pm next thursday")?  Note: I do write Ruby (which is how I know about Chronic) but this project must use .NET.


A woman on FB offering to pay my debts. Scam?

On thanksgiving day a woman posted in a facebook group that her father had just passed away (left her money) and in good deed because it was thanksgiving she was offering to pay people’s debts. Well I inboxed her and she pretty much wants me to open up a bank account with First Tech Credit Union and give her my log in and password info. Ofcourse its sketchy!   So I questioned her and asked why she wanted that instead of her sending me the money directly from her bank to mine. She then responded because she wants to keep records of my debts. (She asked for proof and I sent her screenshots ONLY of my outstanding balances) I heard about the depositing checks scam so I questioned her about how she would deposit the funds and she said cash.  Her facebook page is 100% legit, I screenshotted her pics and family profiles etc. We came to an agreement that I would only accept her help if she sends me a picture of her ID before me sending this info.   She literally just wants to deposit the money to me, She isn’t asking me to send nobody money from that account or anything. Of course the account will be empty when I provide it to her. When she does deposit the money I am planning to immediately change the password and obviously stay watching my account activity while she deposits the funds.   She actually also provided pics of other accounts she funded. My question is, is this a scam? And if so how could she possibly scam me? Specially if i have her information and A pic of her ID. She is a christian lady and looks like she has a good heart, We talked about my struggles and she actually looked into why I needed to be assisted with the money. By no means was she pushy or anything. I want to believe that she just wants to help me but I am also too skeptical.


my email validation in java script is not working properly

my code is below both are in diffrent pages
   email:	<input type="email" name="mailid" id="mail" onKeyUp="validateemail()" required>
   JS  function validateemail() {     var chmail=document.getElementById("mail");     if(chmail.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/))     {         producePrompt("valid email","vem","green");          return false;      }      producePrompt("email invalid","vem","red");          return true;   }


When conducting a t-test why would one prefer to assume (or test for) equal variances rather than always use a Welch approximation of the df?

It seems like when the assumption of homogeneity of variance is met that the results from a Welch adjusted t-test and a standard t-test are approximately the same.  Why not simply always use the Welch adjusted t?


2.83: how to join cylinders and hollow out the junction

I want to create sewer pipes where a player can walk inside on a 3D game. Then I'm trying to make them by multiple cylinders like this.  Now I have two problems. First, I don't know how to cut A's edge.  The other is how to cut B's side  faces.  I tried to do that by boolean modifier, but it didn't work. So will anyone tell me how to do that? Thanks.


How can I write this reference in BibteX?

This reference contains a formula and when I write it as follows     @article{romeo2011effective, title={The effective stability parameter for two-component galactic discs:  is $Q^{- 1}\sim Q^{- 1}_{stars}+ Q^{- 1}_{gas}?$}, author={Romeo, Alessandro B and Wiegert, Joachim}, journal={Monthly Notices of the Royal Astronomical Society}, volume={416}, number={2}, pages={1191--1196}, year={2011}, publisher={The Royal Astronomical Society} }   there are some errors (missing $ or missing a {). Note that I'm using a Persian thesis template (it can be found ).  This  comes from google schoolar.  Note that, using {$Q^{-1}\sim Q^{-1}_{\text{stars}}+Q^{-1}_{\text{gas}}$}?, the numbers appear in the formula, are in Persian. Thanx


How long does it take an investment to double if continuously compounded at a 6% rate? Is this right?  \begin{align*} e^{0.06 \cdot t} & = 2\\ 0.06t & = \ln(2)\\ t & = \frac{\ln 2}{0.06}\\   & \approx 11.55 \end{align*}  Why does $e$ equal the $\lim_{n \to \infty} (1+\frac{1}{m})^m$?  I know that if $r$ is the rate and $n$ is the number of compounding periods in $t$ years, then the value of an investment is:  $$A_0\left(1+\frac{r}{n}\right)^{nt}$$  But how do we get from here to the definition with $e$ in continuous compounding?


Java referencing error when calling methods to main function

Hi I have this problem I get this error in the main function: "non static method cannot be referenced from a static context" all of the methods called are underlined with this error. I've tried a few things and I can't find a way to overcome it and it's doing my head in. Is there a way I can get rid of that error? thanks here is the code:  import java.util.Scanner;  public class Survey {  int age; char gender; char show; int over30MY = 0, over30FY = 0, under30MY = 0, under30FY = 0; int over30MN = 0, over30FN = 0, under30MN = 0, under30FN = 0; int totalCalls; int totalWatchers; float perTotalWatchers; float perU30M, perU30F, perO30M, perO30F, perTotalF, perTotalM; float perTotalU30, perTotalO30, perTotal;  public static void main(String[] args) {             System.out.println("Thank you for your call,\nPlease take some time to answer a few questions");     Info();     collectData();     getTotals();     printTotals();  }//end of main  public void Info() { //Prints student Info      System.out.println("");     System.out.println("");     System.out.println("");     System.out.println("");     System.out.println(""); }  public void collectData() {      Scanner userInput = new Scanner(System.in); //Does everything      //ask questions     System.out.println("What is your age?\n");     age = userInput.nextInt();      System.out.println("Male or Female (Enter M or Y)");     gender = userInput.next().charAt(0);     gender = Character.toLowerCase(gender);      System.out.println("Do you watch the show regularly? (Enter Y or N)");     show = userInput.next().charAt(0);     show = Character.toLowerCase(show);      //store data     if((age > 30) && (gender == 'm') && (show == 'y')) {                over30MY++;                  }     else if((age > 30) && (gender == 'f') && (show == 'y')) {         over30FY++;     }     else if((age < 30) && (gender == 'm') && (show == 'y')) {         under30MY++;     }     else if((age < 30) && (gender == 'f') && (show == 'y')) {         under30FY++;     }     else if((age > 30) && (gender == 'm') && (show == 'n')) {         over30MN++;     }     else if((age > 30) && (gender == 'f') && (show == 'n')) {         over30FN++;     }     else if((age < 30) && (gender == 'm') && (show == 'n')) {         under30MN++;     }     else if((age < 30) && (gender == 'f') && (show == 'n')) {         under30FN++;      }//end of if else  }//end of collectData      public void getTotals() {//calculate totals for printing          totalCalls = over30MY + over30FY + under30MY + under30FY + over30MN + over30FN +      under30MN + under30FN;          totalWatchers = over30MY + over30FY + under30MY + under30MN;          perTotalWatchers = Math.round(totalWatchers / totalCalls); //rounds percentage to nearest whole number          perU30F = Math.round(under30FY / totalWatchers); //Total Under 30 Females         perU30M = Math.round(under30MY / totalWatchers); //Total Under 30 Males         perO30F = Math.round(over30FY / totalWatchers); //Total Over 30 Females         perO30M = Math.round(over30MY / totalWatchers); //Total Over 30 Males          perTotalF = Math.round(perU30F + perO30F); //Total Females         perTotalM = Math.round(perU30M + perO30M); //Total Males          perTotalU30 = Math.round(perU30F + perU30M); //Total Under 30         perTotalO30 = Math.round(perO30F + perO30M); //Total Over 30         perTotal = Math.round(perTotalF + perTotalM); //Total       }//end of getTotals      public void printTotals () { //Prints the Totals          System.out.println("Total People called is "+totalCalls);         System.out.println("Number of people who watch the show regularly is "+totalWatchers);         System.out.println("Percentage of those who watch the show is "+perTotalWatchers);                System.out.println("");         System.out.println("");      }//end of printTotals  }// end of class


Can you meet caster level requirements with conditional bonuses?

I am playing a level 8 Incanter from Spheres of Power. As a full caster, this gives me a caster level of 8. I have a trait which increases my caster level for the destruction sphere by 1, and I have a stave of destruction (+1). This gives me a total CL of 10 in destruction. This has allowed me to qualify for the Wand Wielder feat, which requires a CL of 10 or higher.  Am I only allowed to use the feat when I'm wielding the staff (so I would be wielding both a stave and wand to benefit at the moment), or am I just allowed to have the stave on me?


Correct usage of "to hear" and "to listen to"

Did you hear the song?      Is this the correct expression, or should I say the following:       Did you listen to the song?


$A,B \in M(n,\mathbb C)$ with $AB=BA$ , then does there exist $P \in M(n,\mathbb C)$ and $f(X) , g(X) \in \mathbb C[X]$ such that $A=f(P), B=g(P)$?

Let $A,B \in M(n,\mathbb C)$ ; if $\exists P \in M(n, \mathbb C)$ and $f(X) , g(X) \in \mathbb C[X]$ such that $A=f(P) , B=g(P)$ then $AB=BA$ . Now suppose $AB=BA$ ; then does there exist $P \in M(n,\mathbb C)$ and $f(X) , g(X) \in \mathbb C[X]$ such that $A=f(P)$ and $ B=g(P)$ ? If this is not true in general , then what if we assume that both $A,B$ are diagonalizable ? Is it true then ?


Birthday problem, want about using unordered counting?

Given there are 365 days in a year and $n$ people, the probability that at least two people have the same birthday is given by  $$\frac{365^n - 365 \cdot 364 \cdots (365-n+1)}{365^n}.$$ In this calculation, we treat the $n$ birthdays we selected as a sequence where their order matters.   If we think the $n$ dates that randomly selected as a set where the order does not matter, I believe we would have the probability $$\frac{{365+n-1 \choose n} - {365\choose n}}{{365+n-1 \choose n}}.$$   For the total number of outcomes, we model by throwing $n$ balls uniformly randomly into $365$ boxes. Essentially, there are $n$ balls and $365-1$ walls (between the boxes). For example $$ \circ |\;\;\; |\;\;\;|\circ \circ |\;\;\;|\circ |\cdots |$$ would mean one person was born on day $1$, two people were born on day $4$, one person was born on day $6$, and so on. This is how I came up with the ${365+n-1\choose n}$. For the case that everyone has a distinct birthday, it would be ${365 \choose n}$.   What is wrong with this approach?


There is a type of bulb in the market nowadays that detects load-shedding! I mean it keeps lighting after load-shedding. But my curiosity is if I turn off the switch of the bulb, it might have detected that load-shedding has occurred, but it doesn't! How does exactly it detects electricity outage!  I want to know the electrical working behind it.  [EDITED]  Here is a video of that product (not exactly mine, but similar)   I'm from Bangladesh, yep here load-shedding means turning off in a grid for a short period of time.   My Building has no special electrical connection.


WinEdt has stopped being able to close pdf files

Ulrike Fischer's answer shows the previous similar questions are all out of date.  The latest of them,    refers to AcroviewA17 and AcroviewR17 and these have already been replaced by versions numbered 18.  Other advice in the answer to that question also has not worked for me but I think it not worth detailing the reasons since it is out of date.  I am using WinEdt 10 Build: 20170413 (v. 10.2) - 64-bit, and fully updated MiXTeK 2.9, with Acrobat Pro DC continuous release version 2018.009.20044.  In fact the problem just appeared on another of my machines this morning, immediately after updating everything.  I had been using the options Start Viewer and Forward search.  But just now PDFLaTeX and PDFTeXify have become unable to close the pdf for a file if it is open.  And so they cannot do forward search.  If I left the pdf open from a previous run then, though nothing shows in the log file, a dialogue box opens saying     Warning      Cannot open DDE link to "C:\Program Files (x86)\Adobe\Acrobat   And a file called PDFCloseDoc.edt has this:     // DDE ==============================================================    DDEOpen("%$('PDF-View')","%$('Acro-DDE_Service');","%$('Acro-DDE_Topic');");   IfOK(!"Relax;",!"DDEClose;JMP('Done');");   DDEExe('[AppHide()]');   // As of Acrobat 8 DocOpen must be done twice or else Adobe Crashes!   DDEExe('[DocOpen("%P\%N.pdf")]');   DDEExe('[DocClose("%P\%N.pdf")]]');      And even if no pdf is open, but I have the option set for forward search PDFTeXify creates a new pdf and opens to the first page but then when it would do the forward search it gives those same messages.  Is there an easy fix or should I try reinstalling something?  Questions   and    Describe essentially the same problem 4 and 5 years ago.  Are those fixes still best or do they even work now?


Why is the delete notice is above, instead of below the close notice?

On  the delete notice is above, instead of below the close notice. Why is this happening? I understand this was made on purpose, but would like to know the reasoning.


I am relatively new to writing LaTeX packages.  I would like to create an environment so that anything contained in that environment can be ignored when producing output.  The desired behavior would be the following:  \documentclass{article} \usepackage[hide]{MyPackage} \begin{document} This should always show up. \begin{Hidden} This should show up unless the [hide] option is used. \end{Hidden} \end{document}   One possible use case: if I write a problem set for a class, I can write the solutions into the same document wrapped in the Hidden environment.  That way, I can compile with the [hide] option to produce the problem set for my students, and I can recompile without the [hide] option to produce the solution set.  Here's the code I currently use to accomplish this.  It was at some point borrowed from a package offering similar functionality, but unfortunately I can't remember the original package.  \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{MyPackage} \RequirePackage{ifthen} \newboolean{MyPackage@hidden} \setboolean{MyPackage@hidden}{false} \DeclareOption{hide}{\setboolean{MyPackage@hidden}{true}} \ProcessOptions\relax \newenvironment{Hidden}     {\ifthenelse{\boolean{MyPackage@hidden}}     {\setbox\z@\vbox\bgroup}{}}     {\ifthenelse{\boolean{MyPackage@hidden}}{\egroup}{}}   This code has been working somewhat, but there are three main issues.  The first is that there are errors when I put figures inside the Hidden environment.  (This is a pretty common need when writing solutions to homework problems.)  The following code does not compile:  \documentclass{amsart}  \usepackage{amsmath} \usepackage{tikz} \usepackage[hidden]{hideexample}  \begin{document}  This always shows up.  \begin{Hidden} \begin{figure}[h] \begin{tikzpicture}  \draw (0,0) circle (2cm);  \end{tikzpicture} \caption{This shows up when not hidden, but causes an error when the [hide] option is used.} \end{figure} \end{Hidden}  \end{document}   The second issue is that I would like to implement multiple hide-able environments.  (Expanding on the homework use case, I might also want to create notes to the grader about how to assign partial credit.  So I would want to be able to independently hide/show the solutions and the grader comments.)  I have no idea how to adapt the code above to do this.  I never really understood what the code does, just that it (partially) worked.  The third "issue" isn't really a problem with the functionality, but another feature.  It would be really convenient if, instead of [hide]/[show] options, there was a [solutions] option (or something similar) so that compiling the document would produce both the homework set and the solution set at the same time.  (So, I would be working on HW.tex, and compiling would produce HW.pdf and HW_solutions.pdf at the same time.)  Is something like this possible?  Thanks in advance.    Follow-up: After modifying Werner's answer below, I'm using the code  \if@hidden   \long\gdef\hide[#1]#2\ehide{\vspace{#1}}% \else   \long\gdef\hide[#1]#2\ehide{#2}% \fi   This allows the following use:  \hide[4in] %stuff \ehide   This shows %stuff when I'm not using the global [hide] option.  When I am using the [hide] option, %stuff is hidden, and 4 inches of blank vertical space are shown instead (as a placeholder for %stuff).  The only issue is that this usage makes it look like [4in] is an optional argument.  Since \def requires an exact calling match, the argument is actually required.  How can I make this argument optional (i.e., with 0in as the default value)?


Why is the implication "If pigs could fly, I'd be king" a true implication?

Let $P$ = "Pigs can fly" and $Q$ = "I'm king".  Apparently, there's a rule stating that $P \implies Q$ is true, if $P$ is false.  In this example, $P$ is indeed false, because pigs cannot fly. But how does this make the implication true?  The way I see it, pigs learning to fly will not cause me to be crowned king.  What am I missing here?  Any help appreciated?


Can you disable sticks of RAM in windows without physically removing them?

I think I'm having RAM issues with one of the games I'm playing. It will slowly start dropping frames until it becomes very hard to play. I ran memtest86 and it identified some errors and bad addresses.  I don't think there is a way to disable certain addresses in windows (at least I couldn't find one), so I thought the next step would be to remove the physical sticks of RAM from my computer until the problem went away. However, I have a laptop and it is pretty difficult to reach some of the RAM. Is there anyway, within windows, to 'disable' a stick of RAM without having to physically remove it?  It would save me a lot of time and possibly any mistakes I might make while trying to open my laptop up. Anyways, thanks.


How to compute the sum of a $\frac{1}{n(n+1)}$ serie?

I'm solving few math puzzles to train myself for a local math contest, and I'm stuck with this problem :  Compute the sum of :   $$\frac{1}{2*1} + \frac{1}{2*3} + \frac{1}{3*4} + ... + \frac{1}{2013*2014}$$  As said in the title, I know that all of those, can be written as :  $\frac{1}{n(n+1)}$  But the $n(n+1)$ is not a geo seq nor an arithmetic one . So there are no theorems to compute their sum .   I'v also found a good number of similar puzzles so how can I solve this kind of problems ?


"Undefined reference to" error declaring an object with a double template class

I've got a class that uses a two-arguments template:    template<class T, class R>   When I try to declare an object in main.cpp it says: "undefined reference to FileTest<int, int>::FileTest()  Here's the code:  FileTest.h  #ifndef FILETEST_H #define FILETEST_H #include <string> #include <iostream>  ....  using namespace std;  template<class T, class R> class FileTest : public FileInput , FileOutput {      public:         FileTest();          FileTest(const string nome_file):FileInput(nome_file),FileOutput(nome_file){         };          virtual ~FileTest();          void setNewEntry(const T id_domanda,const R id_risposta);          ...        private:         ...  }; template<class T, class R> FileTest<T,R>::~FileTest() {     //dtor }   template<class T, class R>  void FileTest<T, R>::setNewEntry(const T id_domanda,const R id_risposta){   /*     sets new entry in a vector */   }  #endif // FILETEST_H   main.cpp   #include <iostream>      #include "FileTest.h"      using namespace std;  int main() {      FileTest<int, int>  object;     return 0; }   Error (in main.cpp) :     undefined reference to FileTest<int, int>::FileTest()   When I try with another class which has only one template argument, everything is working! What's the cause of this error?


Date Validation in Visualforce/Apex without JS

For a date field , I know I can put validate like this :  <apex:outputText label=" Date" value="{0,date, MM'/'dd'/'/YYYY}" >                         <apex:param value="{!item.Date__c}" />   But this might have loopholes in it like 02/03/2017 entered manually may maean different in US and say UK format .  Is there any other validation that can be added through VF page or apex code ? Not asking about any JS solution.


Acessing a method from a class in another class, without getting the NullPointerException

I have a class called ReqOrderImpCode with the following code inside it:   `public class ReqOrderImpCode {     WebDriver driver;     WebDriverWait wait;     PrintStream out;     int maxim = 0;     boolean bcase = true; //Constructor     public ReqOrderImpCode(WebDriver driver, WebDriverWait wait, PrintStream out) throws FileNotFoundException {         this.driver = driver;         this.wait = wait;         this.out = out;     } // Start testing, initialize the page     public void page() {         driver.get("http://google.com");         driver.manage().window().maximize();     } //Access to methods     Methods m = new Methods(driver, wait, out);  public void checkLoginAndProceed() throws FileNotFoundException {         String pageTitle = driver.getTitle();         if (pageTitle.equals("GAS")) {             m.sendKeys(xUsername, "ftalexiuc");             m.sendKeys(xPassword, "1freedom1");             m.click(xLogin);         }  }`   The methods class which i am using to call the methods above looks like this:`  public class Methods {      //Initialization     WebDriver driver;     WebDriverWait wait;     PrintStream out;      //Constructor     public Methods (WebDriver driver, WebDriverWait wait, PrintStream out) throws FileNotFoundException {         this.driver = driver;         this.wait = wait;         this.out = out;         }     //Method for clicking     public void click(String s){         WebElement element = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(s)));         element.click();         }      //Method for SendKeys     public void sendKeys(String s, String t){         WebElement element = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(s)));         element.sendKeys(t);         } }`   The problem is that the m.sendKeys() method from the first class is returning NullPointerException error. How should i write this for this error to be avoided and my code to run as intended?


Solve this equation using Bernoulli's equation

How do you solve this equation:   $$\frac{dy}{dx} + \frac{1}{xy} = y^3$$  using Bernoulli's equation.  I've tried everything but I think there may be an error with the actual equation.


Not getting the correct position when assigning click listener

I am creating some div and assigning click listener to those div in a for loop The code is like this.      function selectedPhotosDiv(path){  try{      var choiceDiv = document.createElement('div');         choiceDiv.id = "photos"+Buttler.User.chatid;         choiceDiv.className = "display_photos";     for(var i=0;i<path.length;i++)     {            var box = document.createElement('div');         box.className = "img_box";         box.id = "box"+i;         box.style.backgroundImage="url('file://"+path[i]+"')";         var close = document.createElement('div');         close.className = "img_close";         $(close).click(function(){             console.info(i);         });         box.appendChild(close);         choiceDiv.appendChild(box);     }     return choiceDiv; }catch(error){ }  }   However on clicking the close the value of i is always the last value of i ie path.length-1; I am not able to figure out where i am doing the mistake. Need Help


Is there a statement whose undecidability is undecidable?

We know there are statements that are undecidable/independent of ZFC. Can there be a statement S, such that (ZFC $\not\vdash$ S and ZFC $\not\vdash$ ~S) is undecidable?


Why would I need both a validation set & a test set if I'm not selecting a model?

I have a dataset with two features and one outcome.  I was asked to separate the data into three parts such that 70% of the data is a training set, 20% is for validation and 10% for testing. The model will be linear regression.  Why would I need both a validation set and test set here?  I am not selecting a type of model or tuning hyperparameters.    There are no options to select a model as it is a linear regression in the form of $y = b_1a_1 + b_2a_2 + b_3$, where we will get $b_1$, $b_2$, and $b_3$ from the training set. I will test the model with the test set and report the error. So what is the need for a validation set?


MVC DateTime binding with incorrect date format

Asp.net-MVC now allows for implicit binding of DateTime objects. I have an action along the lines of  public ActionResult DoSomething(DateTime startDate)  {  ...  }  This successfully converts a string from an ajax call into a DateTime. However, we use the date format dd/MM/yyyy; MVC is converting to MM/dd/yyyy. For example, submitting a call to the action with a string '09/02/2009' results in a DateTime of '02/09/2009 00:00:00', or September 2nd in our local settings.  I don't want to roll my own model binder for the sake of a date format. But it seems needless to have to change the action to accept a string and then use DateTime.Parse if MVC is capable of doing this for me.  Is there any way to alter the date format used in the default model binder for DateTime? Shouldn't the default model binder use your localisation settings anyway?


Highest temperature possible to achieve using magnifying glass and sunlight

Temperature of the surface of the sun is about 5750K. Can you heat an object to more than 6000K using magnifying glass and sunlight? According to second law heat cannot be transferred from colder to hotter object and therefore it should not be possible to heat anything to temperature higher than 5750K using only sunlight and magnifying glass.  Also, I know that its possible to achieve much higher temperatures using electricity from solar cells, but this is not the same case since solar cell is not 100% efficient (and works only when its temperature is lower than 5750K) while magnifying glass can be 100% efficient.


The goto answer to that question is that the electron is a pointlike particle and cannot spin. The electron is not pointlike though. It is described by a wavefunction. One can prepare the wavefunction to describe a very small electron, but not a point-like electron. Is there a genuine answer to the problem?


Not able to use item[v.labelField] expression in lightning

<aura:iteration items="{!v.dataList}" var="item">
                                         <lightning:icon iconName="utility:check"                                  size="x-small"                                  alternativeText="Selected" />                  {! item[v.labelField]}
 </aura:iteration>


Windows update fails upon installation of IE11

So I was trying to get all updates installed in order to be eligible for win 10 upgrade, but when windows update tries to install ie11 it fails with 9C59 error code. Also manual installation of ie11 does not work saying a error has occured, try again. Searching microsoft knowledge base I did not find any solutions that worked.


How to get a difference of angles in one mathematical expression?

I need to do this for AI and also range calculation over a curved surface.  I have two angles, a1 and a2, which can be in the range from 0 to 359. I need to calculate the difference between them, and it has to be the inside angle (smallest angle), not the "reflexive" outside angle. And it has to preserve the direction from a1 to a2, which will be positive if going counterclockwise and negative if going clockwise.  Examples of what the function should yield:  scr_ang_diff(30, 50) == 20  scr_ang_diff(80, 310) == -130 // NOT 230 !!!  scr_ang_diff(130, 130) == 0  Now I could do this with test cases, but it seems there should be a way to do this in one mathematical expression. I can no longer use the simple min of abs of the two differences (without test cases) because that doesn't preserve direction.  EDIT: in order to differentiate between this post and , I've decided to make it mandatory to preserve direction between a1 and a2.  Super bonus points if a1 and a2 can have range -359 to +359.  NOTE: yes efficiency matters. That doesn't mean you can't use trig functions, it just means I'll pick the least complex solution.


How could Sir Cadogan give Neville the passwords?

In Chapter Twelve of Prisoner of Azkaban we find the following passage:  They turned into the corridor to Gryffindor Tower and saw Neville Longbottom, pleading with Sir Cadogan, who seemed to be refusing him entrance. "I wrote them down!" Neville was saying tearfully. "But I must've dropped them somewhere!" "A likely tale!" roared Sir Cadogan. Then, spotting Harry and Ron: "Good even, my fine young yeomen! Come clap this loon in irons. He is trying to force entry to the chambers within!" "Oh, shut up," said Ron as he and Harry drew level with Neville. "I've lost the passwords!" Neville told them miserably. "I made him tell me what passwords he was going to use this week, because he keeps changing them, and now I don't know what I've done with them!"  This situation seems a bit strange. Sir Cadogan is refusing to allow Neville into the common room – even though Neville is a Gryffindor – because he doesn't have the password. And he's obviously not telling Neville the password. Yet we then immediately find out that he has previously told Neville all the passwords in advance. If he's not supposed to tell students the password even if they are from the correct house, how did he give Neville the whole list? And if he is allowed to give students the passwords then why couldn't he just tell Neville the password when he forgot it? (And what would be the point of a password in the first place?) And even if we interpret "A likely tale!" roared Sir Cadogan. as saying that Sir Cadogan forgot that Neville was a Gryffindor but had known that when he originally gave him the passwords, it would still render the password system mostly pointless, as the portrait would simply give any Gryffindor the password.  Edit I'm not sure why this would be a duplicate, given that the question this is supposedly a duplicate of explicitly states that it is a follow-up to this question, and the only answer there is mine and it doesn't answer this question. Essentially, what happened was that I asked a question and someone tried to answer it. That person then realized that he/she did not know enough background information to give a complete answer to this question, at which point that person asked for the background information and I supplied the information I had been working with when asking my question.


I plan on making an adventure, and in it they have to go deep underwater, through a tunnel, and out, but does water pressure apply in D&D 4e?


How to write "is distributed as" under a certain hypothesis?

I'd need a special symbol used in statistics.  What I need is a tilde with something written upon it.  I can get the tilde by using \sim, but I need to add a superscript over it (H_0). If I use \sim^{H_0}, I get a tilde with H_0 over it and on the right, not simply upon it.


Changing the sequence value of a PostgreSQL Sequence

How can I resequence the value start of a Sequence in PostgreSQL?


SQL Server Management studio slow connection or timeout when using Windows Authentication

I'm getting extremely long delays (10~30 seconds) in SQL Server Management Studio 2014 when attempting to connect to a SQL Server 2012 instance over TCP using Windows Authentication. This happens when connecting Object Explorer or a new blank query window. Once connected, running queries is fast. The problem does not happen when I connect using SQL Server authentication.  Environment:   Windows 7, logged in as a domain user TCP connection via IP address (not hostname) The server is at a remote location connected via VPN No encryption   When I logged into a co-worker's Windows 7 computer with my domain account, and connected to the same SQL Server through the same VPN, there was no delay. When the same co-worker logged into my PC with his own domain account, he experienced the delay. These tests show that the problem is unique to my PC. Also, the problem only appears when connecting to this specific SQL Server and VPN; I can connect to other SQL Servers on the local network via Windows Authentication without any delay.  Things I've tried with no success:   Disabled anti-virus and firewall Renamed the "12.0" folder under "%userprofile%\AppData\Roaming\Microsoft\SQL Server Management Studio" to "_12.0" to force SSMS to recreate my user settings. Force Network protocol to TCP rather than <default>. I also tried Named Pipes but my server isn't setup for that. Installed SSMS 2012 and tried that instead of 2014. Disabled IPv6 Blackholed crl.microsoft.com to 127.0.0.1 in my etc\hosts file. Disabled the Customer Experience Improvement Program in SSMS, Visual Studio, and Windows. Uninstalled all SQL Server related apps from my PC and reinstalled just 2012.   TCPView clues:   Using TCPView, I noticed that when I make a new connection, its state becomes ESTABLISHED right away, but then one or two more connections with the SQL Server are continually attempted and closed with TIME_WAIT. On my co-worker's computer, these connections are ESTABLISHED and solid. So I'm pretty sure this is the source of the timeouts, but what are the connections for, and why do they fail? (I don't have any addons in my SSMS.)   Any ideas?  Update: Intellisense/Autocomplete clue(?):  I noticed that once I finally do connect, Intellisense/Autocomplete doesn't work. Do those require separate connections from SSMS? I tried disabling them, and it didn't seem to resolve the long connection delay.


How can I ensure that old documents will compile in the future?

I was looking through some old files recently, and it occurred to me that they might be obsolete in the future.  Are there any steps that I should take for "archiving" my documents so that they will compile properly on later versions of LaTeX?  I once went to a seminar where it was indicated that the .dvi file can be converted back into a plain TeX file, so would it be the best "archival" document?


How do I position a TikZ picture relative to body text? I have drawn a circle using TikZ and would like to position it to the side of the body text (so it is easy to see as you're reading, but not in the way). I am not sure how to do this. I have tried changing the coordinates to move the picture, but it seems to only move figures relative to each other rather than moving the entire thing. I would appreciate some help with this. Thanks!   \documentclass{minimal} \usepackage{tikz} \begin{document} Body text. \begin{tikzpicture}     \draw [fill = lightgray] (0,0) circle [radius = 1.25 cm]; \end{tikzpicture} \caption{Circular Region} \end{document}


Can someone help me figure out the big-O for the recurrence relation $T(n) = T(n^{1/2}) + 1$?  I didn't think the master theorem would work since it requires $T(n) = T(n/b)$... to have $b$ as a constant. I was wondering if anyone could shed some light on a method to approach this problem? (not looking for a solution)


In Jackson films, Gollum is dressed in loincloth.  What was his manner of dress (in Hobbit/LOTR timeframe) in the books?


I have a requirement to add user to case team and need to validate that user should be skilled resource and should have specific skills otherwise do not allow to add that user to case team. I was expecting that trigger on caseTeamMember will work but it seems we can not write trigger on it. Any thoughts, how we can achieve it?  Thanks in Advance !!


Is it against SE rules or suggested good practice to have a different profiles for every SE site rather than a single  profile?


Integrating : $\int_0^1 {\frac {x^a-x^b} {\ln x} dx}$

We are given parameters $a > 0, b > 0$. Task is to integrate that: $\displaystyle \int_0^1 {\frac {x^a-x^b} {\ln x} dx}$. I have tried approaching problem from different angles with no luck.  I tried integration by parts(tried all combinations of possible $v$ and $u$), u-substitution with no luck. Also I tried to integrate this two similar terms separately.  Tried to get some idea of how to go from answer, got nice answer from MATLAB: $\displaystyle \ln{\frac{a+1}{b+1}}$, but no idea how to reach it.  I would appreciate some suggestions.


Should I use variance or standard deviation as weights to combine independent measurements?

I've got a set of N independent measurements that I'd like to do a weighted average on to get one, hopefully better, measurement.  I've got a variance measure for each measurement, would it be more appropriate to use the inverse of the variance or the inverse of the standard deviation as my weights?


Who do I mark as giving the correct answer? (Etiquette question)

Given a series of almost identical answers, what is the proposed etiquette on which one to accept? Do I go for the user with the lower rep, or do I award it based on who answered first (of course accuracy comes first)?


run a for loop in a bash script using multiple cores

I have to call a program several times iterating a parameter. I would like to know if it is possible to run the for loop using multiple cores...  for ((par=4; par<=10 ; par++))  do     ./executeprog par  done   my attempt (using 7 cores):  seq 4 10 | parallel -j 7 --workdir $PWD ./executeprog {}


Howto see if form fields are identical in Zend framework

In Zend Framework (1.10) i want to check if two input fields are identical I have the following code in my form:  $this->addElement('password', 'password', array(         'label'      => 'Wachtwoord:',         'required'   => true     ) );  $this->addElement('password', 'verifypassword', array(         'label'      => 'Bevestig wachtwoord:',         'required'   => true,     ) );   I already tryed the "identical" validator, but I did'nt got it to work.


I was informed earlier today that the word ago is actually a postposition and the only one  of its kind in English. Is this correct? If so, why do  not use this classification and prefer to  instead?


Proof Verification : Prove -(-a)=a using only ordered field axioms

I need to prove for all real numbers $a$, $-(-a) = a$ using only the following axioms:     Thanks to many members of the Mathematics Stackexchange Community, I have the following proof worked out:  Theorem: The Additive Inverse Identity is Unique  $ ( \forall a,b,c \in \mathbb{R} )(a+b=0) \land (a+c=0) \\ ( \forall a,b,c \in \mathbb{R} )(a+b=a+c) \\ ( \forall a,b,c \in \mathbb{R} )(b=c) \\ \text{QED} \\ $  Theorem $\textbf{a} \cdot \textbf{0 = 0}$  $ \begin{align} a \cdot 0 &= a \cdot 0 \\ a \cdot (0 + 0) &= a \cdot 0 \\ a \cdot 0 + a \cdot 0 &= a \cdot 0 \\ a \cdot 0 + a \cdot 0 + (-a) \cdot 0 &= a \cdot 0 + (-a) \cdot 0 \\ a \cdot 0 &= 0 \\ &\text{QED} \\ \end{align} $  Theorem: $-\textbf{1} \cdot \textbf{(a) = (}-\textbf{a)}$  $ \begin{align} a \cdot 0 &= 0 \\ a \cdot \left[ 1 + (-1) \right] &= a + (-a) \\ 1 \cdot a + (-1) \cdot a &= a + (-a) \\ -1 \cdot (a) &= (-a) \\ &\text{QED} \\ \end{align} $  Theorem: $-\textbf{(}-\textbf{a) = a}$  $ \begin{align} 0 &= 0 \\ -a \cdot 0 &= 0 \\ -a \cdot \left[ 1 + (-1) \right] &= 0 \\ -a \cdot 1 + -a \cdot (-1) &= 0 \\ -a + \left[ -(-a) \right] &= 0 \\ -(-a) &= a \\ \text{QED} \\ \end{align} $  Does everything look alright? Have I missed anything?  Also--why is it necessary to show that the additive inverse is unique?  Many thanks in advance.


Closed form of $\sum_{i=0}^n ia^i$ derivation

says it's   $$\sum_{k=1}^n kz^k = z\frac{1-(n+1)z^n+nz^{n+1}+1}{(1-z)^2}$$  When I tried it on my own I only got as far as:  $$\sum_{i=0}^n ia^i = \frac{n(a^{n+1}-1)}{a-1}-a^n\sum_{i=0}^n(\frac{i}{a^i})$$  But then I realised that the second term is in fact $\sum_{i=0}^n (\frac{1}{a})^ii$ which is only the original problem with $z = \frac{1}{a}$ so I'm a bit stuck.  I should point out that this is a first year undergraduate maths course for engineering. That being said, I'd appreciate if you could point out what course might teach me how to solve this (or a good book).


What is the purpose of .bashrc and how does it work?

I found the .bashrc file and I want to know the purpose/function of it. Also how and when is it used?


What questions belong on Super User vs Server Fault?

I see a lot of desktop admin questions being migrated to Super User.  Are we positing that enterprise desktop support belongs on Super User?  To me it's just as valuable for Server Fault to have information on things like troubleshooting a  on Windows XP on Server Fault because the troubleshooting steps for a desktop BSoD and a server BSoD are the same.  To me, Super User was put out as the consumer/non-business version of Server Fault.


I'm trying to made a graphical window to add entry to a database in javafx. No problem to display the 'add entry' window, however impossible to add the entry and then refresh my database. I get a NullPointerException on getPers and CreatePerson  I tried a lot of things to initialize these variables without success. How can I do that?  Here is my class 'addPers'  public class addPers {      @FXML     private TextField nameField;      @FXML     private TextField ageField;      @FXML     private Button Cancel;      @FXML     private Button CreatePerson;       private Stage dialogStage;     private Pers pers;      private boolean okClicked = false;     private MainApp mainApp;     private PersManager persManager;     private AnchorPane databaseLayout;     private Object databaseLayoutController;     private Object rootLayout;      @FXML     private void initialize() {     }       public void setDialogStage(Stage dialogStage) {         this.dialogStage = dialogStage;     }      public void setPers(Pers pers) {         this.pers = pers;          nameField.setText(pers.getName());         ageField.setText(Integer.toString(pers.getAge()));      }       @FXML     private void Cancel() {         dialogStage.close();     }      @FXML     public void CreatePerson(ActionEvent event) throws Exception{          // Check Form Validation;         Alert alert = new Alert(AlertType.ERROR);         alert.setTitle("Please input carefully");         alert.setHeaderText(null);          if(nameField.getText().equals("")){             alert.setContentText("no valid name");             alert.showAndWait();         }         else if(ageField.getText().equals("")){             alert.setContentText("no valid age");             alert.showAndWait();         }          else{              getPers();             // Display Dialogue;             alert.setAlertType(AlertType.INFORMATION);;             alert.setContentText("Person entry created successfully");             alert.showAndWait();         }              // Change scene;             Stage stage = (Stage) CreatePerson.getScene().getWindow();             Scene scene = CreatePerson.getScene();             FXMLLoader loader = new FXMLLoader(getClass().getResource("../views/Database.fxml"));             scene.setRoot(loader.load());             stage.setScene(scene);             stage.setTitle("alt database");             stage.show();          }          public ArrayList<Pers> getPers() throws SQLException {             ArrayList<Pers> ListPers = new ArrayList<Pers>();             String query = "name, age FROM PERSONS_DB ORDER BY name;";              try {                 ((MainApp) this.mainApp).getDatabase().connect();                 ResultSet rslt = ((MainApp) this.mainApp).getDatabase().getResultOf(query);                 while (rslt.next()) {                     ListPers.add(new Pers                            (rslt.getString("name"),                             rslt.getInt("age")                             ));                 }                 rslt.close();                 try {                     mainApp.showDatabaseDialog();                   FXMLLoader loader = new FXMLLoader();                   AnchorPane databaseEditDialog = (AnchorPane) loader.load();                  DatabaseEditController controller = loader.getController();                  Stage dialogStage = new Stage();                  dialogStage.setTitle("database");                  dialogStage.initModality(Modality.WINDOW_MODAL);                  Window primaryStage = null;                 dialogStage.initOwner(primaryStage);                  Parent page = null;                 Scene scene = new Scene(page);                  dialogStage.setScene(scene);                  dialogStage.show();               } catch (IOException e) {                  e.printStackTrace();              }         } finally {         }     return ListPers;          }          public void setMainApp(MainApp mainApp) {             this.mainApp = mainApp;          }  }


Am I required to clear the use of class, race, or sub-race found in sources outside of the PHB with my DM?


How can I format my comments? For example, I've pasted a few lines of code (with new lines, spaces etc.) but it looks very ugly.


Referring to adult-age sons and daughters as children

Is it normal to refer to adult-age sons and daughters of someone as children?  A native speaker of Arabic learning English has said that in Arabic, the word for sons and daughters is "أولاد" (awlaad) (), and that it applies no matter how old they are, and that the word for people who are not adults is  "أطفال" (atfaal) (). The person wanted to know whether you can still use "children" to mean "sons and daughters", even after you can no longer describe someone as a child in the "not yet adults" sense.


Show that there is no increasing function $f: \aleph_1 \to \mathbb{R}$

Firstly, I am not sure what $\aleph_1$ is. In my textbook, $\aleph $ is an order isomorphism from the class of ordinal numbers(OR) to the class of infinite cardinals(IC). Therefore $\aleph_0 = \aleph(0)= \omega$. In this context, $\aleph_1$ is the next infinite cardinal, but I cannot derive any more information about $\aleph_1$. I think showing that there is no increasing function $f: \aleph_1 \to \mathbb{R}$ is done by assuming that there is a increasing function $f$ and induce a contradiction, but I'm currently lost.


Can I programmatically login a user without a password?

I'm manually creating users programmatically, and I want to sign in the newly created user. WP makes it easy to access the hashed password, but not the plaintext version. Is there a way to use wp_signon() without the plaintext password?  I found one person who claims to have done this , but it didn't work for me.  THANKS!


How to find the size of a structure which has an array initially

#include<stdio.h> int main() {     struct     {         char all[13];         int foo;     } record;      printf("%d\n",sizeof(record.all));     printf("%d\n",sizeof(record.foo));     printf("%d\n",sizeof(record));     return 0; }   I have tried the above code and the output is:  13 4 20   Would you please explain this to me?


Finding Integral of $y = e^{ax}\sin (bx)$

I was solving questions like $ \int e^{2x} \sin x dx. $ I decided to find the general term for $$\int e^{ax} \sin (bx) $$ which can be directly used in questions like (above).   I hope it helps others :) (Just wanted to share my work. I will appreciate feedback/suggestions or any alternate method available)


What is the best way to add two numbers without using the + operator?

A friend and I are going back and forth with brain-teasers and I have no idea how to solve this one.  My assumption is that it's possible with some bitwise operators, but not sure.


Multialign in math mode for linear equation system

I want to write equation system like this.   I used this code:  \begin{tabular}{rcrcrcr} $k_1$ & $+$ & $2k_2$ & $+$ & $3k_3$ & $=$ & $5$\\ $2k_1$ & $+$ & $9k_2$ & $+$ & $3k_3$ & $=$ & $-1$\\ $k_1$ & $+$ & & & $4k_3$ & $=$& $9$\\ \end{tabular}   Is there any simpler way than to write all math-mode with $...$? I want the space more narrow. Any idea?


Convert string to JSON object and send it as response

I am constructing a string like the following:  List<string> itemList = new List<string>();  foreach (i in items) {  itemList.Add("{ type: " + i.DocumentType + " ,id: " + i.ID + " ,name: " + i.name + " }" ); }   I want to convert the itemList to a JSON object and return it as response in my controller.  Please help.


Python3: Append elements to a nested list

I am trying to do the following:  data=[[1,2,3], [10,11,12]] data[0].append(4) data[1].append(13) print(data) >>> [[1, 2, 3, 4], [10, 11, 12, 13]]   If I initialize my list with the following it works: data=[[],[]] But I want to create my list with a variable size, so I do the following in my code: data1=[[]]*2 The result of print(data), print(data1) and type(data), type(data1) is the same, but the behavior of appending is different:  data1=[[]]*2 data1[0].append(1) print(data1) >>> [[1], [1]]  #expected: [[1],[]]   What am I doing wrong? Or how could I declarate my nested list with an variable size? The length of data[x] is unknown (reading datapoints from a file).  Thanks and greetings Jan


Website logo text - best tag for SEO purposes?

I'm trying to develop a new website in HTML5 adhering to SEO standards where possible and I'm having a little trouble trying to figure out what tag my site name and slogan should live in.  Originally I had my site name in a <h1> tag and my sloagan in a <h2>, but soon realised this wasn't fitting with the "each page is a separate document/article" approach.  The site name is the largest text on the page (sometimes the same as my article heading), but I've currently got the text in a <p> tag with CSS doing all the styling work.  My questions is, what should I do with the site name and slogan? Is the <h1> appropriate, then use another <h1> tag for each page title or should I continue using the styled <p> tag? Or should I convert this into an image and use that for the site name/slogan?  (Side note: on my index page I want the site name and slogan to be <h1> and <h2>respectively as this makes sense with the homepage...)


Any ideas as to how one might go about getting a tour of the ?


Is it possible to keep variable in multiple lines?

Sample file wolf@linux:~$ cat file.txt  Apples Bananas Cherries Dragon Fruit Elderberry wolf@linux:~$   grep s from the file.txt wolf@linux:~$ grep s file.txt  Apples Bananas Cherries wolf@linux:~$   Keep it in var wolf@linux:~$ var=`grep s file.txt` wolf@linux:~$ echo $var  Apples Bananas Cherries wolf@linux:~$   Instead of keeping it in horizontal lines like Apples Bananas Cherries, would it be possible to keep data in variable similar to their original format? Updating the answer and example for future reference  E.g. Without double quote wolf@linux:~$ echo $var Apples Bananas Cherries wolf@linux:~$   With double quote wolf@linux:~$ echo "$var" Apples Bananas Cherries wolf@linux:~$


I have a problem with my file system as I cannot write or edit files in root folders like etc, opt, var etcetera.  I tried using sudo nano /etc/apache2/apache2.conf and after that I used sudo su to become root. But still I could not write.  It says   Error writing /etc/apache2/apache2.conf: Read-only file system


What cd/dvd burning software should I use?

I have tried countless cd/dvd burning software on ubuntu 12.04 and none of them work for me,  any ideas guys?   I've tried tovidgui, bombono dvd,and mestelix, they are all so very confusing is there any program like dvdflick that is just straight to the point?


Does someone know how to indent the text within captionof?  I have a long caption that I want to make two paragraphs out of but indent does not seem to work.  \documentclass{article}  \usepackage{caption} \usepackage[demo]{graphicx}  % make demo figure \makeatletter   \AtBeginDocument{%     \def\Ginclude@graphics#1{%       \begingroup\fboxsep=-\fboxrule       \fbox{\rule{\@ifundefined{Gin@@ewidth}{150pt}{\Gin@@ewidth}}{0pt}%         \rule{0pt}{\@ifundefined{Gin@@eheight}{100pt}{\Gin@@eheight}}}\endgroup}} \makeatother  \begin{document}  \noindent \begin{minipage}[c]{\linewidth} \centering \includegraphics{} \captionof{figure}{\textbf{Title} \newline \indent Paragraph 1 is found here with a lot of text lot of text lot of text lot of text lot of text lot of text \newline \indent Paragraph 2 is found here with a lot of text lot of text lot of text lot of text lot of text lot of text} \label{fig:angio} \end{minipage}  \end{document}


Expected hitting times for simple random walk on a hypercube

Setup In an $n$-dimensional hypercube $C_n = \{0,1\}^n$, we define the Hamming distance of two vertices $d(A,B)$ to be the number of coordinates in which they differ. (e.g. $d((0,0,1), (1,0,1)) = 2$.) A simple random walk on the vertices of $C_n$ has $1/n$ chance of moving to each of the $n$ adjacent vertices. Problem I am trying to find some expected hitting times $t_d$, where A and B are given (fixed) vertices of $C_n$, $d = d(A, B)$, and $$t_d = \mathbb{E}(\text{time to hit B starting from A}).$$ For example, $t_0$ is the expected return time. My attempts Using the inverse of the invariant distribution, we get $$t_0 = 2^n.$$ To find $t_1$, we try to express $t_0$ in another way, by conditioning on the first step: $$t_0 = \underbrace{\frac1n \times (1+t_1) + \ldots + \frac1n \times (1+t_1)}_{n\text{ terms}} $$ $$ \Rightarrow t_1 = 2^n - 1.$$ Similarly, we can find $t_2$. Note that the only outcomes after two steps are i) returning, and ii) being $d = 2$ away from the start. $$t_0 = \frac1n \times 2 + \frac{n-1}n \times (2+t_2) $$ $$\Rightarrow t_2 = \frac{n2^n-2}{n-1}-2 = \frac{n(2^n - 2)}{n-1}.$$ Why do I need help To find $t_3$, I try to do the same trick. However, I suspect I have made a mistake. $$t_0 = \frac1n \times 2 + \frac{n-1}{n}\frac1n \times (3+t_1) + \frac{n-1}{n}\frac{n-1}{n}\times (3+t_3)$$ This gives $t_3 = 8.5$ when $n = 3$ (a cube), contradicting this , which says that $t_3 = 10$ in this case.


How do I install Ubuntu without DVD or USB?

I would like to install Ubuntu on real hardware, but I don't have a suitable USB or DVD. Would the  still work now? I have Windows 10 and want to dual-boot.


Are there any proper uses for Object#finalize() despite being "should not relied on"?

Since 's introduction in JDK 1.0, Java introduced 9 more versions.  Yet, despite its clear , it is still available, even in JDK 10.  Oracle itself states in :     The finalize() Method      The Object class provides a callback method, finalize(), that may be   invoked on an object when it becomes garbage. Object's implementation   of finalize() does nothing—you can override finalize() to do cleanup,   such as freeing resources.      The finalize() method may be called automatically by the system, but   when it is called, or even if it is called, is uncertain. Therefore,   you should not rely on this method to do your cleanup for you. For   example, if you don't close file descriptors in your code after   performing I/O and you expect finalize() to close them for you, you   may run out of file descriptors.   Which begs the question: Are there any known proper uses of this method?


Automotive electronic circuit design, Voltage divider to uC ADC pin

Automotive Circuit requirement:   If input pin is connected to Battery(T87 line), the output of the circuit shall provide a output voltage of 5V to ADC pin of microcontroller, if the input pin is connected to GND, the output of the circuit shall provide a output voltage of 0V to ADC pin of microcontroller and if the input pin is left floating, the output of the circuit shall provide a output voltage of 2.5V to ADC pin of microcontroller.   The battery voltage in load dump condition could be up to 60V, but in normal operation without any fault condition, it would be up to 32V.  Would a simple voltage divider (with a pull-up to 5V) with a blocking diode be enough? Any other ideas? What parameters of the ADC of the microcontroller should be considered? Injection current into the uC- ADC pin would be critical, right? How do I find out the voltage thresholds? Also, what are the parameters of the Schottky diode that I should look to select? The diode would decouple the input pin from the centre tap of the voltage divider, because in case the input pin is connected to battery, the injection current into the uC ADC pin would be too high.  I have used a switching diode, since it was already available in the Bill of Materials.


Inbound & outbound emails marked as phishing

We look after multiple Office 365 tenants for hosted Exchange email.  One tenant in particular has an issue where a lot of inbound and outbound emails are marked as phishing.    The domain passes all DNS checks under the Admin console, and I can't find the domain on any blacklist checks.  SPF: v=spf1 include:spf.protection.outlook.com -all  I investigated enabling DKIM, however unfortunately the domain registrar does not accept underscores in CNAME records.  Can someone please help? The issue is very frustrating for our client.  Thanks!


How do I check the version of Ubuntu I am running?

How can I check my current Ubuntu version through the command-line and GUI?


Using regression to prove that X is a necessary / condition condition for Y

I have been thinking about how to use regression to prove whether X factor is a necessary or a sufficient condition for Y. I am employing these terms in the traditionally logical sense, i.e.   If no X, then no Y --> X is necessary for Y If X, then Y --> X is sufficient for Y   The reason I'm asking is because in social sciences theories we talk about necessary and sufficient conditions all the times (e.g., "(If) No bourgeoisie, (then) no democracy"). At the same time, the most prevalent tool is regression, yet it seems ill-fitted to investigate necessary / sufficient causes.  Indeed, rarely do we talk about necessity and sufficiency in the context of regression. The usual interpretation is that X "causes" Y in an additive sense -- i.e. a certain change in X is associated / caused a certain change in Y.  So, is it possible to interpret regression results as evidence of necessity versus sufficiency? In contrast, a simple 2-by-2 table of X and Y would make the necessity / sufficiency relationship very clear.  P/S: the motivation needs not be restricted to social sciences. For example, if I have a dataset with DV as "Fire occurring", and IVs as presence of fuel, presence of match, presence of lightning, etc. Can we use regression to prove that fuel is necessary but insufficient for fire?


Issues with dependencies when installing Geary

I've just done a fresh install of Ubuntu Gnome 13.10 and I'm trying to install Geary after adding the Yorba ppa. I'm getting the following returned every time with sudo apt-get install geary :  [sudo] password for tim:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies:  geary : Depends: libwebkitgtk-3.0-0 (< 2.1.0) but 2.2.1-2ubuntu1~ubuntu14.04.1~ppa0 is to be installed E: Unable to correct problems, you have held broken packages.   Can anyone help with this? I've tried many, many different things based on what I've read in different forums and nothing seems to be working.   Any help is appreciated. Thanks.


How can I remove system apps / stock apps?

Possible Duplicate:           There are alot of stock android apps on my phone like Email, News and Weather etc. that I dont use. I really need the space because my phone is running low on memory so I am wondering if there is a way to uninstall them because I dont see that option in the Manage apps section.


Is there any way to view Chrome browser notifications history?

I get Chrome notifications from several websites and they work when I don't even have any tabs open for those sites.  But sometimes I get these Chrome notifications when I am not at my desk or looking at my laptop.  As some of these notifications are useful to me, I would like to be able to access any that I have missed.  Is there a way to view the notification history?


How can I level quickly in Skryim to the point that I can get a daedric sword?

I just really want to know if there's a fast way to level as I really want a daedric sword.    Note that I don't have Dawngaurd but I do have Hearthfire and Dragonborn.


Are Hilbert primes also Hilbert irreducible ? Furthermore, are Hilbert primes also primes in $\mathbb{ Z}$?

Consider the set $\mathcal H$ of Hilbert numbers (numbers of the form $4n + 1$, for $n \ge 0$). Define a Hilbert prime as any number $h$ in the Hilbert set satisfying $h \neq 1$ and if $h \mid ab$ where $a \in \mathcal H$, $b\in \mathcal H$ then $h \mid a$ or $h \mid b$. Define a member of the Hilbert set $q$ as Hilbert irreducible as if and only if $q \neq 1$ and $q$ cannot be expressed as the product of two smaller Hilbert numbers.   I am trying to determine if Hilbert prime implies Hilbert irreducible, however I am not particularly strong at number theory. I have been unsuccessful in finding a counterexample, and I am starting to believe the implication holds. The textbook I pulled this example from for self study (Rings, Fields, and Groups: An Introduction to Abstract Algebra by Reg Allenby) has answers in the back of the text. However, the solution only says that Hilbert primes are also primes in $\mathbb{Z}$. Any help would be greatly appreciated, I can't see to find any proof regarding this concept anywhere!


.hi im super noob with Blender. I modelled a simple character and when I render this character the body mesh shows up all right, but the eyes are completely blacked out instead of white with small black pupils.___=====+++++ I did search around for a few days straight and feels like im just going in circles. I went through the outliner, im really pretty useless with the node window but I did open that as well and look around. tried some other parenting tricks I thought might help, no dice.however, to make the eyes appear I went through object view, went to the modifiers tab and closed the targets for the eyes, this would make the eyeballs appear in the render but they didnt really follow the armature at all, so thats not what I want.  any suggestions I would definitely appreciate it. heres the most recent version or .blend file *^&&&7&997^&&(^(^&^&&^^&(^(&(&&^^&9


php /var/www/html/*.php is not working in terminal which is open from Menu php *.php is working in terminal which is open inside php holding folder

I want to run a PHP script from cron. I setup cron with:  */1 * * * * php  /var/www/html/cron/cron_job.php   And I can see it in crontab -u root -l, but the job is not executed. It also doesn't work when I run the command directly from the command line like this:  <?php  /var/www/html/cron/cron_job.php   I tried many answers related to cron but nothing worked. For example:  /usr/local/bin /var/www/html/cron/cron_job.php /usr/local/bin/php /var/www/html/cron/cron_job.php sudo php -f /var/www/html/cron/cron_job.php   The testing php script (cron_job.php) is:  php file_put_contents  ('test.txt',"test content\n",FILE_APPEND);     File permissions are all OK and it is working when run in the browser or when opening a terminal in /var/www/html/cron/ and running php cron_job.php.  As requested in the comments, if I append 2> /tmp/php.log to php /var/www/html/cron/cron_job.php use  a script with a syntax error and try to run (php /var/www/html/cron/cron_job.php 2> /tmp/php.log) from menu terminal, then the error log gets the error message.


Disable studio/publisher credits during startup

The latest Civ5 patch has added three short but annoying movies displaying the logo of the publishers. Is there a way to disable these so the game loads faster?


How do I disable the touchpad while typing?

It's impossible to write this way, text gets deleted, windows change, random tabs open. I've tried every solution I came across but none actually solve it (some don't even work)  I've tried installing touchpad indicator, I've tried adding a syndaemon option from startup application, I tried the same but from the terminal, nothing works.  I Just want to disable the touchpad completely while typing, no scrolling, no moving the cursor, nothing.


I have an Excel table with two columns: id and picture. id is a string and picture contains a single jpeg picture. This table contains almost 1,000 rows.    Is it possible to export the images as jpeg files to the hard disc using the id as file name?


Is there a good reason not to pick $U(3)$ as the colour group? Is there any experiment or intrinsic reason that would ruled out $U(3)$ as colour group instead?


How do you write a case insensitive query for both MySQL and Postgres?

I'm running a MySQL database locally for development, but deploying to Heroku which uses Postgres. Heroku handles almost everything, but my case-insensitive Like statements become case sensitive. I could use iLike statements, but my local MySQL database can't handle that.  What is the best way to write a case insensitive query that is compatible with both MySQL and Postgres? Or do I need to write separate Like and iLike statements depending on the DB my app is talking to?


I have two files:  file1:  905894 1197693 3703749   file2:  905894   Test1 1197693   Test2 3703749  Test3   I want to get the values in the second column if elements in file 1 column 1 matches any of the words in file 2 column 1.  I know awk can do it, but stuck in reading file 1 and using a loop.


Downgrading from SQL Server 2008 to 2005

Database files that are built using SQL 2008 are not compatable with 2005. Is there a work around?


I feel like a real dummy but I need some help.  I have a recipe that is calling for 8 oz of semi sweet chocolate finely chopped.  I'm thinking that means a semi sweet chocolate  bar chopped up.  I read where a lady said each square is an ounce of chocolate but on the box it says there is 4 ounces  but I bought the box and when I got it home and opened it, there are 8 squares in it.  Why does the box say 4 ounces if each square is an ounce and there are 8 squares?


I am using ubercart guest checkout module. I am able to submit  the order as guest etc works fine.   After Reviewing the order and submitting it throws me this error   Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /var/www/html/dev.demo.net/sites/all/modules/ubercart_guest_checkout/uc_guest_checkout.module on line 263 and defined in db_query() (line 2342 of /var/www/html/dev.demo.net/includes/database/database.inc).   This is the query which is causing that issue    db_query('UPDATE {users} SET name = "%s", mail = "%s" WHERE uid = %d', $name, $mail, $account->uid);   I tried to change this query like this  db_update('users') ->fields(array(     'name' => $name,     'mail' => $mail )) ->condition('uid',$account->uid,'=')        ->execute();   still no luck, it throws me same above specified error.    How can i resolve the query of above one in order to avoid the error. Any suggestions w.r.t query will be nice.Thanks in advance.


Solar activity and radioactive decay rates

I recall hearing about this quite some time ago and thought it was very strange.  I recently had it pop in my head again and was curious if anyone knew what was going on with this.    Why would activity on/in the sun cause changes in radioactive decay rates?   Presumably the only known thing that might induce a change are neutrinos but as far as im aware there is no mechanism for this?  Does anyone have an answer or an inkling as to the physics behind this phenomenon?


Heisenberg uncertainty principle: a proof for a beginner

Scrolling in a book on real analysis I found, as a last exercise, the request to prove the Heisenberg uncertainty principle. The exercise states      Let $f\in \mathcal L_{1}^{2}(\mathbb R)$, such that $\|f\|_{2}=\|\hat f\|_{2}=1$. Prove that $$\left(\int_{\mathbb R}|x|^{2}|f(x)|^{2}\,\mathrm dx\right)\cdot\left(\int_{\mathbb R}|\xi|^{2}|\hat f(\xi)|^{2}\,\mathrm d\xi\right)\geq \frac{1}{(4\pi)^{2}}$$       Hint: suppose that $f\in C_{c}^{\infty}$ and use the following identities: $$\int_{\mathbb R}x\overline{f}(x)f'(x) = -{1\over 2} \|f\|_{2}^{s}$$ Plancherel's identity and Cauchy-Schwarz inequality.   The book states that $$\mathcal L^2_s(\mathbb R^d) := \{f:\mathbb R^d\rightarrow\mathbb C \text{ measurable} \text{ : }(1+|x|^2)^{s\over 2}f\in L^2(\mathbb R^d)\}$$ which calles it weighted $L^2$ spaces.   I was very curious on how to solve this problem because I don't have nearly as much knowledge as it's needed to solve this! So I'm here to ask you if you could give me the solution.   I can't give you my working because, as just stated, I don't know much about real analysis and I was just very curious to see the solution! Probably I'll understand it if I see one but searching on the internet didn't gave me any help.


Why kinetic friction does not depend on speed?

I was studying friction and got that  is directly proportional to the normal reaction and hence:    $\text{Force of kinetic friction=coefficient of kinetic friction $\times$ normal reaction}$.    I don't see speed anywhere. If kinetic friction has no relation with speed then why fast running racing car's tyre abrade too early than normal cars??


How to find inverse function of $x+sinx$. (In this type of questions we equate this function with y and then find $x$ in terms of $y$. How to solve this?)


Farmer; AC 7; Level 0; hp 6; #AT 1; D 2-8; XP 16  i am a new player and cannot understand what these mean. Can someone explain to me? I am trying to play The Temple of Elemental evil


Model and materials turn black after I reopen the project

When I reopen my saved project file, my model and materials turn black. This happens all the time when I open the project. All the texture paintings were saved and displayed as painted. Could you please help me? P.S. I have the newest version of blender, so all the actions were done in one particular version.


How does the Heartbleed security vulnerability affect my Android device?

The "" vulnerability in particular versions of OpenSSL is a serious security issue which allows malicious servers or clients to undetectably obtain unauthorized data from the other end of an SSL/TLS connection.  My Android device has a copy of OpenSSL installed in /system/lib. Its version number is 1.0.1c, which appears to make it vulnerable to this attack.  shell@vanquish:/ $ grep ^OpenSSL\  /system/lib/libssl.so                        OpenSSL 1.0.1c 10 May 2012    How does this affect me? Do Android apps use OpenSSL? If not, why is it there? Can I expect a firmware update from my carrier? If I root my phone, can I update it myself?


NullPointerException when calling a method from another class

I have initialized all my classes correctly although not shown in the code. I have tested if the source of the error was in my textfield but it wasn't. the "s" in the MainForm class is the initialization of the Sqlstatement class. There is one error here which is shown in the code below  my new_user class  public new_user() {     initComponents();      try{          mf = new MainForm();      }catch(Exception e){         e.printStackTrace();     } }private void save_user_btnActionPerformed(java.awt.event.ActionEvent evt) {                                                    try{         user = uname_input_txt.getText();         pass = pass_input_txt.getText();          //ERROR HERE         if(mf.search_for_dupe_user(user) == true){             JOptionPane.showMessageDialog(null, "Username not available");         }else{             mf.new_user(user, pass);             JOptionPane.showMessageDialog(null, "New user added.");             this.dispose();         }     }catch(Exception e){         JOptionPane.showMessageDialog(null, e.getMessage());         e.printStackTrace();     } }   There is one here too which is shown in the code.  my main_form class  public void new_user(String user, String pass)throws SQLException{     try{         s.new_user(user, pass);     }catch(Exception e){         e.printStackTrace();     } }  public boolean search_for_dupe_user(String user)throws SQLException{     boolean result = false;     try{          //ERROR HERE         if(s.search_for_dupe_user(user) == true){             result = true;         }else{             result = false;         }    }catch(Exception e){        e.printStackTrace();    }     return result; }   my sqlstatement class  public void new_user(String user, String pass)throws SQLException{     try{         stmt = conn.prepareStatement("insert into users (user_num, username, password) values(null,'"+user+"','"+pass+"')");         stmt.execute();     }catch(Exception e){         e.printStackTrace();     } }  public boolean search_for_dupe_user(String user)throws SQLException{     boolean result= false;     ResultSet rs = null;    try{         rs = statement.executeQuery("select username from users where username='"+user+"'");          if(rs.next())         {            result = true;         }          else         {            result = false;         }    }catch(Exception e){        e.printStackTrace();    }     return result; }   my stacktrace     java.lang.NullPointerException       at MainForm.search_for_dupe_user(MainForm.java:3151)       at new_user.save_user_btnActionPerformed(new_user.java:129)


Assign array of two elements to two variables

How can I assign array of two elements to two variables?  Here is example of my idea (no valid code):  getTwoValues() {     int a = 7;     int b = 5;     return {a, b}; }  int x, y = getTwoValues();  // Expected output: x = 7, y = 5


When describing an action by two persons is it ever correct to name oneself first?

When describing an action by two persons and that action has a negative outcome or nature, is it correct to name oneself first?  As in I and he played poorly.


I'm hoping to add a tikz-specific language environment to my LaTeX editor (vscode), I've run into a bit of an issue looking for any speicifications for tikz grammar though.  Would anybody know of any pre-existing tikz language grammars, or useful information? I don't feel I know enough to just work it out.  To clairfy I'm not looking for robust syntax error detection as in . The end goal here is syntax highlighting and autocompletion.  Thanks,  tecosaur.


Python3.7 Convert comma delimited datetime

I am reading a date column in a postgresql DB. I would like to convert it from below reading into YYYY-MM-DD (this is how it is entered into the DB originally). What is the best approach to do this?  Code:  dataReading = cursor.fetchall() print(dataReading[1])   Output:  (datetime.date(2016, 1, 5),)


Metric space $X=(0,1)$ with $d(x,y):= \vert \tan x-\tan y \vert$ complete or not?

Let $X=(0,1)$ be a metric space with metric defined as $d(x,y):= \vert \tan x-\tan y \vert$ for all $x,y \in (0,1)$. The question is whether $X$ is complete with respect to the given metric or not. The answer is given to be "Yes", but I think the sequence $x_{n}=\frac{1}{n}$ serves as a counterexample. Can anyone tell me whether I am correct or not?


"Now is the time" followed by past tense verb

This morning I heard Jeremy Corbyn's speech at the Labour Conference.  Here is a section of that speech.  Can anyone tell me what tense he is using and why?  "Now is the time that government took a more active role in restructuring our economy. Now is the time that corporate boardrooms were held accountable for their actions,  And now is the time that we developed a new model of economic management to replace the failed dogmas of neo-liberalism …"  Is this a Britishism?  (I am American.)  Thanking your all in advance for any insights you can offer.


The closure of $(a;b)$ in an order topology

Consider a linearly ordered set $(X; \prec)$ with its order topology.   Show that closure of $(a;b)$ is a subset of $[a;b]$. Under what conditions does equality hold? Give an example of a strict inclusion.   I  solves part 1:  $$[a,b]=X \setminus((−\infty,a)∪(b,+\infty))$$ is closed and contains $(a,b)$ , so it contains the closure of $(a,b)$.  Furthermore, it equals the closure iff both endpoints are limit points of the interval.  But I cannot find example for strict inclusion.


why is it necessary to differentiate between character and block devices?

I have been trying to read the source code for linux. I started watching a Youtube video which mentioned that character and block devices are different. It didn't say much about why it matters because once something is on the filesystem its the same.


Can someone explain what "common-mode" noise is, and how it can be problematic?  I understand "noise" on a signal in general.  If I have a "noisy" +5V rail on a circuit board, I'm not going to be getting a constant value of +5, it will be bouncing around above and below that nominal value... ... but still relative to circuit COM.  My very vague understanding of "common-mode" noise is that it is where both sides are varying equally together.  (This is where my understanding breaks down)  That is, the pair is bouncing around with respect to ... ... to what?  Earth ground?


Ubuntu 18.04 repeated "Anthentification required by Wireless network"?

So I just installed Ubuntu 18.04 desktop alongside Windows 10.  But despite the fact that the password I typed is correct, I still get prompted by this message.  $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 0bda:b009 Realtek Semiconductor Corp.  Bus 001 Device 002: ID 05c8:03ab Cheng Uei Precision Industry Co., Ltd (Foxlink)  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  $ iwconfig lo        no wireless extensions.  wlo1      IEEE 802.11  ESSID:off/any             Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off  eno1      no wireless extensions.  $ lspci -knn | grep Net -A3; rfkill list 02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723]     Subsystem: Hewlett-Packard Company Device [103c:8319]     Kernel driver in use: rtl8723de     Kernel modules: rtl8723de 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no


What does the number near a comment mean?

Sorry but I'm a new user and I couldn't find anything about this here. Can anybody tell me what does it mean.  Here I don't see any arrow:


Counter Example for the union of any number of compact sets is compact in T2-spaces

We know that, the intersection of arbitrary many compact sets is compact in Hausdorff Spaces.  I need counter example analogous of above proposition for the union is not true. When I consider, logically it does not have to be compact but I cannot find a counter example in one way or another. Could someone give a counter example please? Thanks


How to subtract const from the file in awk?

How can I sub 1 from each element from my txt file. I had actually tried similar to  question but was not successes full.   Suppose I have file in the following format  2,4,5 1,2,3 14,12,1   Now I want the file to be  // basically subtract 1 from all  1,3,4 0,1,2   13,11,0   What I have tried so far is   $awk '{if(getline != 0){           for(i = 0; i <=NF; i++){               $(i)=$(i)-1;           }        } print;}}'   I was trying to read till end of file and sub 1 from each element, but when I do this I just -1


Is it really wrong to say "I'm hearing"?

Many grammar books claim that ‘see’, ‘hear’, ‘taste’, ‘smell’, ‘feel’ are verbs that aren’t used in continuous forms, and yet, we do hear and see it quite often used by native speakers. For instance, read the title of this article:   The average complainer tells nine or more others about his unhappy experience. So successfully resolving a complaint is not only likely to generate increased business from the complainer, but also to restore nine or more potentially lost opportunities with other customers or prospects. The point is, if you're not hearing any complaints this might be a reason to worry, rather than to congratulate yourself.  I myself would say "I'm hearing more and more people pronounce this word this way" just as much as I would say "I hear more and more people..." Your thoughts, native speakers? Does using the continuous form of this verb feel odd to you?


I have some properties which I do not understand how to form a proof for. Most of them are by induction, which is not my strong point Any help would be fantastic.   Looking at the chromatic polynomial $$P_G(k)=P_{G-e}(k) - P_{G/e}(k)$$  Properties   1.If G has n  vertices then $ P_g(k)$ has degree n and the coefficient of $k^n $ is 1   The signs of $P_g(k) $ alternate If G has q components the smalles non-zero term of $P_g(k)$ is the term in $k^q$


Where is the appropriate place to ask a question about career development?

I could really use some advice on my current employment situation (web developer) and whether it is helpful or harmful for me at this point. I'm not sure where I should ask such a question.


Solve for $\theta$: $a = b\tan\theta - \frac{c}{\cos\theta}$

This question was initially posted on SO ().  I'm not sure the answer given there was correct.  I cannot get the results from those expressions to match my CAD model.  The title pretty much sums it up. How do I solve for theta given the following equation.  $$a = b\tan\theta - \frac{c}{\cos\theta}$$  I am not a student and this is not homework. It's been quite a while since I've done any significant trig and I'm out of time to figure this out.


I am trying to formally evaluate the following limit: $$\lim \limits_{x \rightarrow \infty} \sqrt[]{x^2+2x+3}-\sqrt[]{x^2-x+5}.$$ Empirically, the limit seems to be converging to $1.5$, although I am not sure how to formally prove this.  I had one idea thus far: it appears the constant terms within the square roots do not matter, so I rewrote the limit as $$\lim \limits_{x \rightarrow \infty} \sqrt[]{x^2+2x-3}-\sqrt[]{x^2-x-6} =\lim \limits_{x \rightarrow \infty} \sqrt[]{(x+3)(x-1)}-\sqrt[]{(x+2)(x-3)}.$$  In each square root, there are two factors.  I assumed that in the limit the geometric mean of the two factors (i.e. square root of the product) is equal to their arithmetic mean.  This is a step I am not quite certain of, and if it is true I would like to prove it. However, as I found it led to the correct answer, since $$\lim \limits_{x \rightarrow \infty} \frac{(x+3)+(x-1)}{2}-\frac{(x+2)+(x-3)}{2}=\lim \limits_{x \rightarrow \infty} (x+1)-(x-0.5)=1.5.$$  I am not sure if the result was coincidental, but if not, I would like some help formalizing each of my steps.  I would also like to hear of alternate approaches that do not alter the original problem in the way I did.


Is there any way to specify a suggested filename when using data: URI?

If for example you follow the link:  data:application/octet-stream;base64,SGVsbG8=  The browser will prompt you to download a file consisting of the data held as base64 in the hyperlink itself.  Is there any way of suggesting a default name in the markup?  If not, is there a JavaScript solution?


Garbage Collection works automatically or manually?

I want to ask if garbage collector automatically deletes unused objects in a Java program or it should be manually done by assigning an object to null?


I have temp file with some lower-case and upper-case contents.  Input  Contents of my temp file:  hi Jigar GANDHI jiga   I want to convert all upper to lower.  Command  I tried the following command:  sed -e "s/[A-Z]/[a-z]/g" temp   but got wrong output.  Output  I want it as:  hi jigar gandhi jiga   What needs to be in the substitute part of argument for sed?


Array inside an equation: open bracket in a line and close in another line

This code:  \documentclass[12pt]{article} \begin{document}  \begin{equation}\label{eq:test} \begin{array}{l} \left[ \displaystyle \frac{e^{ix}}{2} = \\ = \sin (x) + \cos (x) \right] \end{array} \end{equation}  \end{document}   generates an error:  Missing \right. inserted. \left[ \displaystyle \frac{e^{ix}}{2} = \\ Extra \right. = \sin (x) + \cos (x) \right]   If I modify it as  \documentclass[12pt]{article} \begin{document}  \begin{equation}\label{eq:test} \begin{array}{l} \left[ \displaystyle \frac{e^{ix}}{2} = \right. \\ = \left. \sin (x) + \cos (x) \right] \end{array} \end{equation}  \end{document}     it can be built, but the closing square bracket \right] appears smaller than the opening \left[. I would like to have them instead of the same dimensions (as \left[).  Is it possible? How?


I have the following Python script:  query_parser.py  #!/usr/bin/env python   def count_resources_per_category(resource_names):     APPS_MAP = {         'billing': ["paypal", "checkout", "cart", "order-service"],         'browse': ["content", "localization", "pricing", "search",],         'some_category': ["random-1", "random-2"],     }     results_map = {}     for key, _ in APPS_MAP.items():         results_map[key] = 0     results_map['other'] = 0     # now we have:     #   results_map = {     #     'checkout': 0,     #     'browse': 0,     #     'MCM': 0,     #     'other': 0     #   }     for resource_name in resource_names:         FOUND_IT = False         for key, app_names in APPS_MAP.items():             if FOUND_IT:                 break             for app_name in app_names:                 if app_name in resource_name:                     results_map[key] += 1                     FOUND_IT = True                     break         if not FOUND_IT:             results_map['other'] += 1      return results_map   def determine_if_resource_count_issue(results_map):     RESULT_FOUND = False     for key, count in results_map.items():         if count:             if RESULT_FOUND:                 print("The script isn't gonna work as planned")                 return True             RESULT_FOUND = True     print("All good :)")     return False   #--------------------------------------------------------------------  """ TESTS """  # test_count_resources_per_category(): test_input = [     'some-prefix-pricing', # browse     'some-prefix2-cart', # billing     'content', # browse     'some-random-thing-not-found' # other ] expectation = {     'browse': 2,     'billing': 1,     'some_category': 0,     'other': 1 } result = count_resources_per_category(test_input) assert result == expectation  #--------------------------------------------------------------------  # test_determine_resource_count_issue_passes(): test_input = {     'browse': 234234234,     'billing': 0,     'some_category': 0,     'other': 0 } assert False == determine_if_resource_count_issue(test_input)  #--------------------------------------------------------------------  # test_determine_resource_count_issue_fails(): test_input = {     'browse': 2,     'billing': 1,     'some_category': 0,     'other': 1 } assert True == determine_if_resource_count_issue(test_input)  #--------------------------------------------------------------------   I was wondering what the clean, pythonish way to handle these nested loops would be without the FOUND_IT and RESULT_FOUND flags.


Let there be a matrix    $$A_n=\left(\begin{matrix}4&2&\cdots&2\\2&4&\ddots&\vdots\\\vdots&\ddots&\ddots&2 \\2&\cdots&2&4\end{matrix}\right)\in M_n\left(\mathbb{Z}_7\right)$$      What is the general formula of $\det\left(A_n\right)$?   decomposition of the matrix to a sum will not help, any suggestions?


Why can't the Doctor sense the other Timelords?

So at some point in the new Doctor Who, The Doctor mentions that he would be able to sense whether or not there were any other Timelords across time and space. However, throughout the series, he doesn't sense any of these Timelords and part-Timelords:      The Master, Jenny, River Song, The Doctor-Donna, Rassilon and his council, etc.   Is there any reason for this besides "timey-wimey" or "Doctor Who has no canon"?  Also, can anyone give me the episode name and the exact quote?


How to determine what type and gauge of wire should used for underground wiring to a detached subpanel?

I Will be installing a subpanel in a detached garage. The subpanel will be 60 amp. The garage is about 30' from the main-panel in-house, and I will of course get an exact length before selecting the proper gauge wiring. I'll be using pvc underground for the wiring. There is already existing wiring going underground from the house to the garage, which will no longer be used.  I trying to determine what gauge and type of wiring I need. I'm not sure if this is a duplicate of  question or not, but I'm looking for information what gauge wiring I need. The chart linked to in one answer suggests looking at ambient temp ratings. I'm slightly out of my element there as all of the amp/gauge charts I've looked at in the past only considered length of conductor, because when length increases so does resistance, which means there's a drop in voltage. Since that was for DC circuits mostly I have to ask why is AC different?   I suppose I'm mainly asking how to figure this information out and not just gimmie the information. Teach someone to fish, so to speak.  From researching it appears I should use individual THWN conductors, or an x-x-x-x cable, x being the gauge, I don't know the benefits or drawbacks to either one. Same goes for copper and aluminum.