The display of my Xperia z3 is non-functioning(i.e. all I can see is a black screen) after an accidental damage due to water-insertion. But all other parts are working fine. The screen responses to touch, I can hear the touch sounds and I can click photographs as well with the camera key.  After connecting the phone with USB cable to my ubuntu laptop, I can browse through the internal storage files on the phone and locate the newly created image files as I click new photographs and take screen-shots. But I can't open any files(images/audio/videos) with errors like "couldn't load image" and "couldn't determine type of stream". However, I'm able to copy new files to the internal storage.  I want to install some screencasting application like vysor on my phone so that I can access it using my laptop. I know this can be done using adb commands but the problem here is that USB debugging is not enabled on my phone and hence I can't find it on the list of adb devices.  Is there any workaround for such situation?

The screen of my phone is physically broken, so it doesn't display anything, but the touch aspect does seem to be working, as I can unlock my phone, and get haptic feedback.  Before I go to get it replaced, I'd like to back up some personal data from the built-in memory to the SD card. I'm fairly certain that if I can get adb to recognize the device, then I can use  to see where I am touching the screen and do what I need to do. Problem is, when I plug it in, it's not recognized, while my emulator is.  I suspect that I might not have USB debugging enabled, which I think is necessary for adb to work. If this is the case, can someone give me screenshots of their Droid X (running 2.3.X) going from the home screen, through all the menus, to activating debug mode? Hopefully I can do it by dead reckoning and adb from there.  Edit: I haven't changed anything about the ROM or launcher; it's all stock.


Whenever I shut down my Ubuntu 20.04 and reboot, I always get this message at the bottom of my screen: Press Ctrl+C to cancel all filesystem checks in progress   This process will take too long and press Ctrl+C does not have any effect. How to bypass it?

What I want to achieve:  I want to customize my complete boot of my Ubuntu 16.04 LTS installation  to show the same wallpaper which is actually on my desktop.  What I achieved till now:   added the wallpaper to the grub menu by adding the following lines to /etc/deault/grub and doing an update-grub afterwards.  export GRUB_MENU_PICTURE="/boot/grub/wallpaper.png" export GRUB_COLOR_NORMAL="white/black" export GRUB_COLOR_HIGHLIGHT="black/white"  added the wallpaper to the splash-screen and login screen   Problem:  When I boot up the picture is showing while in grub, but then I rarely see the splash screen, instead I get an almost blank screen showing the file-system check like following:  /dev/sda1: clean, 201776/60878736 files, 4991277/243040256 blocks   This prevents me from having the boot experience I want to achieve since after that the splash-screen just shortly popping up after that message.  Question:  How can I remove this message from showing up so I get a seamless booting with my beloved wallpaper, without switching the file-system check completely off (if possible)?


I have the following recurrence relation $$T(n) = T(n-1) + T(n/2) + n .$$ I know that I cannot use Master's theorem here and by intuition I can see the relation will be of order $O(n^2)$.  But how to solve it, I have tried iterative method which was futile. Please help.

Using the recursion tree i tried solving this: $T(n)=T(n-1)+T(\frac{n}{2})+n$; the tree has two parts (branches) one that of $T(n-1)$ and other branch is of $T(\frac{n}{2})$. But as the term T(n-1) reach higher depth, I solved that part of the tree. Finally it resulted in O$(2^n)$ is it correct or is it $O(n^2)$? How can we solve it by substitution method?


I am trying to create a java class to implement wheighted graphs. But I get the NullPointerException error in nodes.add(a) of the constructor.  public class WGraph { public ArrayList<Node> nodes;  public WGraph(int n) {     int i;     for(i=0; i<=n; i++) {         Node a = new Node(i);         nodes.add(a);     }  }   The class Node and in particular the Node(int key) constructor are defined as follows:  public class Node { public int key; public ArrayList<Edges> connections;   public Node(int key) {     this.key=key;     this.connections = new ArrayList<Edges>();   When I run   WGraph o = new WGraph(3);   System.out.println(o);   I get the NullPointerException error and I have no ideia why.

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


I just saw this on the /tools/suggested-edits page:    But, I didn't approve that edit:    Please only show my name if I approved it.  This review is from the .

In the 10 k tools,  is described as if I had approved it:    However, the review item itself (correctly) displays that I rejected this edit:    Going by   , this should be fixed, but it isn’t.  This could be solved by replacing approved by to reviewed by in the list or making an explicit list, who approved and rejected an edit (which is probably more complicated).


I have a windows 8.1 new machine with arabic language pack, but I still see some areas still using English as language, i.e. control panel, store, search, help notes. Other apps are displayed in arabic.   mention that arabic can have any language as base language, and the license is I have is 8.1 Single Language. Does base language mean I can set arabic as base language ? or it seems I must still have unicode (i.e english) as base language ?

I followed the instructions in this  question  but now windows won't start properly, the screen is on but it's just black and I can see the cursor if I move it but I can't do anything else.


How to explain the situation that heteroskedasticity disappear as the sample size grows larger? is there any evidence shows that the existence of heteroskedasticity has something to do with the sample size?

Can a small sample be cause of heteroscedascity? My guess is that it doesn't depends only on sample size, but also on sample bias or measurement error.


I’m trying to call a function template defined inside a class from within another class, but I’m stuck. I get error:   1>class1.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall class2::output<double,long>(double,long,float)" (??$output@NJ@class2@@QAEXNJM@Z) non risolto nella funzione "public: void __thiscall class1::x(class class2 &)" (?x@class1@@QAEXAAVclass2@@@Z)  1>class1.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall class2::output<float,int>(float,int,float)" (??$output@MH@class2@@QAEXMHM@Z) non risolto nella funzione "public: void __thiscall class1::y(class class2 &)" (?y@class1@@QAEXAAVclass2@@@Z)  1>C:\xxx.exe : fatal error LNK1120: 2 esterni non risolti   If I uncomment lines with duplicate functions (the ones without templates) it is ok. Can you help fix it?  File: “class1.h”  #ifndef CLASS1 #define CLASS1 #include "class2.h" class class1{ public: void x(class2& c ); void y(class2& c ); }; #endif   File: “class1.cpp”  #include "class1.h" void class1::x( class2& c ) { double img; long integ; float y; c.output(img, integ, y); } void class1::y(class2& c ) { float img; int integ; float y; c.output(img, integ, y); }   File: “class2.h”  #ifndef CLASS2 #define CLASS2 class class2{ void output2(double img, long integ, float y); void output2(float img, int integ, float y); public: template <typename T1, typename T2> void output(T1 img, T2 integ, float y); //void output(double img, long integ, float y); //void output(float img, int integ, float y); }; #endif   File: “class2.cpp”  #include "class2.h" template <typename T1, typename T2> void class2::output(T1 img, T2 integ, float y) {output2(img, integ, y);} //void class2::output(double img, long integ, float y) //{output2(img, integ, y);} //void class2::output(float img, int integ, float y) //{ output2(img, integ, y);} void class2::output2(double img, long integ, float y){/*...*/} void class2::output2(float img, int integ, float y){/*...*/}   EDIT  I’m talking about function templates and not class templates. I’ve seen the question I would be duplicating before, but it is not what I’m looking for. I have two functions inside a class that are identical except for their parameters type.  I only wanted a simple trick to avoid writing and maintaining identical code for two functions inside the same class. Anyway I’ve found a solution, adding these two lines at the bottom of class2.cpp:  template void class2::output<double, long>(double img, long integ, float y); template void class2::output<float, int>(float img, int integ, float y);

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


How do you find the equation which is a Taylor series expansion of $$\displaystyle 1+\frac{2}{3^2}+\frac{3}{3^3} + \ldots + \frac{k}{3^k} \ldots$$   I believe the Taylor series expansion : $\displaystyle \frac13+\frac{2}{3^2}+\frac{3}{3^3} + \ldots + \frac{k}{3^k} \ldots$ is the expansion of $\displaystyle \frac{x}{(1-x)^2}$.  Where does the $1$ come from then? How do I find what the original equation is?

I need to find the infinite sum of the following series expansion   $$1/3 + 2/3^2 + 3/3^3 + 4/3^4 + \dots + k/3^k + \dots$$  I know that  $$x/(1 - x) = x + x^2 + x^3 + \dots + x^k + \dots$$   We need to find the $x$ value in order to find the infinite sum. What could the $x$ value be? I am not sure.


I wrote a check and put the amount in the pay to order spot. Can I just mark it out, put the name in the spot and finish writing the check?

I think I know the answer to this, but I'm not sure, and it's a good question, so I'll ask:  What is the accepted/proper way to correct a mistake made on a check?  For instance, I imagine that in any given January, some people accidentally date a check in the previous year.  Is there a way to correct such a mistake, or must a check be voided (and wasted)?  Pointers to definitive information (U.S., Canada, and elsewhere) are helpful.


I am trying to set up a cronjob to execute the following script. The function of the script is to find and compress png and jpg files in a WordPress directory.      #!/bin/bash echo `date` >> /root/optipng.log find /home/ghost/wp-content/uploads -mtime -2 -iname '*.png' -print0 | \  xargs -0 optipng -o7 -log /root/optipng.log -preserve echo `date` >> /root/jpegoptim.log find /home/ghost/wp-content/uploads  -mtime -2 -iname '*.jpg' -print0 | \  xargs -0 jpegoptim --max=90 --preserve --totals >> /root/jpegoptim.log   So I created a file "optimize.sh" in /usr/local directory  and ran "crontab -e" and added the following command:   00 10 * * *  root  /usr/local/optimize.sh   This is supposed to run the image optimization every day at 10:00 hours but it is not working in this case, I even tried to create a log file by modifying the above command as:  00 10 * * *  root  /usr/local/optimize.sh &>/var/log/cron.log   The log file is empty and cron job is not running. I did try the other methods mentioned in Stack Overflow, none of them seemed to work. I am also listing some other tutorials which I turned for help:      Can someone please point out where the mistake is? :)  PS- I gave 700 permission to the file /usr/local/optimize.sh and I tried running the file directly via ssh and it returns the following error:  /bin/bash^M: bad interpreter: No such file or directory   Here is a picture of the exact way the commands are written using nano editor:   This question is different from others in Stack Overflow like  in the sense that the error was not in the way cron file was written, but there were some hidden spaces in the file optimize.sh.

I have a cron job that runs every minute on an Ubuntu 12.04 box  $sudo crontab -e * * * * * mylogin /pathto/file.sh > /log/filelog   If I run file.sh, the bash script does some stuff and echos out runs:  $ ./file.sh  runs   If I check the log of cron tab it shows that the job is running:  Jul 10 12:41:01 localhost CRON[1811]: (root) CMD (mylogin /pathto/file.sh > /log/filelog) Jul 10 12:41:01 localhost CRON[1810]: (CRON) info (No MTA installed, discarding output) Jul 10 12:42:01 localhost CRON[1813]: (root) CMD (mylogin /pathto/file.sh > /log/filelog)   However, the script is not running. It is not doing it's work and not echoing runs to /log/filelog.  $cat /log/filelog  #shows nothing   What other steps can I take to debug this problem?


Recently (~ November 6th), the name of Musical Practice and Performance was changed to Music: Practice & Theory.*  But, on data.stackexchange has not changed yet:    Will it be changed?  *

I've removed the poll style answers in favour of open discussion.  I realise now this isn't the best way to have a proper discussion about this issue - sorry to anyone who commented/voted.    This is mostly a followup on this question:    As I've answered, the reason this is happening is that the root database (in the production Stack Exchange database server) is still called StackExchange.Programmers - a database name that propagates to SEDE and through it to the data dump.  The question here is what to do about it - the current situation is somewhat broken for users of the data dump.  These are the options we have:   Do nothing Update the root database name (requires downtime - so very undesirable) Update the update scripts so the SEDE database name is the new name, change will flow to the data dump export (breaks any queries using the old name) Update the export to the data dump so only it gets the new name Something else we haven't thought about   I have added all of these options as answers below - please vote on the one you most prefer, we will try to accommodate the top voted answer.


I have proved the following statement and I would like to know if my proof is correct, thank you. "$\mathcal{S}$, smallest $\sigma$-algebra on $\mathbb{R}$ containing $\{(r,r+1):r\in\mathbb{Q}\}$, is the set of Borel subsets of $\mathbb{R}$".  DEF. (Borel set): The  smallest $\sigma$-algebra on $\mathbb{R}$ containing  all  open  subsets  of $\mathbb{R}$, $\mathcal{B}$, is called the collection of Borel subsets of $\mathbb{R}$. An element of this $\sigma$-algebra is called a Borel set. LEMMA (1): Let $x\in\mathbb{R}$: then there exists both a decreasing sequence and an increasing sequence of rational numbers converging to $x$. LEMMA (2): Every open subset of $\mathbb{R}$ can be written as a countable union of disjoint open intervals.  Let $(a, b), a,b\in\mathbb{R}, a<b$ be an open subset of $\mathbb{R}$. Then by LEMMA (1) there exist a decresing sequence of rational numbers $(a_i)$ such that $a_i\overset{i\to +\infty}{\to} a$ and an increasing sequence of rational numbers $(b_i)$ such that $b_i\overset{i\to +\infty}{\to}b-1$. Now, since $\mathcal{S}$ is a $\sigma$-algebra we have that: $[1]\ \mathbb{R}\setminus (a_i,a_i+1)=(-\infty,a_i]\cup [a_i+1,+\infty)\in\mathcal{S}$; $[2]\ \mathbb{R}\setminus (b_i,b_i+1)=(-\infty,b_i]\cup [b_i+1,+\infty)\in\mathcal{S}$; $[3]\ \bigcup_{i=1}^{\infty}\mathbb{R}\setminus (a_i,a_i+1)=(-\infty,a]\cup [a+1,+\infty)\in\mathcal{S}$; $[4]\ \bigcup_{i=1}^{\infty}\mathbb{R}\setminus (b_i,b_i+1)=(-\infty,b-1]\cup [b,+\infty)\in\mathcal{S}$; $[5]\ (-\infty, b-1]=\bigcup_{k=1}^{\infty} (-k,b-1]\in\mathcal{S}$; $[6]\ [a+1,+\infty)=\bigcup_{k=1}^{\infty} [a+1, k)\in\mathcal{S}$. From $[4]$, $[5]$, using the fact that $\sigma$-algebras are closed under differences of sets we get $(-\infty,b-1]\cup [b,+\infty)\setminus (-\infty,b-1]=[b,+\infty)\in\mathcal{S}$ and similarly from $[3]$ and $[6]$ that $(-\infty,a]\cup [a+1,+\infty)\setminus [a+1,+\infty)=(-\infty, a]\in\mathcal{S}$ so it is also $(-\infty,a]\cup [b,+\infty)\in\mathcal{S}$ hence $(a,b)\in\mathcal{S}$. By LEMMA (2) and the fact that $\sigma$-algebra are closed under unions we have thus proved that the $\sigma$-algebra $\mathcal{S}$ contains every open subset of $\mathbb{R}$ but since by definition $\mathcal{B}$ is the smallest such $\sigma$-algebra it must be $\mathcal{B}\subset\mathcal{S}$. Similarly, since $(r,r+1)\in\mathcal{B}$ for every $r\in\mathbb{Q}$ (they are open sets in $\mathbb{R}$) and by definition $\mathcal{S}$ is the smallest $\sigma$-algebra containing these intervals, it must also be $\mathcal{S}\subset\mathcal{B}$ thus we can conclude that $\mathcal{S}=\mathcal{B}$, as desired.  EDIT: This question is not a duplicate of  Here the intervals are open intervals with rational end-points, not semi-open intervals with real end-points. This difference leads to different answers. The two questions are related but not duplicate.

Problem Show that $\sigma(\mathcal{J})=\mathcal{B}(\mathbb{R})$, $\mathcal{J}=\{[a, a+1) \mid a \in \mathbb{R}\}$.  I'm using the following lemma: Let $G,G´\subset P(X)$. $\sigma (G) = \sigma (G´) \iff G \subset \sigma (G´) \: \wedge \: G´\subset \sigma (G)$.  My solution $\mathcal{J} \subset \mathcal{B}(\mathbb{R})$: It is known that the sets of half-open rectangles $\mathscr{J}=\{ \left[ b,c \right):b<c \in \mathbb{R} \}$ in $\mathbb{R}$ generates the Borel set on $\mathbb{R}$. So $\mathcal{J} \subset \mathscr{J} \subset \mathcal{B}(\mathbb{R}) \implies \mathcal{J} \subset \mathscr{B}(\mathbb{R})$ $\square$. $\mathscr{J}\subset\sigma(\mathcal{J})$: My idea is that I will like to construct this type of interval $\left[ b,c \right),b<c \in \mathbb{R}$ using $ \left[ a,a+1 \right),a \in \mathbb{R}$ using all the set operations available for which a $\sigma$-algebra is closed under. From $ \left[ a,a+1 \right),a \in \mathbb{R}$ I find it hard to construct an interval with an arbitrary right interval point instead of $a+1$. Hints and help are welcome.


The first time I'm using /schedule but when I try to call a function using schedule from my main function it only works if I schedule it with 1 tick essentially just calling the function. I just tested it in 1.15 and I guess it is intended, but then what is the /schedule command good for? Sure you can make the function call itself, but I want the function to only be active whilst I call it from the other function to make it more optimized. Example: schedule function pack:data/animation 10t doesn't work, but schedule function pack:data/animation 1t and schedule function pack:data/animation 10t replace works.

I found 11 questions like this on gamingSE already, but none of them have proper and up-to-date answers. So I'm creating this Q&A:  How do you either activate a command x seconds/minutes/hours/… in the future or every x seconds/minutes/… in a loop?  Repeating command blocks and ticking functions execute 20 times per second, redstone is  in many situations and most of the extremely fancy solutions, like falling blocks in cobwebs, have broken over time or are needlessly complicated.


I'm trying to pass to a constructor class a 2d array  std::array<std::array<int, dimension>, dimension>   I do some search, and i tried to use the template.. But doesn't work  But, my code produce the following error :   Undefined symbols for architecture x86_64:  "state::state<std::__1::array<int, 4ul>, 4ul>(int, std::__1::array<std::__1::array<int, 4ul>, 4ul> const&)", referenced  from:   _main in main-d76757.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)   The code of the main :  int main () {    const int dimension = 4;   std::array<int, dimension> j;   std::array<std::array<int, dimension>, dimension> array;   array[0][0] = 0;   array[0][1] = 7;   array[0][2] = 4;   array[1][0] = 3;   array[1][1] = 8;   array[1][2] = 6;   array[2][0] = 1;   array[2][1] = 5;   array[2][2] = 2;      state t = state(dimension, array);  }   And here the code of the constructor :  template<typename T, size_t N> state::state(const int dim, std::array<T, N> const &array) : dimension(-1) { // DO STUFF  }


I have an input field on a registration screen where the user has to enter his user id which is generally 6 characters long. First 2 characters are always alphabets, and the following characters are mostly numbers. (eg. ab123c or xy5678)  How can I check in the input field with jquery / javascript that user only enters in above format before hitting submit.  <input type="text" maxlength="6" name="uid" id="uid" placeholder="enter user id here">

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


To reproduce:   Select Edit on Your Sites. Tap the dropdown to get the whole list of sites. Tap the phone's back button.   The list disappears and clicking the dropdown does not make it reappear.

Steps to reproduce:   Ask a question, open the "Ask on which site?" dropdown menu. Press the back button.   Issue: the menu will disappear and you can't bring it back by tapping the arrow or the field. Only typing text or selecting another field then tapping back will return the dropdown menu.


I read that watts is amps multiplied by voltage.  But then I read that it depends on the wattage ... what determines wattage? I thought that the outlet supplied voltage potential, and the device uses that. How do amperes, watts, etc. come into the whole big picture?  I also found that you need to know how much resistance is in a circuit to determine how many amps equals how many volts. How would one know the resistance beforehand throughout an entire circuit before figuring out wattage? I thought wattage was force.  Then I read that a volt is what "pushes" electrons, but then I read that wattage is a force equal to one joule per second.  How does it make any sense to understand that voltage is the power when wattage is considered force? There's two forces?  Assume I do not know the wattage, what is the amperes of one volt then?  I have tried books, Google searches, everything - it doesn't add up to me.  This doesn't make sense to me, and it's greatly complicated. Ironically, I've done some small electrical projects not knowing this, and it's unclear to me.  Can anyone make this clear(er) to me?

I understand that this is a really basic question, but, I've been unable to really understand electrical terminology for some reason. What exactly is an amp? How does it correspond to a watt?  And: How does a watt correspond to a volt? What does the frequency of electricity refer to? (Hz, 50/60)  Please be as specific, and laymeny as possible :).  Thank you!  Edit: Since I didn't get anyone yelling at me for talking about adding a few more questions, here goes:  What is a volt? My understanding of it is the difference between the neutral and phase, but, this doesn't make it any clearer. If anyone can help out with more information, with an analogy or two, plus some technical information, I'd appreciate it very much!  What does the "earth"/ground portion of the circuit do? How does it help safety? If it helps safety, why aren't all plugs 3-pin instead of 2-pin?  Hypothetical:  If I plugged in two wires to a socket, and put the other end into something conductive (for instance, a bucket of water), assuming the breaker doesn't go off (if it would, why would it?) after I remove said wires(or turn off the socket), does the water "hold" the charge? Is it in any way unsafe?  For what it's worth, I'm assuming no. The current flows from phase-neutral, the water simply facilitates this. Right? If I'm right, I assume this means that I am in some way "using" the electricity? How does this differ if I for instance put the wires up against a block of wood? How does it differ if I stick the wires on myself?  I apologize if some of these questions show a fundamental mis-understanding of electricity. If they do, smack me across the head and point me to a resource that will educate me and help me answer such questions myself. These questions have plagued the back of my mind for a while, but I've never found the right place to ask.  I have more such questions, both hypothetical, and real (how does a stabilizer work, why is it required? Why do motors require 2x as much electricity to start up vs to run? Why can't this be optimized/why hasn't it been fixed yet?). I'm hoping I'll be able to answer the hypothetical ones myself once I gain more of an understanding, with your help.  I hope questions at these level (and their answers) are useful to at least one other person!  Again, Thanks to whoever helps me out!


I am puzzled as to why the below code always comes up with the toast incorrect even when the two views return the same text.   @Override      public void onClick(View view) {          int intID = view.getId();          Button button = (Button) findViewById(intID);          CharSequence message = button.getText().toString();          Log.i(LOGTAG, (String) message);          TextView textview = (TextView) findViewById(R.id.correct);          CharSequence answer = textview.getText().toString();          Log.i(LOGTAG, (String) answer);          if (message == answer) {                 Toast.makeText(getApplicationContext(), "Correct", Toast.LENGTH_LONG).show();             } else if (message != answer);{                 Toast.makeText(getApplicationContext(), "Incorrect", Toast.LENGTH_LONG).show();             }       }   The Log  06-04 18:56:25.752: I/APP(1972): Germany 06-04 18:56:25.752: I/APP(1972): Germany   The button is of course a button and the textview is an invisible textview. As you can see from the LOGCAT both "message" and "answer" give the same text however the answer to the  " if message == answer" is always incorrect. Does anyone why and how to fix this. Kind Regards, Derek

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


What makes something iterable in Python? ie. can loop over it with for  Is it possible for me to create an iterable class in Python?  If so, how?

How would one create an iterative function (or iterator object) in python?


I need help with a CONCATENATE formula that has quotes. I need it to add this to the cell.  appcmd set site /site.name:"YOURWEBSITE.COM" /-bindings.[protocol='https',bindingInformation='*:443:XYZXYZ']   However I need XYZXYZ to be the value found in cell A2. How can I do this?

I have the following data:  http://example1.com    anchor text 1     http://example2.com    anchor text 2 http://example3.com    anchor text 3       And I would like the output to be:  http://example1.com    anchor text 1    anchor text 1 http://example2.com    anchor text 2    anchor text 2 http://example3.com    anchor text 3    anchor text 3   I have tried getting the code to substitute cells A1 and B1 in cell C1 like this:  ="B1"   However, I'm getting errors because of the equal sign and double quotes in the HTML code. I have tried using single quotes to escape it, but still no luck.  Anyone know how to do this? Your help is highly appreciated.


Hey i am making a game in java and while loading the tilesheet I get a weird error and i cant fin out why.  public class TileSheetLoader {  BufferedImage tileSheet;  int width; int height; int rows; int cols; public BufferedImage[] tiles;  public void loader(int width, int height, int rows, int cols) {     try     {          ImageIO.read(new File("gfx/tileSheet.png"));     }catch(Exception e){System.out.println("Couldent load tileSheet.png");}     this.width = width;     this.height = height;     this.rows = rows;     this.cols = cols;     this.tiles = new BufferedImage[rows * cols];     for(int i = 0; i < rows; i++)     {         for(int j = 0; j < cols; j++)         {             tiles[(i * cols) + j] = tileSheet.getSubimage(i * width, j * height, width, height);             System.out.println("loaded tile");         }     } }   }  This is the code of the class. I get the NullPointException on this line  tiles[(i * cols) + j] = tileSheet.getSubimage(i * width, j * height, width, height);   this is where i call the methode.  tilesheetloader.loader(96, 32, 1, 3);   already a big thanks for the people who took the time to read.

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


I have two files :  f1:                                      f2: ==============                         =============== some text line 1                       A1 some text line 2                       A2 some text line 3                       A3   can I quickly merge these two files to produce f3:  some text line 1 A1 some text line 2 A2 some text line 3  A3

I have tried to get the 2 files output in a single file.  I have tried below command:  cat file1 file2   but here file2 data is appending to file1.  What I need is file1 1st line followed by file2 first line, and file1 second line followed by file2 second line etc.  Can anybody tell me how to do this in a simple way?


$$\lim_{x\to0}\frac{6^x-1}{x}$$   I have spent quite a lot of time on this limit but I still can't solve it. None of the regular tricks work here, I can't get rid of the $x$, nor can I get it in the form $$\left(1+\left(\frac1y\right)\right)^y.$$ So, how can I solve this limit without using L'Hospital's Rule?

I was messing around with the definition of the derivative, trying to work out the formulas for the common functions using limits. I hit a roadblock, however, while trying to find the derivative of $e^x$. The process went something like this:  $$\begin{align} (e^x)' &= \lim_{h \to 0} \frac{e^{x+h}-e^x}{h} \\ &= \lim_{h \to 0} \frac{e^xe^h-e^x}{h} \\ &= \lim_{h \to 0} e^x\frac{e^{h}-1}{h} \\ &= e^x \lim_{h \to 0}\frac{e^h-1}{h} \end{align} $$  I can show that $\lim_{h\to 0} \frac{e^h-1}{h} = 1$ using L'Hôpital's, but it kind of defeats the purpose of working out the derivative, so I want to prove it in some other way. I've been trying, but I can't work anything out. Could someone give a hint?


I have the following query, the alias it's called DELAY, works fine, but when I try to run the first query adding AND DELAY < 0, the alias is not recognized.  I tried to create the alias QUERY AS DELAY or QUERY AS "DELAY" but no success.  The strange thing is that the alias DELAY in the order by doesn't generate errors.   SELECT ITK_TCK_ID,                     ITK_OPENED_DATE,                     TO_NUMBER(ROUND(ROUND(GET_HS(ITK_OPENED_DATE,                                                  SYSDATE,                                                  ITK_NORMAL_BEGIN,                                                  ITK_NORMAL_END,                                                  ITK_WEEKEND_BEGIN,                                                  ITK_WEEKEND_END,                                                  ITK_FREEDAY_BEGIN,                                                  ITK_FREEDAY_END),                                           GET_HS(ITK_OPENED_DATE,                                                  SYSDATE,                                                  ITK_NORMAL_BEGIN,                                                  ITK_NORMAL_END,                                                  ITK_WEEKEND_BEGIN,                                                  ITK_WEEKEND_END,                                                  ITK_FREEDAY_BEGIN,                                                  ITK_FREEDAY_END)) -                                     ITK_EXPIRATION_TIME,                                     2)) DELAY                FROM INSTANTIATED_TICKLERS               WHERE ITK_AR_SBP_ID = 'PEAJU_PP' -- P_WGR_ID               AND DELAY < 0               ORDER BY DELAY DESC;   Any suggestions?

I have a query where I chain two columns. Why does the alias not work in the GROUP BY clause but in ORDER BY clause, it does work? How can I write the select correctly?  SELECT   KOS_VER_ID        AS "Vertrag"   , WHR_ISO_3_CODE  AS "Waehrung"   , KOS_KOA_ST_KZN || '  -  ' || ST_LANGBEZ_EN as "Kostenart"   , SUM (KOS_BETRAG) AS "Summe pro KOA" FROM   KOSTEN   , WAEHRUNG   , SCHLUESSELTABELLE WHERE    KOSTEN.KOS_VERHI_WHR_ID = WAEHRUNG.WHR_ISO_ID   AND KOSTEN.KOS_KOA_ST_KZN = SCHLUESSELTABELLE.ST_ID   AND KOS_VER_ID in (2509, 2510, 2511) GROUP BY   KOS_VER_ID   , WHR_ISO_3_CODE   , KOS_KOA_ST_KZN || '  -  ' || ST_LANGBEZ_EN ORDER BY   "Vertrag"   , "Kostenart" ;


$$\tan^2\frac{\pi}{4n}\cdot\tan^2\frac{3\pi}{4n}\cdot\cdots\cdot\tan^2\frac{(2n-1)\pi}{4n}=1, \quad \forall n \in \Bbb{N}^*$$     I tried putting $z=\cos(\pi/4)+i\sin(\pi/4)$, and expressing $\tan$ of $\pi/4$, $3\pi/4$ etc. The problem is that the expression is really hard to compute.  The official solution starts from the equation  $$(2n+iz)^{2n}+(2n-iz)^{2n}$$  which has solutions that you can multiply using Vieta’s formulas and get the desired result. However, HOW am I supposed to GUESS an equation that has those solutions?  If you have a logical answer please help me! Thanks in advance.

Prove:     $$\cot \frac{\pi}{2m}\cot \frac{2\pi}{2m}\cot \frac{3\pi}{2m}...\cot \frac{(m-1)\pi}{2m}=1$$   This is a roots of unity problem. I managed to show a similar example for $\cos$ by the following:  $z^m-1=0$ with roots $1,e^{2\pi /m},...,e^{2(m-1)\pi /m}$ Put the roots into a polynomial with linear factors:  $(z-1)(z-e^{2\pi /m})...(e^{2(m-1)\pi /m})=z^m-1$ and divide by $z-1$ to get:  $$(z-e^{2\pi /m})...(e^{2(m-1)\pi /m})=1+z+...+z^{m-1}$$  Evaluation at $z=1$ with some complex conjugation (I multiply 2 conjugated equations) yields the result.  I'll be happy to expand on my current work if required.  Edit: Thought I'd add a similar


I have a laptop with Windows 7. My home has a few WiFi networks, and, for some reason, no one knows the passwords. The laptop can connect to those networks, however.  So, I thought that the laptop must have the passwords stored somewhere in its registry.  Is this true? Can I obtain those passwords?

I'm trying to connect to my friends wireless network, but we don't know the password (ie. network/WEP/WPA key). The WLAN is secured by WPA2.  My friend's laptop with Windows 7 connects automatically to the WLAN. Is there a way to get the password from his laptop?


The last version of TiKZ was 3.0.1, released on 2015-08-29. From what I understand from the code repository , development is not active at all. I understand this to be a great thing and to mean that there are just very few bugs, and that it is basically feature complete. Is this correct?  Or has development basically moved to "sub-packages" that are not in the core package. If so, what are the main packages and where is their source code so I can follow the development?  It is fascinating to me that TiKZ is so popular, but that its development seems not very active the past years. I take this to be a good signal that it is extremely stable and not many improvements are needed.

Indeed, on source forge, it is distributed with CVS and it is indicated this :     SourceForge only supports read-only access to CVS now. For more   information see our blog post about decommissioning CVS commit   support. If you are a project admin, you can convert your repository   to SVN or Git with these instructions.         Moreover, almost no improvement has had an owner since the end of 2016: , and no updates have been sent to CTAN since 2015.  So, what is the future of pgf/TikZ?


Simple question: I'm using natbib with the  and I want the references in the "Reference" section to show with no title. That is, remove the lines:    I know I can just go to the .bib file and remove the title from each entry, but I'd like to know if there's some way to tell natbib to do this without me having to modify the entire .bib file.

I use plain bibliography style for my book. When I compile it, by default, I get the details including the title in my reference. like this:     H. J. C. Berendsen, J. P. M. Postma, W. F. van Gunsteren, a. Dinola, and J. R. Haak. Molecular dynamics with coupling to an external bath. J. Chem. Phys., 81:3685-3690,1984.   This is too long and I have more than 100 such references which makes the document too long. How can I force it to remove the title from this reference? something like this:     H. J. C. Berendsen, J. P. M. Postma, W. F. van Gunsteren, a. Dinola, and J. R. Haak.  J. Chem. Phys., 81:3685-3690,1984.   Your answer will be greatly appreciated.  By the way, I still would like to use the plain bibliography style.


#!/bin/bash echo "Enter any string" read string string1 = $(echo $string | rev) if ["$string" == "$string1"] then      echo "String is palindrome" else      echo "String is not Palindrome" fi   I am trying to check whether a string is a palindrome or not. Below is the error I get:  # ./palindrome.sh Enter any string mom ./palindrome.sh: line 5: string1: command not found ./palindrome.sh: line 6: [mom: command not found String is not Palindrome

I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month="01"] && [$day="01"]; then         date="$last_month/$yes_day/$last_year"         fulldate="$last_month/$yes_day/$last_year" else         if [$month="01"] && [$day="02"]; then                 date="$last_month/$yes_day/$last_year"                 fulldate="$last_month/$yes_day/$last_year"         else                 if [ $day = "01" ]; then                         date="$last_month/$yes_day/$year"                         fulldate="$year$last_month$yes_day"                 else                         if [ $day = "02" ]; then                                 date="$last_month/$yes_day/$year"                                 fulldate="$year$last_month$yes_day"                         else                                 date="$month/$yes_day/$year"                                 fulldate="$year$month$yes_day"                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found


How can we find the value to which the following series converges, if it converges to a finite number? If else, how can we prove that it is divergent?$$1+\frac{1}{2+\frac{1}{3+......}}$$

Does this continued fraction converge?  $$\cfrac { 1 }{ 1+\cfrac { 1 }{ 2+\cfrac { 1 }{ 3+\cfrac { 1 }{ 4+\ddots  }  }  }  } $$  ($[0;1,2,3,4, \dots]$)  I tried approximating a few values but I couldn't make out whether it converges or diverges. Can anyone provide a proof whether this converges or diverges. If it converges, please add what it converges to.


My Professor used to say that there are two aspects to consider when making an assumption: The purpose of making the assumption and the justification as to why it's scientifically valid.  I would like to know these aspects with regard to the assumption of no-slip fluid-solid boundary condition.

When dealing with fluid mechanics of viscous fluids, both theoretically and numerically, I've always been told that the boundary condition applied at solid walls has to be a no-slip one. My teachers or textbooks never really explained why, except sometimes "well, the fluid's viscous, so it sticks to solid" which is far from an explanation to me. Therefore I'm reading a little bit to understand the real origin of this condition, and so far there is on thing that I don't understand in what I've found: in Volume II of Modern Developments in Fluid Dynamics by S. Goldstein, it is written that:     "[...]; finally he [Navier] decided on the first [hypothesis on the behaviour of a fluid near a solid body], on the grounds that the existence of slip would imply that the friction between solid and fluid was of a different nature from, and infinitely less than, the friction between two layers of fluid, and also that the agreement with observation of results obtained on the assumption of no slip was highly satisfactory."   I do not understand what is in bold: what does the "different nature" of friction means, and why would it be "infinitely less"?  NB: After this statement, Goldstein refers to a bibliographic entry, but I don't know if it's possible to find such archive on the Internet. Here it is anyway: Trans. Camb. Phil. Soc. 8 (1845), 299, 300; Math and Phys. Papers, 3, 14, 15.


I'm in 12th grade right now so basically I can't understand any complex mathematical journal out online. I just needed some online journals which an average 12th grader can understand...please recommend if any.

I want to make someone a present by subscribing for him to a mathematical journal. (It should appear every month or every two months). The contents should be comprehensible to an undergraduate in mathematics, and be about a broad selection of topics (for example not only analysis).   I expect the content to be something like proposing interesting problems and then giving solutions with some references for further study. Are there some famous journals you could suggest me?


I have a LaTeX template of journal article (European Alliance for Innovation). Containing two columns. I'm facing an issue while adding image into two column. While, scaling image solve my issue, but problem is that image showing above on the text of second column. How can i solve this issue? bellow is my code.    \begin{figure}     \centering     %\includegraphics [scale=0.1]{3D}     \includegraphics [scale=0.8]{ThesisFigs/myfig/lpyear.png}     \caption{Yearly Publications on the topic of Link Prediction}     \label{Fig:2}  \end{figure}    after excuting the above code, this is what i'm getting.

If I just try to set the figure's size to 0.9\textwidth my figure will just end up on the right column, sized to be two-columns wide.  Has anyone done this before?


I am trying to use Stack Exchange Andoid App to use my accounts in Stack Overflow & Area 51.   For the Area 51, there is only Area 51 Discussion. Even Area 51 Discussion isn't working in the App!   VERSION 1.0.51  When adding this site, it's showing the correct full name as in this screen-shot:     However, when I pin this site to my fav sites in Stack Exchange, it is showing: Unknown Site. When clicking it, it shows black screen then just quit the App!  Here is the screen-shot:       Is the site not yet capable with Android? or is it a bug in the App itself?  PS: this question isn't duplicate:   In the previous versions of the App, the site was opening but with Unknown Site name. However, in this version, it quits the app when pressing the area site! It isn't opening at all! This question is also to track this bug in the App. As it's about the site name issue & the content as well.

I came across something rather interesting today. I was browsing Area 51 on Chrome when I happened to click on . To this, I was greeted with a prompt asking:    As , and fully expecting a crash, I clicked on SE. However, that didnt happen.     Now, since Area 51 Meta is working correctly as far as Q&A is concerned, I think it should be added to the All Sites list and if at all possible, made directly browsable from within the app.


#include <stdio.h>  int main() {        int array[3][3] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };     printf("%d\n", array[1][-2]); // 2     printf("%d\n", (-1)[array][5]);  // 3     printf("%d\n", -1[array][5]);  // -9      return 0;   }   What is the meaning of [array]? why output 3? -9?  thank you!

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


If $X$ and $Y$ are independent,    can we assume $X^2$ and $Y^2$ are independent in general? can we assume $X^2$ and $Y^2$ are independent if  $X$ and $Y$ are also identically distributed (in addition to being independent)? can we assume $X^2$ and $Y^2$ are independent if both $X$ and $Y$ (which are assumed independent) followed the normal distribution (not necessarily identically distributed)? can we assume $X^2$ and $Y^2$ are independent if both $X$ and $Y$ followed the normal distribution with identical mean and variance (in addition to being independent)?

Is the claim that functions of independent random variables are themselves independent, true?   I have seen that result often used implicitly in some proofs, for example in the proof of independence between the sample mean and the sample variance of a normal distribution, but I have not been able to find justification for it. It seems that some authors take it as given but I am not certain that this is always the case.


$F$ is a field, so by definition, $F$ is a commutative ring with unity in which every non-zero element is a unit. Then, $F[x]$ is a set of polynomials in which the coefficients come from $F$, so all of the non-zero coefficients have units in $F$.  This means we can have polynomials like $f=a_0+a_1x+a_2x^2+\cdots +a_nx^n$ where $a_k\in F,$ $0\le k\le n$.   If $F[x]$ were a field, every non-zero element would be a unit.  I'm not really sure where to go from here.

I'm currently studying Polynomial Rings, but I can't figure out why they are Rings, not Fields. In the definition of a Field, a Set builds a Commutative Group with Addition and Multiplication. This implies an inverse multiple for every Element in the Set.   The book doesn't elaborate on this, however. I don't understand why a Polynomial Ring couldn't have an inverse multiplicative for every element (at least in the Whole numbers, and it's already given that it has a neutral element). Could somebody please explain why this can't be so?


I try to get the basic understanding behing SVM algorithm, however I have a problem with basic mathematics.  I follow the lecture .     Suppose the two classes can be separated by a hyperplane:$(w \cdot x) + b = 0$   Acoording to , hyperplane is defined as $n(r-r_0)=0$, does it mean that $b=-w \cdot r_0$?  I tried to consider 2-dimensional case, when $w \cdot x +b =0$ is a line, but it's completely doesn't make sense, $b=-w \cdot x$, where $b$ should be a constant, how can I generalize it to a 2 dimensional case.  In addition, why $w$ is actually orthogonal to the plus and minus plane?

How does a  work, and what differentiates it from other linear classifiers, such as the , , or ? *  (* I'm thinking in terms of the underlying motivations for the algorithm, optimisation strategies, generalisation capabilities, and run-time complexity)


and bad news... My 5 years 128 gb Samsung ssd turned into 1gb after a shut down.The drive was in a dell laptop.the specs of the ssd are: Samsung 2.5" 128 ssd (SATA6.0Gbps) Model MZ-7PC1280/0L1 F/W CXM04L1Q  The bios see it now as :IDE0 SAMSUNG SATA SSD IDE0 Serial NUmber :000000000000000  I plugged the drive into a usb 2.0 enclosure and win 10 saw it as a Unknown 1gb Not initialized 1gb Unalocated drive....I tried to initialize but it gives me that error "Data error (cyclic redudancy check)"  What should i do ? I own an identical ssd in another laptop.Many thanks

My USB drive used to be originally 8GB when I bought it.  I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting Format.... But the capacity only shows 250MB.  Is there something I can do to get the original size back? Maybe it got partitioned in a weird way?   The  flash drive is a SanDisk Cruzer Micro 8GB. I got it from Wal-Mart but this is the same drive.


Please help for parse json response. My json String is     {      "result":[         {            "parent":"",          "made_sla":"true",          "caused_by":"",          "watch_list":"",          "upon_reject":"cancel",          "sys_updated_on":"2019-05-09 15:36:38",          "child_incidents":"0",          "hold_reason":"",          "approval_history":"",          "number":"INC0000060",          "resolved_by":{               "link":"https://dev59401.service-now.com/api/now/v1/table/sys_user/5137153cc611227c000bbd1bd8cd2007",             "value":"5137153cc611227c000bbd1bd8cd2007"          },          "sys_updated_by":"admin",          "opened_by":{               "link":"https://dev59401.service-now.com/api/now/v1/table/sys_user/681ccaf9c0a8016400b98a06818d57c7",             "value":"681ccaf9c0a8016400b98a06818d57c7"          },          "user_input":"",          "sys_created_on":"2016-12-12 15:19:57",          "sys_domain":{               "link":"https://dev59401.service-now.com/api/now/v1/table/sys_user_group/global",             "value":"global"          },          "state":"7",          "sys_created_by":"employee",          "knowledge":"false",          "order":"",          "calendar_stc":"102197",          "closed_at":"2016-12-14 02:46:44",          "cmdb_ci":{               "link":"https://dev59401.service-now.com/api/now/v1/table/cmdb_ci/109562a3c611227500a7b7ff98cc0dc7",             "value":"109562a3c611227500a7b7ff98cc0dc7"          },          "delivery_plan":"",          "impact":"2",          "active":"false",          "work_notes_list":"",          "business_service":{               "link":"https://dev59401.service-now.com/api/now/v1/table/cmdb_ci_service/27d32778c0a8000b00db970eeaa60f16",             "value":"27d32778c0a8000b00db970eeaa60f16"          },

How can I deserialize this json object:      {     "response": {         "count": 1,         "benchmark": 0.22567009925842,         "requests": [             {                 "request": {                     "id": 537481,                     "image_thumbnail": "",                     "title": "Request for new bin(s) - residential",                     "description": "Propmain ref  3234-1114",                     "status": "submitted",                     "address": "36 Pine Tree Close",                     "location": "Peterborough, England",                     "zipcode": "PE1 1EJ",                     "user": "",                     "date_created": 1417173208,                     "count_comments": 0,                     "count_followers": 0,                     "count_supporters": 0,                     "lat": 52.599967,                     "lon": -0.233482,                     "user_follows": 0,                     "user_comments": 0,                     "user_request": 1,                     "rank": "0"                 }             }         ],         "status": {             "type": "success",             "message": "Success",             "code": 200,             "code_message": "Ok"         }     } }   What i've tried:   Map<String,Object> rawObj = (Map<String,Object>) JSON.deserializeUntyped(jsonString);     Map<String,Object> responseObj = (Map<String,Object>)rawObj.get('response');     List<Object> reqs = (List<Object>) responseObj.get('requests');     System.debug('Map Size = ' + reqs.size());     Map<String, Object> i = new Map<String, Object> ();     for (Object x : reqs) {          i = (Map<String, Object>)x; }     Map<String,Object> requests = (Map<String,Object>)i.get('request');     System.debug('Map Size = ' + i.size());     for (String field : i.keySet()){          Object id = i.get(field);         Object title = i.get('title');         System.debug('Id : ' + id);         System.debug('title : ' + title);          //System.debug('Title : ' + title);       }


“Formally, O-notation expresses the upper bound of a function within a constant factor. Specifically, if g(n) is an upper bound of f(n), then for some constant c it is possible to find a value of n, call it N, for which any value of n ≥ N will result in f(n) ≤ cg(n).” This is a quote from a textbook I’m reading on algorithms. By this definition, O-notation would be meaningless? If the running time of some algorithm is T(n) = 5n+10 then T(n) is O(n). But it is also O(n^2) and O(2^n), etc. f(n) ≤ g(n) 5n+10 ≤ n^2 for n>6 5n+10 ≤ 2^n for n>5 I understand the concept of worst-case analysis. It just seems the notation has barely any link to algorithm complexity? It is very confusing.

Sometimes I see Θ(n) with the strange Θ symbol with something in the middle of it, and sometimes just O(n). Is it just laziness of typing because nobody knows how to type this symbol, or does it mean something different?


In Bernoulli's equation the pressure plus kinetic and potential energy is constant. But what is this pressure term, physically?  Is it the pressure of the fluid on the walls of the container or is it the pressure exerted on the fluid by the surroundings (air/liquid as air is also fluid). Because these two types of pressure are entirely different. In torricelli's law it is the pressure exerted by the atmosphere on the fluid and in venturimeter it is the pressure that the fluid under consideration exerts on the tube. I want some logical answers so that I could easily see what this pressure is physically - the formulas I know.

I know the Bernoulli equation that states that the energy along a streamline is constant:  $$ \frac{v^{2}}{2}+gh+\frac{p}{\rho}=C $$  However I can't seem to figure out what exactly $p$ is in this equation. In every book I look and also on Wikipedia it only says "$p$ is the (static) pressure". I always considered $p$ to be the internal pressure of the liquid, i.e. the pressure exerted by the fluid on its surroundings (that includes covering fluid). But this raises a problem that I wasn't sure of how to solve.    Lets assume that the flow in the picture is an incompressible flow, like water. When the water flows from the wide to the narrow part of the tube, the speed $v$ increases, lowering the pressure $p$ (as $gh$ and $\rho$ remain constant). As this is an incompressible fluid, the volume cannot change. But if the pressure is lowered and the volume does not change, doesn't that mean that the temperature is lowered too? This just seems weird to me.  What goes wrong in this thought process?


What is it called when a word can serve more than one part of speech? 'Aggregate', for example, can be used as a Noun, an Adjective, or a Verb.

Is there a term for e.g. the lexical symbol "duck"? It is both a verb and a noun, in contemporary use having no apparent connection, and so would appear to be represent two words.    Then, is the a better term than 'lexical symbol' to describe any grouping of letters having some meaning? I just made up lexical symbol because it seemed convenient.


I have a javascript class, and each method returns a Q promise. I want to know why this is undefined in method2 and method3. Is there a more correct way to write this code?  function MyClass(opts){   this.options = opts;    return this.method1()     .then(this.method2)     .then(this.method3); }  MyClass.prototype.method1 = function(){   // ...q stuff...    console.log(this.options); // logs "opts" object    return deferred.promise; };  MyClass.prototype.method2 = function(method1resolve){   // ...q stuff...    console.log(this); // logs undefined    return deferred.promise; };  MyClass.prototype.method3 = function(method2resolve){   // ...q stuff...    console.log(this); // logs undefined    return deferred.promise; };   I can fix this by using bind:  function MyClass(opts){   this.options = opts;    return this.method1()     .then(this.method2.bind(this))     .then(this.method3.bind(this)); }   But not entirely sure why bind is necessary; is .then() killing this off?

I have a method that uses the  function and makes a call to another method. On initial load method 2 works fine. However, after the timeout, I get an error that says method2 is undefined. What am I doing wrong here?  ex:  test.prototype.method = function() {     //method2 returns image based on the id passed     this.method2('useSomeElement').src = "http://www.some.url";     timeDelay = window.setTimeout(this.method, 5000); };  test.prototype.method2 = function(name) {     for (var i = 0; i < document.images.length; i++) {         if (document.images[i].id.indexOf(name) > 1) {             return document.images[i];         }     } };


I am auto generating an HTML page and would like to do a diff between the newly generated HTML page and a previously generated HTML page.  I want to do this by letting the user enter a the filename of the old HTML page into the new HTML page which will then load it as an IFRAME and do a diff on the DOM trees, modifying my current tree in order to display the results.  My page consists of a table, which has a subtable in each cell.  I am using JQuery.  Are there any existing tools/libraries that I should be using?  At the moment I'm working on implementing this myself but I'm sure someone else has already done this...  Clarification: I am not asking for diffs of text. I am asking for tools that can do a diff of DOM objects. Meaning, diffing the contents of HTML tables based on the contents of the tables them selves, text diff tools will not suffice.

I'm interested in seeing a good diff algorithm, possibly in Javascript, for rendering a side-by-side diff of two HTML pages. The idea would be that the diff would show the differences of the rendered HTML.  To clarify, I want to be able to see the side-by-side diffs as rendered output. So if I delete a paragraph, the side by side view would know to space things correctly.    @Josh exactly. Though maybe it would show the deleted text in red or something. The idea is that if I use a WYSIWYG editor for my HTML content, I don't want to have to switch to HTML to do diffs. I want to do it with two WYSIWYG editors side by side maybe. Or at least display diffs side-by-side in an end-user friendly matter.


I sculpted a kind of awful model and wanted to make a little scene out of it. After retopologizing and rigging, frames from my animation look like this:   The JPEG compression is pretty bad (sorry, my original file was way too big) but the shadows follow the topology of the mesh to the point that they outline the polygons and individual ones are visible.    Why are the shadows following the mesh while the texture is mostly indifferent? I've added a subsurf modifier, but the problem only shrinks a bit and the lag grows a ton. Thanks for any help you can provide!  Edit 1    Sorry, my other image demonstrating the problem was not great... Here's another one (scaled 200% with no interpolation).

I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.   I hope you can help me fix it.


I have a file with a bunch of variables such as:  file  DEVICE0_USB="usbSerialNo1" DEVICE1_USB="usbSerialNo2"   and I want to assign the contents of any of these variables to variables in a script, for instance:  script   FAX_MACHINE_USB=$DEVICE0_USB COFFEE_MAKER_USB=$DEVICE1_USB   so that when I echo $FAX_MACHINE_USB I receive usbSerialNo1  I can use source to get the variables from file but this will also run every line in file. In my case it's not a problem since file has only variable declarations, but I still prefer not to do it. Is there another way of achieving it?

How do I get a variable's value from one script and import it in another script? But the catch is that the script where I am going to get the variable's value has also some commands that I don't want to run:  Let's say this is script1.sh:  variable="Hello" #some command here e.g. yum check-update   And in script2.sh:  echo $var   I've found an approach where one uses the EXPORT command and puts ./script1.sh inside the script2.sh but it runs the other commands.  So, how can I get the variable's value without running the commands inside it? I hope this question is clear. Thanks in advance!


When kittens-game begins, our only option to obtain wood is by refinement. As the game continues, we have access to woodcutters, and they pretty clearly are more efficient than refining (see this question "").  Later on however there are many upgrades to refining, with bio labs being one quite late and substantial upgrade (an additional 10% efficiency per lab). I noticed that a farmer's base rate for catnip is 5/sec and a woodcutter's base rate is 0.075/sec. It seems to me that it is already more efficient to refine than to chop.  I'm not always paying 100% attention, so I believe it is still a good idea to have a couple of woodcutters so that production is in the positive. All the rest of my woodcutters should be farmers, right?  I'm new to the late game. In late-game, are woodcutters obsolete? At what point does refining become more efficient than woodcutting?

In , you can obtain wood by assigning Woodcutters or refining it from catnip. Is there a simple rule or formula to determine which one is more efficient?  I've heard anecdotes that refining catnip is more efficient up until a certain point in the tech tree, but I haven't been able to find any more details.


I'm writing a paper and I need to include a date, for example 20th January 2011.  How can I make the Contraction smaller and position it correctly as an ascender/superscript?

What is the easiest way to superscript text outside of math mode?  For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th.  And what if I still want the n to be in math mode, but the th outside?


I know that for $1\leq x_i\leq p$ the answer will be the coefficient of $x^n$  in $(x + x^2 + x^3 + ... + x^p)^k$. But what will be the answer for the constraint $0 \leq x_i \leq p?$   Also, how can I generate a definite formula or recurrence relation to program it? It will be difficult to calculate the answer by summing up the GP series and then calculating the coefficients using series expansion.   Thank you!

Let $n,k,r$ be positive integers. The number of all nonnegative solutions of the Diophantine Equation $x_1+x_2+\dots+x_k=n$ is $\binom{n+k-1}{n}$. Is there a general formula for the number of solutions of the equation $x_1+x_2+\dots+x_k=n$ with $x_i\le r$ for every $i\in \{1,2,\dots,k\}$?  If one defines $A_i$ to be the number of solutions with $x_i>r$ then the answer will be $\binom{n+k-1}{n}-|A_1\cup\dots\cup A_k|$. I think it can give a complicated formula. What is the formula?


I have a problem when I installed Ubuntu 18.04 LTS as secondary OS. I used windows 10 before and I want to make dual boot with Ubuntu 18.04 LTS. I already create 30GB free space on the disk and I already make USB boot too. I followed the steps to install Ubuntu and make one partition as swap and one as ext partition. I used "Something else" method in this case. But, when I installed it works well in the first copying and installing but when Grub2 package installed I have some error said like this :     The 'grub-efi-amd64-signed' package failed to install into /target/.   Without the GRUB boot loader, the installed system will not boot".   I used HP laptop with 4GB RAM and I used windows 10 to make free space of partition. I also use rufus to make bootable from USB device.  Anyone please help me to solve this problem. Thanks before.

I'm trying to install Ubuntu 18.04 on my laptop. After choosing the partitionn i have the following error message: grub-efi-amd64-signed package failed to install into / target/.    Then I tried to install via "try ubuntu" and i get:  ubi-partman failed with exit code 10     What should I do?


I want to ask myself what kind of job I'm gonna do. I want to know which one should be ok:   What job should I have? What job I should have?   Thanks,

What is the difference between:        "How it works?"      and        "How does it work?"


I define a node Q in TikZ:  \node (Q) at (1,1) {};  Now I want to draw a line to the point (2,2) by doing something like (Q) + (1,1). Doing that I got an error. What is the correct way to do that?

Suppose one defines coordinates a and b. One may draw a line connecting these two coordinates (\draw (a) -- (b)). Suppose one desires to draw a line that is shifted upward 1 unit relative to a and b. A first guess is the command \draw (a){}+(0,1) -- (b){}+(0,1). This command, however, connects the point a+(0,1) to the point b, presumably because addition is subsequent to the draw command. How does one obtain the desired result (drawing from a+(0,1) to b+(0,1)?  MWE:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}  \draw[fill] (0,0) circle (2pt) coordinate (a);  \draw[fill] (5,0) circle (2pt) coordinate (b);  \draw (a) -- (b);  \draw (a){}+(0,1) -- (b){}+(0,1); \end{tikzpicture} \end{document}     Edit: How does one draw coordinates at a point shifted relative to the arithmetic average of the coordinates of two points (something akin to \node at ($(((s1)+(s2))/2)+(0,1)$)).


I'm new to Ubuntu but I failed to solve this error. I had searched for this problem but I didn't find the perfect solution. Please help me. I'm finding this error. Please give me a perfect solution because this error doesn't let me to install any software. The error is:  the following packages have unmet dependencies:  software-properties-kde: Depends: python3 (>= 3.2.3-3~) but 3.3.1-0ubuntu1 is to be installed                          Depends: python3-pyqt4 but it is not going to be installed"

Occasionally, when I'm installing stuff, I get an error like the following:  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:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I've been trying to solve these questions for the past few hours with no luck:   If $G$ is an infinite abelian group all of whose proper subgroups are finite, then $G$ is a  Prüfer $p$-group for some prime number $p$. If $G$ is a group such that $G \equiv G/H$ for all proper normal subgroup $H$ of $G$, then $G$ is a  Prüfer $p$-group for some prime number $p$.   Any elementary idea for these questions (by using only the Chapter I of Hungerford's book). Thanks in advance.

I'm an undergrad student fairly keen on algebra. Over the different algebra courses I've taken, I've often encountered the so-called $p$-Prüfer group on exercises but somehow never got around to them. Now I'm trying to take care of that, but there are some statements I've seen about this group which I don't know how to prove (maybe because I lack some more background in group theory, especially in the study of infinite abelian groups?)     Definition A $p$-group is a $p$-Prüfer group if it is isomorphic to $$C_{p^\infty}=\{e^{\frac{2k\pi i}{p^n}}:k\in \mathbb{Z}, n\in\mathbb{Z}^+\} \subset (\mathbb{C}^\times, \cdot)$$   What I'm having trouble to prove is:     The following are $p$-Prüfer groups:      1) An infinite $p$-group whose subgroups are totally ordered by inclusion,      2) An infinite $p$-group such that every finite subset generates a cyclic group,      3) An infinite abelian $p$-group such that $G$ is isomorphic to every proper quotient,      4) An infinite abelian $p$-group such that every subgroup is finite   Just for the record, what I (think I) could prove was that the following are $p$-Prüfer groups:     5) An injective envelope of $C_{p^n}$, for any $n\geq 1$,      6) A Sylow $p$-subgroup of $\frac{\mathbb{Q}}{\mathbb{Z}}$,      7) The direct limit of $0\subset C_p \subset C_{p^2}\subset ...$   Here $C_{p^n}$ denotes a cyclic group of order $p^n$.  Any other characterizations of the $p$-Prüfer group are welcome.


I have two flags defined in my site (false_negative_flag and false_negative_flag_passed). Each flag has different Flag link text.  In views, I have two displays. I have a flag link in each of these views, one with the first flag, the other with the second one. The link text shows correctly on both displays. I wanted to have images instead of the link text so I added the following css:  .flag-wrapper.{false_negative_flag} a.flag-action {     background: url(http://.../files/failed.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; } .flag-wrapper.{false_negative_flag} a.unflag-action {     background: url(http://.../files/passed.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; } .flag-wrapper.{false_negative_flag_passed} a.flag-action {     background: url(http://.../files/passed.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; } .flag-wrapper.{false_negative_flag_passed} a.unflag-action {     background: url(http://.../files/warning.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; }   There are 3 different images I use but in my views I always see the passed and warning ones (the last two entries of the css). Is there any error in my css?  NOTE: I'm using the displays in Panels, don't know if it's relevant.  EDIT after first answer: I got the css I'm using from the link in this answer. I simply duplicated and in the second part I added the second flag machine name. The problem is that now it ignores the first two blocks of the css.  Thanks!

I'm working on a 'sample request' implementation for a commerce site using , , sessions and a little custom code.  I'd like to add an icon or a symbol to let people know that an item they are viewing has been flagged.  I'm not sure exactly how to approach this, I can imagine perhaps adding a conditional field that displays an image or check box that is then changed by  or ajax, or perhaps something more complicated in JavaScript?  It could really be as simple as adding a checkbox that is checked or unchecked as the flag link is clicked or maybe even changing the css/html on click to be identified as marked.   Anyway, grateful for any advice here.


public static void main(String args[]){     Scanner sc = new Scanner(System.in);      Integer n = sc.nextInt();      ArrayList<Integer> li = new ArrayList<Integer>();      while(true){         System.out.println("Please enter coin value: ");         li.add(sc.nextInt());         System.out.println("Do you want to add more yes/no?");         String answer = sc.next();           if (answer.equals("no")){             break;         }     }     Integer arr[] = new Integer[li.size()];     arr = li.toArray(arr); }

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


I am a dual Australian/British citizen. I have let my Australian passport expire, however due to a change in circumstances in the UK I am looking to return to Australia permanently within the next couple of weeks.  Will I be able to:   board a flight out of the UK on a one-way ticket? be allowed to re-enter Australia with my expired passport   Thanks in advance.

I was going to have to miss my brother's wedding on Jan 4th but he bought me a flight today. But my Aussie passport is expired and was only an emergency passport to begin with. I'm born and bred Aussie, just been away for ten years. I'm hoping to arrive on UK passport, show the expired Aussie one and the wedding invite and my return ticket for two weeks later and hope they understand.   What are my chances? Also planning on going to the Aussie embassy on Monday to see what they say but want to know my chances of just entering on a UK passport.


I recently used sudo apt install on my Linux Virtual Machine to get funny commands like cowsay and Telnet Star Wars and, I was wondering, what does the command actually install from? What does it take the code from?

Okay, I understand how I may use apt-get {install|upgrade|remove} mypackages to install, upgrade, or remove binaries as well as their configuration data files and dependencies (actually, remove will only remove the binaries unless additional flags are provided).  I am not looking for how it is used as the man describes this, but high level what it is doing.  My end goal is to create a means for me to install and manage some custom software (created by a make file) on multiple remote machines, and I need to learn more about the process.  If answers to this question are based on which distribution is used, please tailor to Debian.  In addition to generally how it works, I have the following specific questions:   How does the client that is accessing the apt repository keep track of the files? Must the repository be hosted on the same operating system (i.e. can apt repository be hosted on redhat)? How are the locations to install files specified?  Is this specified by the .deb file? How is a remote machine accessing the repository?  Is it just ftp(s) or http(s)? Is the machine that is hosting the repository running special software (like gitlab for a git repository), or is it just some structured file system?


I want to split a string into parts, to retrieve arguments.  I already made that function:  static private string getparam(string input, int index)     {         string[] arrparams = input.Split(' ');          if (arrparams.Length <= index) return "";          return arrparams[index];     }   But when i pass an argument like:  upload C:\Visual Studio  it will see "C:\Visual" as the first argument and "Studio" as the second and split em.  Now i thought about making something like an exception in the Split-Function: When the argument is given between quotes, it should ignore the spaces in it.  Then, when i pass the arg like this: upload "C:\Visual Studio", the first argument should be C:\Visual Studio  So how could i implement this?   Thank you.

When building console applications that take parameters, you can use the arguments passed to Main(string[] args).   In the past I've simply indexed/looped that array and done a few regular expressions to extract the values. However, when the commands get more complicated, the parsing can get pretty ugly.    So I'm interested in:   Libraries that you use Patterns that you use   Assume the commands always adhere to common standards such as .


According to this , it's possible to add the add the exposure time of multiple images. so i can take 20 pictures with a exposure time 1 second and get the same result as a image with 20 seconds exposure time. can i use (in the first case) the same image 20 times? i'm a bit in doubt of this technique, this would make exposure time obsolete.

I need to take 30 1s exposure shots in raw at night. The image becomes ALMOST black... Is it possible to take this tiny amount of light/information and sum them all toghether and get as a result a single image that equals a longer expoaure? I am not talking about brightening an image, I am talking about summing the single light information of the pictures together. Would that be possible in photoshop? Would the result be any good?


Yesterday I started learning Lightning Web Components on Trailhead, installing the new CLI and updating the VS Code extensions as instructed. I got a pre-release Spring 19 dev org and enabled it as a hub, then created a Spring 19 (apiVersion 45) scratch org, etc.  Now, I'm going back to work on my old project, not LWC, using a previously created scratch org (Winter 19, apiVersion 44). When I tried to push my changes, I got this error:     ERROR:  The configured apiVersion 45.0 is not supported for this org. The max apiVersion is 44.0.   I don't know how to fix this. Not sure if it's simply a config setting I can change in VS Code, or if I have to revert my CLI to a previous version. Help please?

With Spring '19 around the corner, I decided to set up a pre-release org and upgraded my client to 45.x. After playing around a bit, I then went back to work on my actual work projects, and came across an error:     ERROR:  The configured apiVersion 45.0 is not supported for this org. The max apiVersion is 44.0.   Now, I'm not able to do any work in my sandbox! Is there a way I can use the correct API version in each project? For now, I have to switch between installing salesforcedx@latest and salesforcedx@pre-release each time I want to switch modes.


I am new to Ubuntu and just getting started - love it so far!  However, running into an issue with Apache2 and cannot seem to find a solution in this knowledge base (or elsewhere.)  I followed a digitalocean tutorial, where everything seemed to execute successfully and Ubuntu output matched what was noted in the tutorial.  However, all attempts to bring up the Ubuntu apache2 default page result in a time-out.  As far as I can tell, the apache2 service is up and running fine:  :~$ sudo ufw status Status: active  To                         Action      From --                         ------      ---- Apache Full                ALLOW       Anywhere                   22                         ALLOW       Anywhere                   Apache Full (v6)           ALLOW       Anywhere (v6)              22 (v6)                    ALLOW       Anywhere (v6)

I have recently installed a webserver, and port 80 is open. I can connect with 127.0.0.1 and 192.168.0.50, but I can't with my external IP. So, why is this?  I use a router from Ubee.


I'm trying to iterate through a Linked HashMap keySet however I am having difficulties in getting it to work.  Essentially I am searching the keySet to find  a word, and another word. If the second word is immediately after the first word I wish to return true. This is the progress I have made so far.  for (String word : storedWords.keySet()) {          value0++;          if(word.equals(firstWord)){             value1 = value0;         }          if(word.equals(secondWord)){             value2 = value0;         }          int value3 = value2 - 1;         if(value1 == value3){             result = true;             break;         }     }   EDIT:  I've solved my problem and am thankful for all of those who helped. I apologise for making a post when there was a lot of information available on the website however I just lacked the understanding of the logic behind it.

If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it,  what is the most efficient way of going through the map?  Will the ordering of elements depend on the specific map implementation that I have for the interface?


Every so often, Windows 10 Pro 1909 on my Dell XPS 8920 would be unable to open new internet connections. It's been like this for a couple years maybe (so earlier builds of Win10 as well). It usually resumes operation on its own without taking a reboot.  Yesterday I noticed I couldn't navigate the internet while a 4GB/~7Mbps download was in progress. As the downloads goes just fine, I can't have any other use for the internet. I have a 50Mbps link. I paused the download, and internet connectitivity restore shortly after. It might be coincidence.  I opened Resource Monitor and couldn't find anything suspicious, even though I'm not sure I would identify it if anything was there. I tried pinging an IP listed there but it failed. Today, the ping worked.  Tried navigating to my router's admin panel to no avail. That's really odd isn't it?  Notes:   On HOSTS file, I had this entry: 127.0.0.1 local.somedomain.com. somedomain.com could be offline every once in a while. I commented it out now. I don't recall it happening when connected through Ethernet, even though I use very rarely. (it happened just now, I plugged a cable, it took about 30s-1m to identify the Ethernet connection, at this point Internet came back, again, it can be coincidence. okay, internet lost over Ethernet now, I can ping the router but not google.com, internet works on phone) I could use my phone to browse the internet during that time.   PS: This question  is close to what I'm facing, even though here it's not just wifi, Ethernet too.  UPDATE  I thought I'd add another couple issues on other devices, which might be related.   Chromecast older design (have it for about 6/7 years) about 10 meters away through one wall, usually works well until loses internet and is unable to reconnect to wifi. Rebooting router usually brings Chromecast back. I've read it could be a Chromecast issue. Moto Z Play also loses wireless connection. I've read this is somewhat common issue. Never managed to fix, even though it was working fine for many weeks. Issue returned a couple weeks ago.   Also, I don't know how to manually update router's firmware, but I think ISP sends updates regularly. About a month ago, I setup Dynamic DNS (noip.com) on the router, but disable to see if it would help with connectitivity issues. Wireless card still gets a static IP from router.

Symptoms  Internet connection is mostly stable, but will occasionally drop in situations where there is high throughput on the connection, such as downloading large files or streaming video (sometimes it will be stable for hours, other times it might drop a couple times per hour). When this happens, attempting to access the router times out. This usually lasts for up to a minute. As soon as the connection to the router is reestablished the internet access works again without issue.  System   ROG Strix Z370-E Gaming onboard Realtek 8822BE Wireless LAN 802.11ac PCI-E NIC 5 GHz channel WiFi connection Windows 10 (Version 10.0.17134 Build 17134) Google Fiber router GFRG200   Troubleshooting  I've had this problem for over a year at this point. It started on my previous PC build based on P8Z77-V with A7000 WiFi USB Adapter when I had to switch from an ethernet connection to wifi. The new system has this problem with both the onboard wifi adapter and with A7000. No issues when connected to the router via ethernet. Tested also with two different laptops (Windows 7 and a macbook) and smartphone and the issue does not reproduce there. I've tried several different drivers for both adapters, the latest today with 2024.0.4.102 driver for the onboard adapter.  The router is within 10 feet of the PC with no obstructions in between. Looking for interference with Wi-Fi analyzer doesn't indicate much congestion on the 5GHz frequency. I've also tried changing the channels with no effect.  I recorded a session of this happening while streaming from Twitch with Wireshark and nothing really stands out in the recording other than a number of TCP Dup ACKs before the connection is lost.  What would be some further steps to take to narrow down the cause?


Over the past week or so, I've been trying to create a bootable USB on Xubuntu for Windows. It seems like everything has more or less been unsuccessful, with varying degrees of success.   Using the dd command doesn't make the .ISO file bootable on the usb, and UNetBootin isn't able to create windows bootable USBs. I've tried to run Wine to run Rufus, a program that creates bootable USBs on Windows, but it was unable to find my USB while it was mounted. I've tried CrossOver to install a multitude of ISO burning programs, but none have worked so far. I'm at the end of my rope,  and I'm wondering if there's anything else I should be doing or something I may have missed.   I am running Xubuntu 16.04 LTS.

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


If Isaac Newton believed that light is a particle, then how did he explain the interference phenomena?

What was Newton's own explanation of ? Newton advocated a corpuscular theory of light, but his rings would most conveniently be explained by a wave theory. How did he explain his own discovery?


I require help to understand this question, which is in my exercise list:     A group of n $ \ge $ 2 badminton players play a round-robin tournament   (i.e. everyone plays against everyone else once). Each game ends in   either a win or a loss. Show that it is possible to label the players   $ P_1 $, $ P_2 \cdots $, $ P_n $ in such a way that $ P_1 $ defeated   $ P_2 $, $ P_2 $ defeated $ P_3 \cdots $, and $ P_{n-1} $ defeated $ P_n $.   Supposedly, it is supposed to be proven using mathematical induction. But I don't see how induction can be used to solve this. Could someone please advise me on how to go about proving this problem?

A tournament is a directed graph with exactly one edge between every pair of vertices. (So for each pair  (u,v)  of vertices, either the edge from  u to  v  or from  v  to  u  exists, but not both.) You can think of the nodes as players in a tournament, where each player has to play against every other player. The edge points from the winner to the loser of a game.  A Hamiltonian path (not cycle) is a sequence of consecutive directed edges that visits every vertex exactly once.  How can i prove that every tournament contains at least one Hamiltonian path? thanks your help!


I hope this makes sense. If I have an object:   var a = {"minlength":true}  var a = {}   How can I tell if the object is empty (the second line of code)

I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject["firstname"] = "Gareth"; myObject["lastname"] = "Simpson"; myObject["age"] = 21;


I am utterly shocked of what I am seeing here:  Reason 1: I have sent a family tree proving that I and my cousin are related, he's from the family household so technically my father is his uncle and I am his cousin,but he's way older than me so on the invitation letter he referred to me as his nephew , still this is completely irrelevant because they could've called me or him and they'll easily see that I'm technically his cousin but the age gap (I'm 21 and he's around 57 which a copy of his passport that I provided shows) makes it completely obvious that is not a reason for a refusal!   Reason 2: I have said in the application form that I spend 180£ as a student which I neatly calculated and it is this low because DZD(Algerian dinar) to GBP is so disproportionate and I've mentioned that I live with my family AS THEY ASKED ME in the application so the cost of living for me is to be way too low in comparison with a student that lives alone.  Reason 3: I have provided a certificate of registration + a certificate of scholarship that I received from the university administration, that should be enough to prove that I am indeed running courses and exams, why would they suspect something like this ? I am not some fool that will try to lie about what I'm doing, I worked hard to be in this speciality(med school) and I'm not willing to live as an out-law in some cold country!  Reason 4: I have provided tremendous amount of financial circumstances about everything that you can possibly think of and this is the final nail in the coffin that this refusal letter is completely biased, and if you think that I'm lying please do ask for pictures of the translated documents.  If I can't be convinced that this is a legit refusal letter and not some bad joke, my uncle(TECHNICALLY COUSIN) said that he will sue them for being so unfair.  If it is because of the current state (political) of the country then they should've mentioned it because everything is going all well for now and we will not destroy our country like others did by military brute force or taking arms against the government, Algerian people did it in the 90'ees and they paid it with their blood and wont redo it, therefore i'm not seeking to overstay at any country I wish to visit.

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


Consider  <_2017-05-15 type="Double">-1.920992100000000E+05</_2017-05-15>   How can I treat <...> as a delimiter when attempting to split this string (in order that I can pull out the number -1.920992100000000E+05?  I tried <.*> (and even \\<.*\\>) but that is a match for the whole string.  For what it's worth, I'm using Java.

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


class insertionSort {     public void print(int arr[])     {            arr[0]=999999999;     } }  public class Sorting  {     private  int[] arr=   {0,56,8,75,45,21,68,9,54,2,65,87,52,65,8,5,20,0,2,2};      public static void main(String[] arg)     {         Sorting sort = new Sorting();         insertionSort inSort = new insertionSort();         inSort.print(sort.arr);         System.out.println(sort.arr[0]);     } }   Although Sort.arr is a private variable , why  inSort object is able to manipulate arr[0] ?  I know the parameter is passing by reference or address.  In a function how can I pass by value ?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Bought iphone 5s and it's previous owner  removed icloud account on it.   I created my own icloud account and associated with it.  Everything is ok, but when i insert a sim card, it requres me OLD icloud credentials (one which was used by previous owner).   If i enter my own credentials it says : "this account could not be used to activate phone".   If i remove sim, turn phone on, and enter my credentials it works fine.  What could i do ? (rather than contacting old owner who is remote)  I'm not searching for any illegal (ticks or hacks) about bypassing Icloud.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


Problem: Find all distributions $f$ in $\mathcal D'(\mathbb R^2)$ so that $xyf=0$ and $(x^2-y^2)f=0.$ My Thoughts: Note that $c\delta_{(0,0)}$ where $c\in\mathbb C$ satisfies the distributional equations above. It appears that $\operatorname{supp}(u)=\{x=0\}\cap\{y=0\}=(0,0)$ which would imply that $u$ is a finite linear combination of $\delta_0$ and its derivatives. Is my reasoning on the right track? Apologies if I am not showing enough details, I am trying to make sure that my intuition is on point. Thank you for your time.

The question asks us to classify all distributions in $\mathbb{R}^2$, say $u$, such that $$(xy)u(x,y) = (x^2-y^2)u(x,y)= 0.$$ I am genuinely stuck, any help is extremely appreciated.


I know that on the  on your user profile that it will round up your rep points to the nearest hundred. But I have just noticed that it is now rounding my rep up to 2.7k when I actually only have 2,483 on the site that it is meant to be getting my rep from. Here is a screenshot of what I mean by where it rounds it:  I have also noticed that in the chat (and I think that this is the reason for why it is rounding it up to 2.7k) it thinks that my rep is:  But on no site do I have this much rep, so why is it showing up as this?

I was just chatting on the Ask Different chat - and the reputation numbers for me and the others chatting don't seem to match any other reputation count I can see on the sites here.  Is there some calculation being made? These numbers are the highest of any other combined reputation I have seen. For me - I'm listed over 10k - but no other aggregate reputation counter I can see is above 8k.  Perhaps I'm unaware how reputation is calculated, but the people there suggested a bug report in case this isn't intended.  (after three lines of text are drawn - a number shows beneath our icons in the left hand side)


OK. So I've learned how to make bread. Here is my technique:  Get unbleached, natural, unenriched flour.  Around 4 or 5 PM. Take a large bowl. Mix 3 cups of flour, 1 1/2 cups of water, a small amount of yeast (say, half of one of the "Fleischmann's" packets) and a pinch of salt. Cover with plastic wrap. The next day at 5am, warm oven to 450 F with (say) a casserole dish. Take the mixture out of the bowl and make it into a ball on floured paper. When the oven's hot, put the ball in the casserole dish and cover tightly with foil. After 30 mins remove the foil, give it another 10 minutes to crisp up.  Do this every day for a few weeks. I can make bread!  Result is fantastic.  I prefer a whole grain flour.  OK. So it's great to add either (a) raisins and/or (b) dark chocolate morsels in to the mix. (Seems to be no difference if you mix them through in the morning or at first.) The result is fantastic.  My question. I want to add in some "grains". I love heavy, "German-style" if you will, "multigrain" breads.   Do I have to - say - cook - steam? - or something? Hammer? Air? Deep fry? ....  the "grains" first?  Or do I just put them right in? What's the deal on that? Is there anything I should particularly change when throwing in grains? So, you experts may say something like: "Everyone knows you then need much more yeast" (just an example). Should I be aware of anything like that? Should I mix them at first when I mix the flour/water, or only mix them through in the morning?   Are the "grains" in "multigrain" bread "just sitting there" - as if you'd scattered some diamonds through the bread, there's no chemical difference - or are they affecting the bread?  What's the deal?  How should I take my first step towards that "heavy, multigrain" feel?  Thx

I have a plethora of whole grains (barley, rye, wheat berries, kamut, spelt) sitting around my kitchen, and I'm getting bored with soups and salads.  Is it possible to use these in bread (yeast, preferably, but quick/tea breads are also okay)?    If so, what are the best approaches/ratios?  Should I cook them first?  Let them sprout?  Pointers to recipes would be greatly appreciated.


Let $A$ be a square matrix of order 2 such that $AA^T=I$. If $\det(A) < 0$, find $\det(I+A)$.  I managed to find $\det(A)$ which is $-1$, but I do not know how to proceed from here. Help is much appreciated.

Given a real valued matrix $A$ that satisfies $AA^{\top} = I$ and $\det(A)<0$, calculate $\det(A + I)$.  My start : Since $A$ satisfies  $AA^{\top} = I$, $A$ is a unitary matrix. The determinant of a unitary matrix with real entries is either $+1$ or $-1$. Since we know that $\det(A)<0$, it follows that $\det(A)=-1$.


Would our ranger roll his Hunter's Mark damage twice on a critical hit? I believe our rogue rolls his stealth damage twice on critical strikes so it doesn't seem far-fetched.

I'm a bit confused on how extra damage works for critical hits. Let's take the following example: A thief with sneak attack rolls a crit. I'm under the impression he rolls double his normal attack damage dice AND double his Sneak Attack damage dice. Is this accurate? Another example, I finished DM-ing my first campaign recently. The Giant Spider enemy monster has an melee attack that causes a constitution saving throw. If the player fails, the enemy rolls an additional 2D8 of damage. In this situation, if there was a critical hit, and the player failed their saving throw, would I also roll double dice on the additional damage? Or is that considered a separate attack?


I want to make a copy of a MySQL database but preserve the information_schema.create_time for each of the tables. I haven't been able to find an option to do that with mysqldump.

Does mysqldump preserve the create_time and update_time attributes that are output by show table status from?  If not, is there an option that does this?   it looks like mysqldump preserves this data if you export to XML. EDIT: Well the data is included in the export. Whether it's read in at the other end I'm not sure.  Is there a way to do this with a normal .sql dump?


In java, why is the value of log(3)243 not 5 but 4.9999999  public class Log{ public static void main(String[] args) { for(int i=3;i<7652;i=i*3) System.out.println(i+"    "+Math.log(i)/Math.log(3)); } }   The output for the following code is:  27    3.0 81    4.0 243   4.999999999999999 729   6.0 2187  7.0 6561  8.0

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