I'm doing some practice tasks for uni and I'm supposed to create static int field inside a class, but when I do so I get error LNK2001. When I change it to regular int the error does not occure. Can anybody help me please? Here's my code:  #include <iostream> #include <string>  using namespace std;  class Uczelnia { public:     virtual string getName() = 0;      static int liczba_wszystkich_studentow;  };  class Politechnika:public Uczelnia { public:     Politechnika(string a, int b) {         nazwa = a;         liczba_studentow = b;         liczba_wszystkich_studentow = +liczba_studentow;     }      string getName() {         cout << "Politechnika: " << nazwa << endl;         return nazwa;     }      ~Politechnika() {         liczba_wszystkich_studentow = -liczba_studentow;     }  private:     string nazwa;     int liczba_studentow; };  class Uniwersytet :public Uczelnia { public:     Uniwersytet(string a, int b) {         nazwa = a;         liczba_studentow = b;         liczba_wszystkich_studentow = +liczba_studentow;     }      string getName() {         cout << "Uniwersytet: " << nazwa << endl;         return nazwa;     }      ~Uniwersytet() {         liczba_wszystkich_studentow = -liczba_studentow;     }  private:     string nazwa;     int liczba_studentow; };    int main() {     Politechnika p1("Warszawska", 200);     p1.getName();      Uniwersytet u1("Warszawski", 600); }

What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this?


Using 2 triangles each with base of 8 and height of 3, and 2 trapezoids with heights of 3 on top, 5 on bottom and height of 5, these four figures can create an area with 64 units squared. However, when rearranged as a rectangle with 13 x 5=65, one additional unit squared seemed to have been created. How is this possible?

Below is a visual proof (!) that $32.5 = 31.5$. How could that be?    (As noted in a comment and answer, this is known as .)


In my book they've been switching the way the declare arrays between the following two methods:      int array1[] = {1, 2, 3};     int[] array2 = {1, 2, 3};   I was wondering what the difference was between the positioning of the two brackets, and why is it that when I put the brackets after the name (such as in array 1), why I must either initialize it to a set of values or a new array, but in array2, I can simply say "int[] array2;" and then use it later...?

I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?


There is no problem if a singular subject is having one or more objects.  singular-singular:     The student sat down on his seat.   singular-plural:     The student looked at his books.   There is also no problem with multiple subjects having multiple objects.  plural-plural:     The students had to compile a list of their books.   But what is the proper construct in the plural-singular case?  Variant 1:     The students opened their book.   Variant 2:     The students opened their books.   (In case we are trying to describe that each student opened exactly one of their books.)

In a situation where say a group (or at least a plurality) of men is being addressed — for example on a sign passed by many married men — which is correct?  "Remind your wife."  or  "Remind your wives."


The world is frozen as the long-term result of an invention that allows the conversion of heat to electricity. Thew few survivors each live alone; there aren't as many women as men, so the main character in this story has what amounts to a time-share arrangement with a woman. When he meets her for his year with her, she has a remarkable story to tell about a visitor from space, an alien who has come to warn the inhabitants of Earth to stop using the energy convertor. The planet's libido, he says, is nearly 1. "What?" he asks. "You mean its albedo?" Yes, she replies, it might have been something like that. Where is the alien now, he asks. In the freezer, she says. A few flakes of oxygen fall from the sky.  I read this story in English in an anthology published by the 60s or 70s.

More than a decade ago, I read a short story about a small group of people at the end of the world. The story was premised on some sort of mass-produced device which took ambient heat and turned it into power. The devices had been overused, and now the world was freezing.   I think the people were essentially bandits; the main character may have been a woman who lured men to her house and killed them for their body heat? There was also a strong implication that one person she had done this to was an alien who had come to warn that the devices were destroying the world.  I think the story was in a hardbound collection, and I think the collection was from the late 70's or very early 80's.  (Calling it a "short story" is just meant to distinguish it from a full novel — it may have actually been a novella or similar.)


I am going to Europe this August and wish to apply for visa from Dutch consulate in May. I have recently started looking out for the bank balance I need into my account.  I have understood that I shouldn't add lot of money into my account otherwise it could be considered as funds parking, but to this I want to check , can I not add surplus cash I have with me of around 75K INR to my account ?  Also generally my wife transfers me some money from time to time, like I've paid for her flight tickets and she will transfer that amount to me. Will transfers within my family also cause an issue?  Lastly if these transfers cause an issue then how can I convince the visa authorities that it is actually my money being deposited and my wife whose transferring for money to me why she owes me.  P.S, it's almost 3 months left for my visa, if I do add the money now and it stays in my account for 3 months and I hope it's not considered as funds parking.

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


I have a seemingly simple problem that's been bugging me for a while now. I have installed wine at some previous point, and I am offered to choose from shortlist, when I right click a suitable program, to run it by Wine. However, there are newer versions available from the one that I am offered. I would like to uninstall this version, and instead use a new one. However, it is NOT installed as software package, which impedes solution. Where do I go from here?

I recently ran the iTunes 10 installer in Wine and everything seemed to go well. Then, when I tried to run it, it would constantly crash/and the appearance would be glitchy. After looking at the Wine website, it turns out that iTunes 10 has a 'garbage' rating of Wine compatability.  Now I'm trying to remove/uninstall iTunes, QuickTime, and the other applications that come default with installing iTunes (such as Bonjour, etc.). However, when I run the 'uninstaller' that wine provides for the programs, it instead executes what appears to actually be the original installer! I've tried deleting all the configuration/data files in my Wine's file-system, but to no avail.  Any help is greatly appreciated!  Edit1: After re-running the uninstall process and then rebooting, the program (iTunes 10) still remained installed.


I am trying to convert a string into time format. As I read here on stackoverflow, the discussion of converting a string into time format. The function strptime() has been used for the same. I am also using the strptime() in my program in C, in windows. I tried to copy the open source strptime code from the following link in my program, but there are too many headerfiles missing. I created those headerfiles too, but still the code is not working and giving many warnings.  Please help.    Thanks much.

Is there a good equivalent implementation of strptime() available for Windows?  Unfortunately, this POSIX function does not appear to be available.   - summary: it converts a text string such as "MM-DD-YYYY HH:MM:SS" into a tm struct, the opposite of strftime().


How can I subtract on datefield from another and get result in integer?  Like 11.05.2015-10.05.2015 will return 1  I tried  entry.start_devation= each.start_on_fact - timedelta(days=data.calendar_start)

If I have two dates (ex. '8/18/2008' and '9/26/2008'), what is the best way to get the number of days between these two dates?


My group's adventurers just went and got themselves captured and enslaved by a city-state that runs Roman-style gladiatorial deathmatches. They're in the dungeons under the arena, across the hall from their soon-to-be opponents and reigning arena victors, a band of brutal orcs.  I want the orcs to attempt to indimidate the party, but can't figure out what the opposed check or DC should be for each character. An intimidation vs. intimidation contest-type roll doesn't make sense unless the characters decide to use the same tactic (which they likely won't).  In addition, if the intimidation check is successful, what should the resulting effect be in the upcoming battle? The frightened condition seems a little harsh, but I suppose it would work for a very successful roll.  I'm all for preserving player agency, but am of the opinion that becoming intimidated doesn't fall within those boundaries, i.e., I don't think they should have any more say over what scares them than they would on the day's weather.  Another way to rephrase my question (which I don't see adequately answered in similar questions) is: how is the Orc's +2 to Intimidation skill supposed to work in the game mechanically, and what are the range of effects?

During our last play session (it was our second session, so everyone is first level) my fighter dwarf had a conflict with another player's human fighter. My dwarf became annoyed at the human's dismissive reaction to a roar outside the village that sounded like ogres (my dwarf has a bad history with ogres).   So, in order to emphasize the seriousness of this situation, my dwarf grabbed the human by shirtfront and pulled him closer (done with a successful roll). Still bent double, the human drew his sword and pointed it at my dwarf's belly (dwarf wearing chainmail). At this point the DM made the other player roll an Intimidation (Charisma) check, and me a Wisdom check to resist. I lost and my dwarf, chastened, let the human go.  That was pretty funny situation, but one thing is bothering me. By using a Wisdom check against Intimidation (Charisma), my dwarf (who has −1 Wisdom modifier) was at a disadvantage (literally, not in the D&D disadvantage mechanic sense) against the threats. Although he is a strong and capable warrior, he is not that wise.  But I have to wonder: is willpower really represented by Wisdom in 5e? I think that many not-so-wise creatures/characters can stand bravely against threats.  What ability/skill should be used in a contest to resist intimidation?


On Firefox 29.0 when I visit , the browser comes to a grinding halt and does not recover. On Chrome 35.0.1916.153 when I visit the same page the tab also grinds to a halt permanently until closed. In both case the page loads, then the syntax highlighting loads, then at some point after that it freezes, pegging the CPU at 100%. This problem is 100% reproducible, for me at least. I was working on the query and it was fine with an occasional unresponsive script. Then I created a permalink and the problem has been happening since. Ubuntu 12.04 LTS 64-bit I have no plugins or add-ons for either browser.

I wanted to run a  query to return a large amount of data so I could export the lot to CSV. Problem is, the page is crashing my machine - the query triggers graphing, and the graphing code can't handle the data!  This screenshot of the insane graph was just barely obtained by another user:   I'm currently unable to modify the SQL as it kills the browser (latest Chrome on a Mac). EDIT Initially I thought it was simply due to the amount of data and perhaps that pagination would help, however the comments (thanks guys!) have uncovered that it was the graphs being drawn.


Given $E,F$ vector bundles over a manifold $M$, I would like to know a proof of $\Gamma(E\otimes F) = \Gamma(E) \otimes_{C^\infty(M)} \Gamma(F)$. Where $\Gamma$ denotes the smooth sections over $M$. Thanks

This question is similar to      and    except that I am concerned with smooth manifolds. If $M$ is a smooth manifold and $V$ and $W$ are (smooth, real) vector bundles on $M$, are there reasonable conditions that ensure that the map $\Gamma(M,V)\otimes_{\mathscr{O}_M(M)}\Gamma(M,W)\rightarrow\Gamma(M,V\otimes W)$ is an isomorphism? Equivalently, are there any reasonable conditions under which taking global sections of finite locally free $\mathscr{O}_M$-modules commutes with tensor product?  I don't really know much smooth manifold theory, and my intuition is mostly derived from algebraic geometry, where the analogous question, as is indicated in the questions I linked to, is not a simple one, even for invertible sheaves. I'd always assumed the situation for smooth manifolds would be the same, but I was just looking at the Wikipedia page on vector-valued differential forms, and it seems (unless I'm misunderstanding which is certainly possible) to claim there that for $V$ an arbitrary vector bundle and $W$ the $p$-th exterior power of the cotangent bundle, $p\geq 1$, the answer to my question is "yes," with the justification being that "$\Gamma(M,-)$ is a monoidal functor." Looking at the definition of a monoidal functor, it seems to me that all this implies is that there is a map from the tensor product of the global sections to the global sections of the tensor product (which is clear from the definitions) and not that this map is an isomorphism.


I have laptop 8440p and it has two DDR3 Ram one ram max bandwidth is PC3-8500F 533 Mhz but the  other has PC3 10700 (667 Mhz) what is the effect on the laptop performance and the parts of the laptops like HDD, Processor etc

I have two RAM sticks: one 533 MHz and one 667 MHz. Is it safe to use both of these in the same system?


Supose that $f\colon [0,1] \rightarrow \mathbb R$ is a continuous function. Show that: $$\lim \limits_{n \rightarrow+\infty} \int_{0}^{1}{f(x^n)dx}=f(0)$$  I'm studying the Riemann Integral theory and I have not idea to how do this. I need some hint to start because I do not see how to apply the Riemann sum or other theory concept to be able to help me.

$$\lim\limits_{n\to\infty} \int_{0}^{1} f(x^n)dx = f(0)$$  when f is continuous on $[0,1]$  I know it can be proved using bounded convergence theorem but,  I wanna know proof using only basic properties of riemann integral and fundamental theorem of calculus and MVT for integrals ...   Thank you.


It's about permission. 1)May I use your phone, please? 2) could I use your phone; please?

What is the correct sentence when asking for something like while flying asking for a glass of water :     May I have a glass of water     or      Can I have a glass of water


I'm tempted to delete the first paragraph of this question:       I'm about to dive in head first to creating a Javascript web app. I'm not a Javascript novice, I know my way around, this is just a best practice question. I have done some research on the topic and just wanted to hear what SO had.   The answer to this question does not depend on the user's background. It's just some irrelevant stuff to read before the real question begins.  Acceptable?

starts with      I know that this isn't the first post with this problem, but I am   stuck with this for a day (total, not 1 day in a row). Somehow I can't   get this to work, maybe it is just 1 little adjustment that I need to   make, but I can't seem to find it :(   I'm sure the question , both for immediate answering and for people later having the same kind of problem.  But I'm afraid removing it might be considered rude by the asker as he might see the question with the introduction both more humble and more accorded to his personal writing style (especially in a case where the code follows immediately after this introduction).  Should I proceed and remove this lengthy useless introduction or just not bother ?


My CKEditor seems to remove formatting in a table when I switch from plain text editor back to rich text editor even though the additional formattibn was added in the rich text editor - it seems to persist whenb I switch to plain text but gets removed when I go back to rich text - I have tried around and Disabled the ADVANCED CONTENT FILTER under /admin/config/content/ckeditor/edit/Full but that did not seem to help,. How can I get my changes to persist even past text editor style switches?  EDIT 1  My configuration under /admin/config/content/formats/full_html looks like below but it still doesn't seem to work correctly (yes, I also cleared my caches):   and I selected Disabled /admin/config/content/ckeditor/edit/Full - ADVANCED CONTENT FILTER  EDIT 2 Now after all these changes , on another page my content doesn't seem to properly display anymore: link  problem: under
 I have a colorbox image declared:

 and it wouldn't show up anymore in HTML and I have no idea why...

I would like to have a page with some html content in it that CK Editor does not seem to support, in particular: I want to have a little <form tag with a couple of <input fields. I can enter it in Switch to plain text editor mode and save from there and it will keep the elements but when I want to edit the page, it'll go back to the Switch to rich text editor and remove my <form html items. How can i set CD Editor to not remove any html it may not be able to render?  Thank you!


I would like to get email notifications when someone submits a new questions to a specific community. I have not found a setting for this in my group profile page.  Is this possible?

Is there a way to configure your Stack Overflow account so that you receive notification emails when posts are made to specific tags?    Or do you simply have to log on to see new posts?


please tell me where to put ubuntu-12.04.3-desktop-i386(i have downloaded it manually) i have mounted the ubuntu iso file on F:

I would like to see a full how-to guide on how to install Ubuntu.


How do I kill Golem in Pre-Hardmode? I already know how to get into the Lizahard temple. Once I was inside I summoned Golem with the Lizahard power cell, but he has 10000+ health.  What is the easiest way to defeat him?  In this picture it shows I have gone to the temple in Prehard mode.

I was wondering of it is possible to kill the Golem pre-hardmode. If so please tell me how to do so and what kinds of gear you need to kill it (accessories, armor, weapons, arena prep). Thanks for the help.


So, I wanted to know if it was possible to mask a running program (not visible from task manager) from the command line. Also, can I see all programs, hidden or otherwise from the command line?

How could you launch a process and make it invisible to the top command? The process is started by a normal user (not root), and should not be visible to other normal users.


For all positive integers $a,b$, given $a^b - b^a = 3$ Find all possible values of $a$ and $b$  I tried to simulate this using a program and found the one fit $a = 4$ and $b = 1$.  Would love to see a Mathematical solution for it.  Please help.

Find the integral solution of $$a^b -  b^a = 3$$ I am a student of class 10 and got this question in a maths competetive exam.  I have tried converting into a log equation in one variable, or solve it by using parity but couldn't solve it.  Thanks in advance


According to this chart of the Lorentz factor as a function of speed:     If a spacecraft neared (roughly) 0.85c, would it appear to be traveling at 1.7x the speed of light from the perspective of those on board - i.e. covering 0.85c distance, but in half the time amount of time?

Let's say we have $2$ particles facing each other and each traveling (almost) at speed of light.    Let's say I'm sitting on #$1$ particle so in my point of view #$2$ particle's speed is (almost) $c+c=2c$, double light speed? Please say why I am incorrect :)    EDIT: About sitting me is just example, so in point of view of #1 particle, the second one moves at (almost) $c+c=2c$ speed?


So I just downloaded 2.71 (YAY!) and tried the super-handy "copy previous settings" option on the splashscreen...  ...but Blender froze (prolly cuz I had another instance open at the time). No worries, I'll kill it and try again...  ...except it's not on the splashscreen anymore. Well (says I) it's gotta be somewhere: space "copy prev..." yup! There it is!  ...But it throws the error: "[such-and-such-directory]/Blender/2.71 exists!"  ...Well, I guess I can delete the existing directory (and whatever record it had) and just re-extract...  ...But it still remembers!  So the question is, how do I get Blender to copy the previous settings, if it thinks it already has?

I constantly stay up to date with each new release of Blender, but this means my preferences are wiped clean each time. How do I export/import these preferences to avoid loosing my carefully crafted set up each time?


that's awful. The time left to edit my own comments is absolutely not enough. Why should it be, that 8 minutes after I have written something, I cannot edit my own text? It happened already several times that something turns me away (the colleague asking an urgent question, a phone call etc.) and then I have a text which is incorrect as it is, and I have no power to change it. This should be changed! Each of us must be an owner of his own words.

Bravo for allowing comment editing, but what's the explanation for enforcing a five-minute window?  I think this might be over-engineering. If I have a spelling mistake or an inaccuracy I'd like to fix, I don't think the fact that five minutes has elapsed should prevent me from fixing it.  Further, if you are worried people will edit their comments in a way that makes the comment thread nonsensical, they can already do this by deleting their comment. So, limiting the ability to edit isn't really helping much in that regard.  Update  If people don't like this idea, I'm definitely open to hearing your reasons. For now, it seems like an unnecessary limitation of a quite awesome feature.  Update 2  Regarding John's scenario...     Me: Obama is cool!   You: You are right, man!      My edit: Obama is an idiot!   You: You are right, man!   ...this problem can still occur with deletions...     user1: Obama is cool!   user2: No, McCain is cool!   you: You are right, man!        user1: Obama is cool!   ---- deleted -----   you: You are right, man!     So, yes, editing could be abused as you suggest, but discontinuities can occur already because of deletions (and as someone else mentioned, because upvoted comments get prioritized upward).  As for Jeff's argument about rate limiting, I agree that is important, but I don't understand why you can't just use a CAPTCHA to prevent too many edits in a short period of time.


I'm facing some problems with my code in C++. I would like to know how can I discover the amount of elements in an array. Follow the code:  #include <iostream> #include <cstdlib>  using namespace std;  int avg(int numbers[]){     int amount; // The problem is in. How can I discover the amount of elements in an array?      int sum = 0;     for(int i = 0; i < amount; i++){         sum += numbers[i];     }      return sum / amount; }  int main(){     int q;     cout << "Type number of integers:" << endl;     cin >> q;      int numbers[q];      for(int i = 0; i < q; i++){         cout << "Type an integer value for number " << i+1 << ":" << endl;         cin >> numbers[i];     }      cout << "The average is " << avg(numbers) << endl;      return 0; }

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


the borders of the colored cells disappear in low size and appear when zooming in. Here is my code  \documentclass[12pt, fleqn]{article} \usepackage[portuges]{babel} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{colortbl} \usepackage{hhline}   \begin{document}  \begin{table}[ht] \centering \begin{tabular}{|c|c|c|c|c|} \hline \rowcolor[gray]{0.8} A & B & C & D      & E\\                              &          &       & number1 & number2\\\hline                           10 &       20 &    30 &         20 & 10\\                              &          &    15 &            &  8\\\hline \end{tabular} \caption{} \end{table}   \end{document}   I want the upper horizontal line to appear. But the result is as shown here..   i know it is a duplicate question , but the solutions provided didn't solve my problem.

still working on that table. Here's my new question reguarding the table borders:  It appears, that i do something wrong setting boarders. Here is my code, and a screenshot:  \documentclass{article} \usepackage{multirow} % Used for the vertical cells \usepackage{rotating} % Used for the vertical cells  \usepackage{xcolor} % Used for cell-colors \usepackage{colortbl} % Used for cell-colors  \usepackage[a4paper]{geometry}% Used to set the pdf margins manually \newgeometry{left=2cm,bottom=0.1cm}  \definecolor{grey}{HTML}{F2F2F2} % Define grey for the cells \definecolor{red}{HTML}{FF0000} % Define red for testing  \begin{document} \scriptsize % Use a small font size  \begin{tabular}{|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0,6cm}|}  \cline{10-17}  \multicolumn{9}{|c|}{} & \multicolumn{2}{p{\dimexpr (0.6cm)*2+2\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Work to retired ratio} & \multicolumn{4}{p{\dimexpr (0.6cm)*4+1\arrayrulewidth+2\tabcolsep\relax}|}{Health care sizing (per thousand)} & \multicolumn{2}{p{\dimexpr (0.6cm)*2+1\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Inverse dependency ratio}\\\cline{3-9}  \multicolumn{2}{|c|}{} & \multicolumn{4}{c|}{\cellcolor{grey}Population (mio.)} & \multicolumn{3}{c}{Workforce (1000)}  & \multicolumn{2}{|c|}{\cellcolor{grey}} & \multicolumn{2}{l|}{Physicians by} & \multicolumn{2}{l}{Nurses by} & \multicolumn{2}{|l|}{\cellcolor{grey}Old agers by}\\\hline  \multicolumn{2}{|c|}{} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Overall}\end{sideways} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Young age}\end{sideways} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Working age}\end{sideways} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Old age}\end{sideways} & \begin{sideways}\parbox{4cm}{Overall}\end{sideways} & \begin{sideways}\parbox{4cm}{Physicians (Proj: 2025)}\end{sideways} & \begin{sideways}\parbox{4cm}{Nurses (Proj: 2030)}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}Working age by Old age}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}Work force by Old age}\end{sideways} & \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} & \begin{sideways}\parbox{4cm}{Working age}\end{sideways} & \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} & \begin{sideways}\parbox{4cm}{Working age}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 physicians}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 nurse}\end{sideways}\\\hline  \multicolumn{2}{|l}{USA} & \multicolumn{4}{l}{\cellcolor{grey}} & \multicolumn{3}{l}{} & \multicolumn{2}{l}{\cellcolor{grey}} & \multicolumn{4}{l}{} & \multicolumn{2}{l|}{\cellcolor{grey}}\\\hline  1990/1 & & 248,6 & 71,3 & 146,1 & 31,2 & 127.500 & 615,4 & 1491,6 & 4,68 & 4,09 & 4,83 & 4,21 & 11,70 & 10,21 & 50,7 & 20,9\\\hline  1 & 2 & 3 \\\hline  \end{tabular}  \end{document}     On 1 the Top border of Population is not visible although i did used \\\cline{3-9}\cline{12-17} on that line.  In 2 both borders are pushed a bit to the right for no reason i can see.  And in 3 again the top borders are not visible despite using \cline{10-17} on that line. What did i do wrong?  Thanks!


I love using libertine font in my document. It looks nice and clear when compiled using pdflatex. But I got different result when compiled using xelatex. It seems to be a slightly bold in my screen. Is there any chances to get it nice and clear result in xelatex? thanks. // ps: I'm using TeX 3.14159265 (TeX Live 2014), texmaker 4.1 under ubuntu linux 14.04 lts.  \documentclass[12pt,a5paper]{memoir} \usepackage{libertine} \usepackage{lipsum} \begin{document} This is normal text, \emph{emphasized text}, and \textbf{bold text}.  \lipsum[1-4] \end{document}       Update #1: here's screenshot from the properties menu of the PDF viewer (Evince). Both pdflatex and xelatex use \usepackage{libertine}.    Update #2: ...and this is when using \usepackage{fontspec}\setmainfont{Linux Libertine O} with xelatex (as @jason-zentz's ).

When I manually specify the Linux Libertine O font types fontspec should load, the bold type is significantly bolder than when I load the exact same font family as a system font.  MWE:  \documentclass{article} \usepackage{fontspec} \setmainfont % load font from path     [         Path = C:/Windows/Fonts/,         Extension = .otf,         UprightFont = LinLibertine_R,         BoldFont = LinLibertine_RB,         ItalicFont = LinLibertine_RI,         BoldItalicFont = LinLibertine_RBI,     ]     {libertine} \newfontfamily\libertinesystemfont{Linux Libertine O} % load font from system font  \begin{document} \LARGE{\textbf{A large heading in bold type}}  \textit{ABC\textbf{\underline{V\char"0306}}DE}.  \libertinesystemfont{ \LARGE{\textbf{A large heading in bold type}}  \textit{ABC\textbf{\underline{V\char"0306}}DE}. } \end{document}     Peeking into my .log file, I cannot detect anything that would explain why these font types look different:  ................................................. . fontspec info: "defining-font" .  . Font family 'libertine(0)' created for font 'libertine' with options [ Path . = C:/Windows/Fonts/, Extension = .otf, UprightFont = LinLibertine_R, . BoldFont = LinLibertine_RB, ItalicFont = LinLibertine_RI, BoldItalicFont = . LinLibertine_RBI, ]. .  . This font family consists of the following shapes:  [...]  . * 'bold' with NFSS spec.: . <->"[C:/Windows/Fonts/LinLibertine_RB.otf]/ICU:script=latn;language=DFLT;"  [...]  . * 'bold italic' with NFSS spec.: . <->"[C:/Windows/Fonts/LinLibertine_RBI.otf]/ICU:script=latn;language=DFLT;"  [...]  . Font family 'LinuxLibertineO(0)' created for font 'Linux Libertine O' with . options []. .  . This font family consists of the following shapes:  [...]  . * 'bold' with NFSS spec.: . <->"Linux Libertine O/B/ICU:script=latn;language=DFLT;"  [...]  . * 'bold italic' with NFSS spec.: . <->"Linux Libertine O/BI/ICU:script=latn;language=DFLT;"


I've applied smooth shading and auto smooth to this sphere shape, and when I apply the subsurface modifier I'm getting artefacts on top of the sphere. Ive tried adding loop cuts, and also deleted the top faces and did a grid fill but only made it worse. How can I fix the sphere not to have that weird pinching on the top?  Thank you.

When I create a UV sphere and add the subdivision surface modifier, the following wrinkle appears.    How can I avoid it?  I've read the article  but there seems to be no clear solution.  UPDATE 1  I've used the word 'apply' in the first sentence of the initial version of this question. It's misleading since I want to preserve the modifier without 'applying' it. Rather, what I meant is 'adding' the modifier.  UPDATE 2  I followed josh sanfelici's solution, but still there is an artifact at the pole.  Here is the screen: (A rendered view with a sun lamp)    Maybe it's the limitation of the general-purpose subdivision modifier.  BTW, when the cast modifier is added after the subdivision modifier, the sphere becomes perfect (even for my original wrinkled sphere).  But since I want to edit the resulting sphere (for example, scaling X, Y, etc) while modifier is added but not applied, it's not usable.


Where can I find the recorded data and screen snaps and etc things ? I had tried to find them within :   ~/.local/share/zeitgeist   directory but there are the following files available and i don't know how to work with them to show all recorded data and history.  activity.sqlite activity.sqlite-shm activity.sqlite-wal fts.index   Help me how to open and view the log.  BTW Thanks in advance.

In Ubuntu 12.04 LTS, System Settings > Privacy > Files, 'Record Activity' is ON by default.  What does this mean exactly?  Which activities are being recorded?  Where can I find the recorded data?


I assembly my project to a jar with maven, and the there is a "data" folder contained a lot of .bat files inside the jar, the structure is:   jar---      ---data(this folder contains 1.bat,2.bat...)                ..... I used the method in , but when I run the jar in cmd, there still is the NullPointerException, I tried a lot and don't know where is the problem. my code is :  CodeSource src=ParcelLayerTree.class.getProtectionDomain().getCodeSource();     List<String> list=new ArrayList<String>();     if(src!=null){         URL jar=src.getLocation();         ZipInputStream zip=new ZipInputStream(jar.openStream());         ZipEntry zipEntry=null;          while((zipEntry=zip.getNextEntry())!=null){             String entryName=zipEntry.getName();             if(entryName.endsWith(".dat")){                 list.add(entryName);             }         }     }     if(list.size()<=0){         throw new IOException("not found the dat file");     }     for (String filePath : list) {         String fileName=fileNameSplit(filePath);         InputStream inputStream=ParcelLayerTree.class.getClassLoader().getResourceAsStream(fileName);         try (BufferedReader reader = new BufferedReader(new     InputStreamReader(inputStream))) {             int label = Integer.parseInt(fileName.split("\\.")[0]);

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 know of Alexa and some people find the information useful for ranking a website... as for me, no matter how big or small my sites are, none of them are registered with stats on them, and a few clients are disappointed with me over it.   How much influence does Alexa have on website's worth? Why do people hold it's stats so highly over content of the actual site in question? Should I actually worry about Alexa Ranking?   All of the stats which I do worry about is what Google Analytics, Webmasters Tools, and Piwiki on my server tells me. Usually I can gauge how good or bad I am doing with those alone for what sections of the site is active and which is not receiving traffic for the purpose of my content.

When I check Alexa rankings for my site it says that one site is linking to my site.   Is it only showing back links? If it is then why are other website traffic checking tools like Google showing different different back links?


guys. How are you all doing? Good I hope.  I have a question regarding crash reports from my app, more specifically when receiving a notification. As far as I was able to test the application, it had no issues with showing it's notifications, but in Google Play Console, I have multiple crash reports, telling me that there has been a Null Pointer Exception  This is my crash report right here:     java.lang.RuntimeException:    at   android.app.ActivityThread.handleReceiver (ActivityThread.java:3098)   at android.app.ActivityThread.-wrap18 (ActivityThread.java)   at   android.app.ActivityThread$H.handleMessage (ActivityThread.java:1588)    at android.os.Handler.dispatchMessage (Handler.java:102)   at   android.os.Looper.loop (Looper.java:154)   at   android.app.ActivityThread.main (ActivityThread.java:6247)   at   java.lang.reflect.Method.invoke (Native Method)   at   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run   (ZygoteInit.java:872)   at com.android.internal.os.ZygoteInit.main      (ZygoteInit.java:762) Caused by: java.lang.NullPointerException:    at   com.tedosoft.carmaintenance.AlertReceiver.onReceive   (AlertReceiver.java:24)   at android.app.ActivityThread.handleReceiver   (ActivityThread.java:3091)   And this is the specific line (AlertReceiver.java:24) in my code:  if (intent.getStringExtra("id").equals("autoUpdate"))   And the full code to that line:  Bundle extras = intent.getExtras();         if (extras != null){             if (intent.getStringExtra("id").equals("autoUpdate")) {                 doAutoUpdate(context, context.getString(R.string.notification_auto_add_title),                         context.getString(R.string.notification_auto_add_text),                         context.getString(R.string.notification_auto_add_title));             }   The entire code for onReceive  @Override public void onReceive(Context context, Intent intent) {     Bundle extras = intent.getExtras();     if (extras != null){         if (intent.getStringExtra("id").equals("autoUpdate")) {             doAutoUpdate(context, context.getString(R.string.notification_auto_add_title),                     context.getString(R.string.notification_auto_add_text),                     context.getString(R.string.notification_auto_add_title));         }         if (intent.getStringExtra("id").equals("updateReminder")) {             createNotification(context, context.getString(R.string.notification_title),                     context.getString(R.string.notification_text),                     context.getString(R.string.notification_title));         }         if (intent.getStringExtra("id").equals("reminder")) {             List<Integer> activeRemindersRowIds = getActiveRemindersCarRowIds(context);             for (int j = 0; j < activeRemindersRowIds.size(); j++) {                 createNotificationReminder(context, activeRemindersRowIds.get(j),                         context.getString(R.string.notification_reminder_text),                         context.getString(R.string.notification_reminder_ticker));             }         }     } }   What I suspect I am doing wrong here, is that most probably I should be typing in if(extras.getString("id).equals("autoUpdate")) instead of what it is at the moment, but I would like you to confirm that for me, before jumping to any conclusions.  So what I am asking here is - Why is my application crashing on that line of code and how can I fix this?  The crash report is only for that line and the other if statements do not cause crashes.


I'm trying to fetching datas with Retrofit with an adapter on a listview   viewholder. java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference on ViewHolder adapter first line and ViewholderFragment listView.setAdapter line. My codes below. I dont know what can ı do and where is the problem.   Can anyone help me to overcome this issue?  ViewholderAdapter.java  public class ViewholderAdapter extends ArrayAdapter{  @Override public  int getCount(){return items.size(); }   //java.lang.NullPointerException    @Override public Result getItem(int position){     return items.get(position); } public long getItemId(int position){     return position; }  private class ViewHolder {      TextView movie_year;      TextView movie_title;      TextView movie_desc;      ImageView movie_poster;     public ViewHolder(View view)     {         movie_year =(TextView)view.findViewById(R.id.movie_year);         movie_title =(TextView)view.findViewById(R.id.movie_title);         movie_desc =(TextView) view.findViewById(R.id.movie_desc);         movie_poster =(ImageView)view.findViewById(R.id.movie_poster);      }  }  @Override public View getView(int position,View convertview,ViewGroup parent) {   View view=convertview;     ViewHolder holder;     if(view==null)     {         view=LayoutInflater.from(context).inflate(R.layout.viewholder_item,parent,false);         holder=new ViewHolder(view);         view.setTag(holder);     }     else         {             holder=(ViewHolder) view.getTag();         }          holder.movie_title.setText(items.get(position).getTitle());      return view;  } }   ViewHolderFragment.Java  public ViewHolderFragment() {} @Override public View onCreateView(LayoutInflater inflater, ViewGroup fragmentContainer, Bundle savedInstanceState) {     View view = inflater.inflate(R.layout.fragment_view_holder, fragmentContainer, false);     ButterKnife.bind(this, view);     return view; }  @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {     super.onViewCreated(view, savedInstanceState);     ListView listView = (ListView) getActivity().findViewById(R.id.listView);     listView.setAdapter(adapter);  //java.lang.NullPointerException:      adapter =  new ViewholderAdapter (getContext());     movieService = MovieApi.getClient().create(MovieService.class);     loadFirstPage(); } private void loadFirstPage() {     Log.d(TAG, "loadFirstPage: ");     callTopRatedMoviesApi().enqueue(new Callback<TopRatedMovies>() {         @Override         public void onResponse(Call<TopRatedMovies> call, Response<TopRatedMovies> response) {             List<Result> results = fetchResults(response);      adapter.addAll(results);         }          @Override         public void onFailure(Call<TopRatedMovies> call, Throwable t) {             t.printStackTrace();          }     });  } private List<Result> fetchResults(Response<TopRatedMovies> response) {     TopRatedMovies topRatedMovies = response.body();      return topRatedMovies.getResults(); } private Call<TopRatedMovies> callTopRatedMoviesApi() {     return movieService.getTopRatedMovies(             getString(R.string.my_api_key),             "en_US",             currentPage     );  }  }


I often see that action is written with a Euclidean metric instead of the original Minkowski metric. My question is basically this : Under what conditions is okay to make a wick rotation?  I am thinking of the Wick-rotation in a manner analagous to a change of contour in a contour integral. In the case of contour integral, before making a similar change in contour, I would consider issues like location of poles of the integrand, behavior of the integrand at infinity of the complex plane etc. But in case of Wick rotation, I don't see such things discussed.  I would appreciate if some of you could answer or give some inputs to answer the following questions I have:  Is the rotation just as trivial as a change of variable : $\tau=\imath t$ ?  How do I know that the rotation should be $\tau=\imath t$ and not $\tau=-\imath t$  Can I always make a wick rotation for any Lagrangian?  Thanks.  EDIT/PARTIAL-ANSWER/GENERAL-UPDATE:   sheds some light on the issue. The short section on lack of an analytic continuation tells me that in a general case wick rotation needs to be justified.

I'm working with the signature $(+,-,-,-)$ and with a Minkowski space-time Lagrangian  $$ \mathcal{L}_M ~=~ \Psi^\dagger\left(i\partial_0 + \frac{\nabla^2}{2m}\right)\Psi. $$ The Minkowski action is $$ S_M ~=~ \int dt d^3x \mathcal{L}_M. $$ I should obtain the Euclidean action by Wick rotation.  My question is about the way with that I should perform the Wick rotation. The topic is something has been already asked (). The problem is that the answer to the question is not satisfactory for me and for this special case.  Since the spacetime interval is defined by $ds^2 = dt^2 - d\vec{x}^2$, If I perform a Wick rotation (just rotating the time axis) I get a negative Euclidean interval.    What's the sense of that? What's the connection between physical actions calculated in two different signature? I can perform the rotation with different signs $t =\pm i\tau$. I know that, if there exist any poles, I must choose the correct sign in order to not cross them. But in this case, apparently I can choose both and I get always the same negative euclidean interval but different results.   If I choose $ t = i\tau $ I get  $$ S_M ~=~i\int_{+i\infty}^{-i\infty} d\tau d^3x \Psi^\dagger\left(i\frac{\partial}{\partial i\tau} + \frac{\nabla^2}{2m}\right)\Psi  ~=~ -i\int_{-i\infty}^{+i\infty}  d\tau d^3x \Psi^\dagger\left(\frac{\partial}{\partial \tau} + \frac{\nabla^2}{2m}\right)\Psi $$  If I choose $ t = -i\tau $ I get $$ S_M ~=~-i\int_{-i\infty}^{+i\infty} d\tau d^3x \Psi^\dagger\left(-i\frac{\partial}{\partial i\tau} + \frac{\nabla^2}{2m}\right)\Psi  ~=~ -i\int_{-i\infty}^{+i\infty}  d\tau d^3x \Psi^\dagger\left(-\frac{\partial}{\partial \tau} + \frac{\nabla^2}{2m}\right)\Psi $$  I think there is a slight difference that I don't understand   Is the Euclidean action defined by $S_M = i S_E$ or by $S_M = -iS_E$?


I have the following class defined in a header A.h :  class A {  private:  template<int i> void method();  };   is there any way for me to keep the implementation of method in its own A.cpp file , with the usual method implementations ?  I'm asking this because puting the implementation in a A.h would make the interface very hard to read, especially since it's a private function.   It will only ever be instanciated with a limited values of "i" if that matters

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.)


Is it possible to split the data plug of a SATA connection?  I have 2 hard drives and an optical drive I want to use simultaneously, but my computer only has 2 SATA connections.  I can power the extra hard drive from another PSU I have, so power isn't an issue.  The question is if its possible to split the data connection.

I have a motherboard with just few SATA slots but have to put quite few hard disks in the box, so naturally I easily ran out of free slots.  I wonder if there are forked cables (I have no idea what would be the name for these cables) so I can connect multiple hard disks to a single SATA slot on the motherboard?  PS. Speed is not essential here as all disks contain archived data.


Below are a list of all The Sims 3 expansion packs in order of release ():   World Adventures High-End Loft Stuff Ambitions Fast Lane Stuff Late Night Outdoor Living Stuff Generations (May 31, 2011) Town Life Stuff Pets Master Suite Showtime Katy Perry's Sweet Treats Stuff Diesel Stuff Supernatural Seasons 70's, 80's & 90's Stuff University Life   Each packs adds various new items, and adds to the game.  The minimum requirements for the base game are as follows ():   2.4 GHz P4 processor or equivalent 1.5 GB RAM 128 MB Video Card with support for Pixel Shader 2.0 Microsoft Windows Vista Service Pack 1 At least 6.1 GB of hard drive space with at least 1 GB of additional space for custom content and saved games   I've read that with each expansion pack that you install the longer load times will be (depending on your computer). I've looked at the specifications that are recommended, and my computer exceeds them however I'm skeptical. I'd rather not sink a lot of money on something that won't run well.  I figure that if I were to buy The Sims 3 plus all the expansion packs the minimum requirements would probably raise. So what are the minimum requirements to run The Sims 3 with all of the expansion packs installed and possibly some custom content as well?

Is there a service that I can use to check if my machine will be able to run a certain game?


I have the following script:  (function () {     var Module = (function () {         var fctToCall = function () {             alert('Foo');         };         return {             fctToCall: fctToCall         };     })();     var Module2 = (function () {         var init = function () {             var str = 'fctToCall';             Module.str(); // here         };         return {             init: init         };     })(); })();   So I want to call this fctToCall method by its name - how can I do that? So far I know 3 methods:   by attaching the function to the window object, but then it wouldn't be local and in closure, and I wouldn't have the access to other local variables eval, the best options as far as I see it, but it's still eval, so I don't wanna use it this, but it's another architecture, I don't wanna change it   How can I solve this?

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I have a Content Type machine name as "aktionsblock_oben" and made some content and get the Content ID as 33 for this one. Now I can use template name as page--node--33.html.twig, but what if I create new content like this where I get another ID? The page--node--33.html.twig won't fire.  My try page--node--aktionsblock_oben.html.twig or aktionsblock_oben.html.twig was a failure.  Any suggestions

What is Drupal 8 file pattern name for a specified content type?  Suppose I have  a Movie content type. What is the pattern name for its page? Is it page--node--movie.html.twig?


I've been doing some old Linear Algebra papers that my university library had on file just for some practise and came across this question which caused many a debate among my friends.  True or False: There exists a Matrix A $\in \mathbb{M}_{33}(\mathbb{Z})$ with determinant 2 such that:  $$    A   \left[ {\begin{array}{cc}    2 \\    1 \\    4   \end{array} } \right]  = \left[ {\begin{array}{cc}    4 \\    -8 \\    16   \end{array} } \right]$$  I started by writing out each of the $[a]_{ij}$ entries and multiplying it out to look for a contradiction but that didn't get me very far. I then thought maybe since the determinant is 2 it may have something to do with the fact that $A^{-1}$ can be written as $\frac{1}{det(A)}B$ for some matrix B but a concrete answer still eludes me. A pointer in the right direction would be great!  Thanks!

Is the following statement true or false? There exists $A \in M_{3,3}(\mathbb{Z})$ with determinant $2$ such that $$A\begin{pmatrix}2\\1\\4\end{pmatrix} = \begin{pmatrix}4\\-8\\16\end{pmatrix}$$   I first thought of eigenvalues but it doesn't look like the second vector is a multiple of the first. What are the conditions on $A$ so that it's "true"? Or is it always false?


I am a first year STEM PhD student in a US university, but I come from a different country. I took a couple of weeks off in this winter break to travel within the US, as it was too expensive to visit my home country.  Now, I have two options -  1. To visit my home country in the next winter (2016-17) for around a month.  2. To visit my home country in the coming summer (2016) for a short period (say 2 weeks) and get back to work AND to go back again in the next winter for around a month.  Now, the problem with 1 is that there is still a year to go (well, almost a year), and so there is a possibility of being homesick. So, there is 2. However, I am concerned if it will be seen as I am slacking off / going on holidays too many times etc. Now, I obviously understand that I should discuss this with my advisor and s/he should take the decision, but I am concerned if this is even a reasonable discussion topic (as opposed to the idea being so preposterous that there is no point even asking, and I should just stick to 2)  Note that even if I go on a short holiday in the summer, I plan to spend most of the summer doing research at my university.  So, tl;dr: Is going on holidays in 3 consecutive breaks considered reasonable? Or is it too preposterous?

Do people take time out to go home, meet with family etc. during their PhD?   If yes then for how long and how frequently is it usually?   How does one deal with this with one's advisor?  What are the pros and cons?     Given that one basically has just about 2-3 years in practice to do all their PhD work, I don't understand how anything else fits in the schedule except work. The entire idea of a PhD looks quite scary to me that one is expected to produce cutting-edge stuff in that short a time starting from just standard graduate courses!    PS: the question is general, but if it is field-dependent, I am interested in particular in physics PhDs (theoretical high-energy physics specifically)


My question is this: What is it like working in the IT security field and what skills are required?  I was looking for a "career" site but there doesn't seem to be one so I thought instead of the Information Security site. After looking at questions asked there, I didn't think mine would be appropriate.  Also, if my question is unappropriate for Stack Exchange, is there a place I could ask it?  I'm not even sure Meta is the right place for this question but I couldn't find a .

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


My understanding is being thwarted by something basic I am missing. One starts with a light beam that is split into two perpendicular paths. There are two light paths that travel some distance.  The light bounces off each respective mirror and returns back to the beam splitter/recombiner. If the phase of the light has been shifted in one arm, we should see negative interference when they recombine.I can imagine how one might get phase shifting for example if one mirror was moving relative to the beam splitter. We would have doppler shifting of the frequency coming off the moving mirror. So for an interferometer to work properly, the distance between the beam splitter and each mirror has to stay fixed.   But can this kind of interferometer be used to analyze a process occurring in one of the paths of light? Consider a big diamond sitting in front of one of the mirrors. When light enters a denser medium (like from air to glass) the speed and wavelength of the light wave decrease while the frequency stays the same. But the exact opposite change happens after the light leaves the diamond after having bounced off the mirror. So the interferometer should not be able to detect whether there is anything in the light path. Similarly, any change in spacetime geometry in one of the light paths should not be detectable. (if one light path for example was collinear with the gravitational field of a nearby black hole). Even though space is compressed in one direction, the actual distance is not changed because any 'ruler' you use to measure distance is also likewise compressed.   So how can LIGO measure a gravitational wave?

, Laser Interferometer Gravitational-Wave Observatory, is a large-scale physics experiment aiming to directly detect gravitational waves. The device measures the phase shift laser beams.  If I understand this well, the measurement assumes that a suitable gravitational wave reduces and prolongs one of the tubes and the extension will take effect in the phase-shifting laser beams.  But I think if there's a gravitational wave that passes through it, it will affect everything, even the laser beam. This means that when the wave lengthens or shortens the tube, it also lengthens or shortens the wavelength of the laser beam.  In my opinion, therefore, this device does not work. Or am I wrong?


May someone confirm that the least residue of $44^8$ modulo $7$ is $4$ please? And that $2^2 \equiv  4\, (\!\!\!\mod 7)$? Thanks in advance.

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


Prove that: $$(x_1+...+x_k)^2\leq 2(x_1^2+...+x_k^2)$$ for all $x_1$, ... $x_k\in\mathbb R$. Is it also true that $$\left|x_1+...+x_k\right|^2\leq 2(|x_1|^2+...+|x_k|^2)$$ for all $x_1$, ... $x_k\in\mathbb C$?  My attempt for $k=2$. $$(x_1-x_2)^2\geq 0, \ \ \Rightarrow\ \ x_1^2+x_2^2\geq 2 x_1x_2$$ Then $(x_1+x_2)^2=x_1^2+x_2^2+2 x_1x_2\leq x_1^2+x_2^2 + x_1^2+x_2^2$ so I think we can prove the first statement by the induction principle. Is true the second statement?

Prove that  $(x_1+\dots+x_n)^2 \leq n(x_1^2 + \dots+x_n^2)$  for all positive integers n and all real numbers $x_1,....,x_n$  I am attempting a proof by induction but wasn't sure if i need the Cauchy-Schwarz Inequality or perhaps another way other than induction to prove this.  Proof   $n=1$ true  assume true for $n=k$  Now for $n= k+1$  $(x_1 + \dots +x_k + x_{k+1})^2 \leq \dots$


I have 2 shape files. One is a polygon while other is polyline. I need to select all the polylines that are completely inside the polygon. However this doesnot seem to work in any way.  NewLinks = "NewLinks.shp" Buffer = "Buffer.shp" Buffer1 = "Buffer1.shp" arcpy.MakeFeatureLayer_management(Buffer, Buffer1)  arcpy.SelectLayerByLocation_management(NewLinks, "COMPLETELY_WITHIN", Buffer1, "", "NEW_SELECTION", "NOT_INVERT")   Error:  Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 7860, in SelectLayerByLocation raise e arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid. ERROR 000368: Invalid input data. Failed to execute (SelectLayerByLocation).

I am attempting to iterate over all the feature classes in a folder and I'm getting the error 000368. The other solutions in on SE were not helpful to me unfortunately, so I'm posting a separate question. search_grids is a list of point feature classes and searches is a another point feature class.   The points never actually intersect with each other, but I'm using the Select by location tool to select points within a specified distance of each other. This isn't the reason for the error though as I was able to get this to work in the python window in ArcMap.   My code is the following  arcpy.env.workspace = r"C:\workspace" search_grids = arcpy.ListFeatureClasses() searches = r"C:\workspace\search" for grid in search_grids:     arcpy.management.SelectLayerByLocation(grid,"INTERSECT",searches,"97.5 meters","NEW_SELECTION","INVERT")     arcpy.management.SelectLayerByLocation(grid,"INTERSECT",searches,"2.5 meters","ADD_TO_SELECTION","NOT_INVERT")   Why am I getting this error?       arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.   ERROR 000368: Invalid input data.   Failed to execute (SelectLayerByLocation)


Let A be an mxn matrix with entries from a field.   Our objective is to prove that the row-space and column-space of A have that same dimension i.e. the same rank.  a)   b) As a follow on from part (a) Suppose that A is in reduced echelon form. Use part (a) to show that its row-space and column-space have the same dimension.  c) Show that if A′ is obtained from A by an elementary row operation, then the row-space of A′ is equal to the row-space of A.  d) Give an example showing that if A′ is obtained from A by an elementary row operation, then the column- space of A′ is not necessarily equal to the column-space of A.  e) Suppose that A′ is obtained from A by an elementary row operation. Show that a collection of columns of A is linearly independent if and only if the corresponding collection of columns in A′ is linearly independent. More precisely show that if c1, . . . , cn are the columns of A, c′1, . . . , c′n are the columns of A′ and J ⊆ {1,...,n}, then {ci : i ∈ J} is linearly independent if and only if {c′i : i ∈ J} is linearly independent.  f) Conclude that the row-space and column-space of A have the same dimension.

I am auditing a Linear Algebra class, and today we were taught about the rank of a matrix. The definition was given from the row point of view:      "The rank of a matrix A is the number   of non-zero rows in the reduced   row-echelon form of A".   The lecturer then explained that if the matrix $A$ has size $m  \times n$, then $rank(A) \leq m$ and $rank(A) \leq n$.   The way I had been taught about rank was that it was the smallest of    the number of rows bringing new information the number of columns bringing new information.    I don't see how that would change if we transposed the matrix, so I said in the lecture:  "then the rank of a matrix is the same of its transpose, right?"   And the lecturer said:   "oh, not so fast! Hang on, I have to think about it".   As the class has about 100 students and the lecturer was just substituting for the "normal" lecturer, he was probably a bit nervous, so he just went on with the lecture.  I have tested "my theory" with one matrix and it works, but even if I tried with 100 matrices and it worked, I wouldn't have proven that it always works because there might be a case where it doesn't.  So my question is first whether I am right, that is, whether the rank of a matrix is the same as the rank of its transpose, and second, if that is true, how can I prove it?  Thanks  :)


What's the meaning of X = {0,1}$^\mathbb{Z}$?

Let $ D = 2^\mathbb{N} $, i.e., D is the set of all sets of natural numbers.   What's the meaning of this definition? Intuitively, I would suggest that $ D = \{1,2,4,...\} $ but the explanation "set of all sets" leads me to the guess that this is wrong.


I have read the answers to other questions regarding the install/running of the tor browser. I have tried the answers given but still cannot get the tor browser to run on mine. I have Ubuntu 14.04 and where it shows to start tor browser when I double click all I get is an open tab full of code. Anyone with suggestions I should try? I also tried downloading from tor project did not work and tried the install using command in the terminal and it also did not work. When I had windows, I had no problem with the install or the tor browser running. I really like Ubuntu better; this is the only thing that I am having trouble with. PLEASE HELP!!!

I tried to install Tor on my new version of Ubuntu, but it seems that Tor is not available in the repositories.  How else can I install and use Tor?


i'm working on a legacy project & i found something like that :  test:{         if(1 == 1) {             System.out.println("Oups");             break test;         }         System.out.println("Hello World");     }   I google it, but nothing seems to match with this kind of structure.  Of course, this part of code compile & run ... ????  Do someone know what that do ?

For years, I've been using named blocks to limit the scope of temporary variables.  I've never seen this done anywhere else, which makes me wonder if this is a bad idea.  Especially since the Eclipse IDE flags these as warnings by default.  I've used this to good effect, I think, in my own code.  But since it is un-idiomatic to the point where good programmers will distrust it when they see it, I really have two ways to go from here:     avoid doing it, or  promote it, with the hope that it will become an idiom.   Example (within a larger method):  final Date nextTuesday; initNextTuesday: {     GregorianCalendar cal = new GregorianCalendar();     ... // About 5-10 lines of setting the calendar fields     nextTuesday = cal.getTime(); }   Here I'm using a GregorianCalendar just to initialize a date, and I want to make sure that I don't accidentally reuse it.  Some people have commented that you don't actually need to name the block.  While that's true, a raw block looks even more like a bug, as the intent is unclear.  Furthermore, naming something encourages you to think about the intention of the block.  The goal here is to identify distinct sections of code, not to give every temporary variable its own scope.  Many people have commented that it's best to go straight to small methods.  I agree that this should be your first instinct.  However, there may be several mitigating factors:   To even consider a named block, the code should be short, one-off code that will never be called elsewhere. A named block is a quick way to organize an oversized method without creating a one-off method with a dozen parameters.  This is especially true when a class is in flux, and the inputs are likely to change from version to version. Creating a new method encourages its reuse, which may be ill-advised if the use cases aren't well-established.  A named block is easier (psychologically, at least) to throw away. Especially for unit tests, you may need to define a dozen different objects for one-off assertions, and they are just different enough that you can't (yet) find a way to consolidate them into a small number of methods, nor can you think of a way to distinguish them with names that aren't a mile long.   Advantages of using the named scope:   Can't accidentally reuse temporary variables Limited scope gives garbage collector and JIT compiler more information about programmer intent Block name provides a comment on a block of code, which I find more readable than open-ended comments Makes it easier to refactor code out of a big method into little methods, or vice versa, since the named block is easier to separate than unstructured code.   Disadvantages:  Not idiomatic: programmers who haven't seen this use of named blocks (i.e. everyone but me) assume it's buggy, since they can't find references to the block name.  (Just like Eclipse does.)  And getting something to become idiomatic is an uphill battle.  It can be used as an excuse for bad programming habits, such as:   Making huge, monolithic methods where several small methods would be more legible. Layers of indentation too deep to read easily.   Note:  I've edited this question extensively, based on some thoughtful responses.  Thanks!


I am an amateur photographer and I have a Sony DSC HX400v bridge camera which has 50x optical zoom (quite helpful in taking close-up shots of wild animals). The effectiveness of the zoom lens is however negated when I try to focus on a swiftly moving subject such as an eagle or any other bird in flight. I also have a tripod with me. Can anyone please suggest ways/provide tips to capture a flying bird accurately?  Thanks in advance

Hi everyone I'm a newbie, I have a Panasonic FZ72 Bridge Camera and I love to take shots of birds in flight, the problem is the sports mode is too slow and I have no idea what manual settings to use as the other bridge cameras I have had in the past have been fine on the sports setting. I would be very grateful for any help, in layman's terms please. :)


I have since months a working version of MySQL on Ubuntu 14.04 LTS.  I installed Xampp from  and now my old MySQL installation does not work anymore (e.g.: my existing databases are not visible anymore in MySQL workbench, the password seems to be another one).  How can I get my old version of MySQL working again?  It would be ok, if I loose Xampp.  (I see my databases in the filesystem at: /var/lib/mysql/ and know that the old MySQL configuration is in /etc/mysql/)  I posted this question elsewhere, too.

I upgraded from Ubuntu 12.10 to Ubuntu 13.10. After some time, I found that I didn't export all my MySQL databases. Some of them are missing. I still have a backup from my /var/ partition, but I cannot just copy the missing databases (directories) over from /var/lib/mysql/, it will not work. MySQL-daemon will fail to restart.  I cannot replace the entire current /var/lib/mysql/ with the backed-up one either, just so I could export the missing tables and move the new directory back and import the exported tables. The databases and tables did show up in phpMyAdmin, but all the content was empty.  The annoying thing is, the daemon will fail to restart after fiddling around quickly. MySQL has turned * into a sensitive little girl. when I move an exact copy of my (new, untouched and post-upgrade) mysql directory back, it still won't restart and I have to apt-get install mysql-server-5.5 --reinstall for it to work agian.  So, is there any way I can get a database back from backed up files? They are sitting there so conveniently, named exactly like the database, with files named exactly like the tables.  *) This used to work. Normally I export my stuff, so last time I did this was a few years back, but it used to work. Now MySQL acts like a crybaby. New is not always better.  At least MongoDB just eats whatever files you put in /var/lib/mongodb as long as it's proper bson.  Although the error log is very verbose, it doesn't really help me.  A hundred of these:     131120  5:23:48 [ERROR] Cannot find or open table some_database/some_table from   the internal data dictionary of InnoDB though the .frm file for the   table exists. Maybe you have deleted and recreated InnoDB data   files but have forgotten to delete the corresponding .frm files   of InnoDB tables, or you have moved .frm files to another database?   or, the table contains indexes that this version of the engine   doesn't support.   See    how you can resolve the problem.   And some other messages about InnoDB that I cannot reproduce because I accidentally refreshed the log in my editor while reinstalling mysql for the n-th time.  What is this InnoDB stuff anyway? It's like the weak little crybaby brother or sister of the grown and versatile MySQL. They made it the default in server 5.5. Probably with good reason, but so far it didn't make me any sandwiches.


I have three authors associated with a paper. All of them share the same university, but the second one also has an extra university address.  I would like something like the following :

I wonder how we can list author names in the following format in LaTeX.   I have 5 authors with 3 different affiliations. I am trying to list all author names with refmark in one row, and 3 affiliations with refmark in another row, but each in one separated column. It should look like this:          author1{1} author2{2} author3{1} author4{2} author5{3}            {1}department      {2}department        {3}department               school              school              school               email                email              email   I did saw some papers that have the above format, but cannot search for any guideline. IEEE guideline suggests another way to list authors, but sadly it does not look that neat          author1{1} author2{2} author3{1} author4{2} author5{3}                         {1} department, school                               email                         {2} department, school                               email                         {3} department, school                               email


I have a large setup program that saves hours and hours when I spin up a new machine, but I cannot get one thing to work right now. I want to fill a TD driver required config file, and since it is a special protected file I'm getting a hassle. My python looks like:  #configure webapi driver ODBC_PATH       = os.path.join(HOMEPATH, '/etc/odbcinst.ini') ODBC_SETTINGS   = """\ [FreeTDS] Description = TD Driver (MSSQL) Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so FileUsage = 1"""  call_sp('sudo echo "{}" > {}'.format(ODBC_SETTINGS, ODBC_PATH))   where call_sp is just my way of calling a subprocess but allowing args, like Popen does. I was clueless, because it's failing silently (I don't know till I try to run server) and in the shell I don't get prompted for my pw:  cchilders:~/scripts/setup_scripts/dimensional [master]$ sudo echo "[FreeTDS] Description = TD Driver (MSSQL) Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so FileUsage = 1" > /etc/odbcinst.ini  bash: /etc/odbcinst.ini: Permission denied   cchilders:~/scripts/setup_scripts [master]$ sudo echo "somethin" > /etc/odbcinst.ini  bash: /etc/odbcinst.ini: Permission denied   but sudoing into nano works and I can do it manually:  cchilders:~/scripts/setup_scripts [master]$ sudo nano /etc/odbcinst.ini  [sudo] password for cchilders:    Why can't I fill this ini file with text from terminal, and if it isn't possible, how can I automatically fill in python script? Ty

This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux.  There are a lot of times when I just want to append something to /etc/hosts or a similar file but end up not being able to because both > and >> are not allowed, even with root.  Is there someway to make this work without having to su or sudo su into root?


I need to schedule the class below to run every 10 minutes.  What changes do I need to make to my class below?  global class Change_Inc_To_Resolved Implements Schedulable{ global void execute (SchedulableContext sc) {     ChangeStatusToResolved(); } public void ChangeStatusToResolved() {        List<BMCServiceDesk__Incident__c> UpdateStatus = new list <BMCServiceDesk__Incident__c>();     UpdateStatus = [SELECT Id, BMCServiceDesk__FKStatus__c FROM BMCServiceDesk__Incident__c WHERE Status_Updated__c = FALSE AND BMCServiceDesk__FKStatus__c = 'a4Bw0000000CcCNEA0' LIMIT 100];     for(BMCServiceDesk__Incident__c up: UpdateStatus)     {            up.BMCServiceDesk__FKStatus__c = 'a4Bw0000000CcCNEA0';         updatestatus.add(up);     }     update UpdateStatus; } }   I've seen the code below in a link  , do I use this in conjunction with my class above? If so, what changes do I need to make to it?  global class scheduledTest implements Schedulable{      global void execute(SchedulableContext SC) {          RecurringScheduleJob.startJob();            String day = string.valueOf(system.now().day());          String month = string.valueOf(system.now().month());          String hour = string.valueOf(system.now().hour());          String minute = string.valueOf(system.now().minute() + 10);          String second = string.valueOf(system.now().second());          String year = string.valueOf(system.now().year());            String strJobName = 'Job-' + second + '_' + minute + '_' + hour + '_' + day + '_' + month + '_' + year;          String strSchedule = '0 ' + minute + ' ' + hour + ' ' + day + ' ' + month + ' ?' + ' ' + year;          System.schedule(strJobName, strSchedule, new scheduledTest());  }  }

Using the salesforce GUI it seams impossible to schedule a job every 15 minutes. Or more than once a day.


What is cause of quantization of charge? When we rub two objects only an integral number of electrons or charges can be transferred is this the reason?  Why electron has the smallest possible charge?  Why quarks cannot exist independently?

I'm aware of Millikan's oil drop experiment and I've read that quarks have fractional eletric charge, but I was wondering if there's any theoretical argument that makes us believe charge is quantized.  I've also read about Dirac's famous work in which he demonstrated that if a magnetic monopole exists then electric and magnetic charge have to be quantized.  But if it doesn't exist? Is there any other theoretical reason for the charge to be quantized or is that the only way we know?


After having my camera tracked, I decided to put in a cube for testing. But then I've noticed this strange artifact where every object kinda flickers and changes it's rotation.

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


I've got this C# program that never closes the Excel process. Basically it finds the number of instances a string appears in a range in Excel. I've tried all kinds of things, but it's not working. There is a Form that is calling this method, but that shouldn't change why the process isn't closing. I've looks at suggestions by Hans Passant, but none are working.  EDIT: I tried the things mentioned and it still won't close. Here's my updated code. EDIT: Tried the whole Process.Kill() and it works, but it seems like a bit of a hack for something that should just work.  public class CompareHelper {     // Define Variables     Excel.Application excelApp = null;     Excel.Workbooks wkbks = null;     Excel.Workbook wkbk = null;     Excel.Worksheet wksht = null;     Dictionary<String, int> map = new Dictionary<String, int>();      // Compare columns     public void GetCounts(string startrow, string endrow, string columnsin, System.Windows.Forms.TextBox results, string excelFile)     {         results.Text = "";          try         {             // Create an instance of Microsoft Excel and make it invisible             excelApp = new Excel.Application();             excelApp.Visible = false;              // open a Workbook and get the active Worksheet             wkbks = excelApp.Workbooks;             wkbk = wkbks.Open(excelFile, Type.Missing, true);             wksht = wkbk.ActiveSheet;             ...          }         catch         {             throw;         }         finally         {             GC.Collect();             GC.WaitForPendingFinalizers();              if (wksht != null)             {                 //wksht.Delete();                 Marshal.FinalReleaseComObject(wksht);                 wksht = null;             }              if (wkbks != null)             {                 //wkbks.Close();                 Marshal.FinalReleaseComObject(wkbks);                 wkbks = null;             }              if (wkbk != null)             {                 excelApp.DisplayAlerts = false;                 wkbk.Close(false, Type.Missing, Type.Missing);                 Marshal.FinalReleaseComObject(wkbk);                 wkbk = null;             }              if (excelApp != null)             {                 excelApp.Quit();                 Marshal.FinalReleaseComObject(excelApp);                 excelApp = null;             }              GC.Collect();             GC.WaitForPendingFinalizers();             GC.Collect();             GC.WaitForPendingFinalizers();              /*             Process[] processes = Process.GetProcessesByName("EXCEL");             foreach (Process p in processes)             {                 p.Kill();             }             */         }     } }

I'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:  while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { } excelSheet = null; GC.Collect(); GC.WaitForPendingFinalizers();   Although this kind of works, the Excel.exe process is still in the background even after I close Excel. It is only released once my application is manually closed.  What am I doing wrong, or is there an alternative to ensure interop objects are properly disposed of?


Find all functions from $\mathbb{Z}$ to $\mathbb{Z}$ such that   $f(x+y)=f(x)+f(y)$.  We showed these claims:  Claim1. $f(0)=0$.  Claim2. $f(-x)=-f(x)$.  But, how should I show that there is no other $g$ function from $\mathbb{Z}$ to $\mathbb{Z}$ which satisfies  $g(x+y)=g(x)+g(y)$.

Let $x=0\,\, f(x+y)=f(0+y)$ every $y \in \mathbb{Z}$ So we get $f(0)+f(y)=f(y)$ then $f(0)=0$  $0=f(0)=f(x(-x))=f(x)+f(-x)=0$ Let $f(1)=k$ for some $k \in \mathbb{Z}$ $f(n)=f(1+1+1+...+1) (n \text{ many } 1)$           $=f(1)+f(1)+...+f(1) (n \text{ many } f(1))$           $=n\cdot k$  Thus $f: \mathbb{Z} \to \mathbb{Z}$ a function such that $f(n)=nk$ I found this but I must also show that there is no other function which satisfies $f(x+y)=f(x)+f(y)$ and I am stuck can somebody help me.


I just had my laptop serviced. Before it was 80 degrees Celsius when i watched YouTube videos and up to 100 degrees Celsius.  In the store they cleaned my CPU fan and it's now maximum 50 degrees Celsius. Can the old high temperature have damaged my laptop CPU or the fan?

Will higher temperatures damage a computer over time, even when not reaching the maximum temperature? For example, if the maximum is 105 degrees celcius, will the computer break faster when continually having it on 80 degrees celsius instead of, for example, 60 degrees celcius.


If I enter the command      ctrl-alt-f1   The first console is displayed. The default font of this is way to small and I want to reset it. On other Linux and Unix like systems I can easily do this with the command     dpkg-reconfigure console-setup   If I enter this command on Ubuntu, the font size will reset. However, once I reboot, it will go back to the default small font. Why is this? How can I fix it?

I have a high resolution screen on my laptop (3200x1800px) and I disabled the boot-image (  )  I also managed to enlarge the font in grub by uncommenting the line   GRUB_GFXMODE=640x480   in /etc/default/grub  But the boot messages during startup are still really tiny and hardly readeable. The same as if I change to a console screen by pressing Ctrl+Alt+F1.  How can I enlarge the font on the console too?


I need my output to float to only 2 decimal places as the output is money. For example if I run:     Enter 1 if you are single. Enter 2 if you are married      1      Enter your taxable income      27060.34      Federal Income Tax:$4060.3435   I need the federal income tax to output $4060.34 instead of $4060.3435  My code:   import static org.junit.Assert.*; import java.util.Scanner; import org.junit.Test; public class IRS {     public static void main(String[] args) {         Scanner scan = new Scanner(System.in);         System.out.println("Enter 1 if you are single. Enter 2 if you are married");         int martialstatus = scan.nextInt();         if (martialstatus == 1) {             Scanner scan2 = new Scanner(System.in);             System.out.println("Enter your taxable income");             double income = scan2.nextDouble();             if ((income > 0) && (income <= 27050.00)) {                 System.out.println("Federal Income Tax:$" + (income * .15));             }             if ((income > 27050.00) && (income <= 65550.00)) {                 System.out.println("Federal Income Tax:$" + (4057.50 + (.275 * (income - 27050))));             }             if ((income > 65550.00) && (income <= 136750.00)) {                 System.out.println("Federal Income Tax:$" + (14645.00 + (.305 * (income - 65550.00))));             }             if ((income > 136750.00) && (income <= 297350.00)) {                 System.out.println("Federal Income Tax:$" + (36361.00 + (.355 * (income - 136750.00))));             }             if (income > 297350.00) {                 System.out.println("Federal Income Tax:$" + (93374.00 + (.391 * (income - 297350.00))));             }         } else if (martialstatus == 2) {             Scanner scan3 = new Scanner(System.in);             System.out.println("Enter your taxable income");             double income2 = scan3.nextDouble();             if (income2 <= 45200.00) {                 System.out.println("Federal Income Tax:$" + (.15 * income2));             }             if ((income2 > 45200.00) && (income2 <= 109250.00)) {                 System.out.println("Federal Income Tax:$" + (6780.00 + (.275 * (income2 - 45200))));             }             if ((income2 > 109250.00) && (income2 <= 166500.00)) {                 System.out.println("Federal Income Tax:$" + (24393.75 + (.305 * (income2 - 109250.00))));             }             if ((income2 > 166500.00) && (income2 <= 297350.00)) {                 System.out.println("Federal Income Tax:$" + (41855.00 + (.355 * (income2 - 166500.00))));             }             if (income2 > 297350.00) {                 System.out.println("Federal Income Tax:$" + (88306.00 + (.391 * (income2 - 297350.00))));             }         } else {             System.out.println("Error. Try again");         }     } }

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


2020-03-23 13:16:34.533 26427-26427/com.android.text E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.android.text, PID: 26427     java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference         at com.android.text.MainActivity$1.onDataChange(MainActivity.java:54)         at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@19.2.1:75)         at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@19.2.1:63)         at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@19.2.1:55)         at android.os.Handler.handleCallback(Handler.java:790)         at android.os.Handler.dispatchMessage(Handler.java:99)         at android.os.Looper.loop(Looper.java:166)         at android.app.ActivityThread.main(ActivityThread.java:6518)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

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 want to do the following in PHP:  Get json data from   This provides:  {"name":"Joe","password":"something","email":"something@something.com"}   I want to be able to do a simple php echo to display the json data on a webpage  <?php echo $password ?> <?php echo $name ?> <?php echo $email ?>   So basically, creating a php for the "name" / "password" or "email" part of json results

Trends data from Twitter Search API in JSON.  Grabbing the file using:  $jsonurl = "http://search.twitter.com/trends.json"; $json = file_get_contents($jsonurl,0,null,null); $json_output = json_decode($json);   How do I work with data from this object. As an array? Only really need to extract data from the [name] values.  JSON object contains:  stdClass Object (     [trends] => Array         (             [0] => stdClass Object                 (                     [name] => Vote                     [url] => http://search.twitter.com/search?q=Vote                 )              [1] => stdClass Object                 (                     [name] => Halloween                     [url] => http://search.twitter.com/search?q=Halloween                 )              [2] => stdClass Object                 (                     [name] => Starbucks                     [url] => http://search.twitter.com/search?q=Starbucks                 )              [3] => stdClass Object                 (                     [name] => #flylady                     [url] => http://search.twitter.com/search?q=%23flylady                 )              [4] => stdClass Object                 (                     [name] => #votereport                     [url] => http://search.twitter.com/search?q=%23votereport                 )              [5] => stdClass Object                 (                     [name] => Election Day                     [url] => http://search.twitter.com/search?q=%22Election+Day%22                 )              [6] => stdClass Object                 (                     [name] => #PubCon                     [url] => http://search.twitter.com/search?q=%23PubCon                 )              [7] => stdClass Object                 (                     [name] => #defrag08                     [url] => http://search.twitter.com/search?q=%23defrag08                 )              [8] => stdClass Object                 (                     [name] => Melbourne Cup                     [url] => http://search.twitter.com/search?q=%22Melbourne+Cup%22                 )              [9] => stdClass Object                 (                     [name] => Cheney                     [url] => http://search.twitter.com/search?q=Cheney                 )          )      [as_of] => Mon, 03 Nov 2008 21:49:36 +0000 )


I have a Map Package of ArcGIS and my licence expired. I need to use this file now.  I am using QGIS.   How do I do this?

Is there any way to open an ArcGIS map package (*.mpk) file with MapInfo?  I do not have access to ArcGIS Desktop.


In this , it is stated: Likewise, objects in spacetime all move at constant speed c in spacetime but if you change its direction, say by moving at speed v in the x direction, then spatial speed will change and so will the speed along the ct direction. Again, its total speed will still be c through spacetime.      Brian Green of Columbia University also says the same thing, as do many others. Are they right?

I read that an object at rest has such a stupendous amount of energy, $E=mc^2$ because it's effectively in motion through space-time at the speed of light and it's traveling through the time dimension of space-time at 1 second per second as time goes forward.  What troubles me here, is the fact that it is traveling through space-time at the speed of light. Why is it at the speed of light?


I don't think there is too much to explain here. The codes are self explanatory. I have written this function function checkDuplicate($table, $field, $value){   global $pdo;   $stmt = $pdo->prepare("SELECT COUNT(*) as cnt FROM :table WHERE :field = :value");   $stmt-> bindValue(':table', $table);   $stmt-> bindValue(':field', $field);   $stmt-> bindValue(':value', $value);   $stmt-> execute();   $f = $stmt->fetch();    if($f['cnt'] > 0){     return 1;   }else{     return 0;   } }  I call it this way if(checkDuplicate("members", "mem_uname", $uname) == 1){   echo alert_danger("An account with this username already exists.");   exit(); }  Calling returns this error Warning: PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''members' WHERE 'mem_uname' = 'shrey'' at line 1 in E:\xampp\htdocs\buxhost\includes\functions.php on line 35  What is my mistake here? Why am I getting that error? As far as I have checked multiple times, I did not find anything visibly wrong in my codes.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


of the Unicode symbol 'DIVISION TIMES' (U+22C7), which is ⋇. That is, it is a hybrid of times and division and the intended semantics ought to be the multiplicative analogue of the well-known ±,  which can be typeset in LaTeX by \pm.  Is there a command like \pm for getting ⋇? (Detexify does not recognize it.)  If there is no command, how would one go about typesetting this in LaTeX?  I am given to understand some variants of LaTeX support Unicode, so it would be non-issue there, but I would like to know about other ways.

The symbol I would like to obtain ought to be like the symbol '\pm'.


When I try to login to stackoveflow via Facebook for the first time, I see the following error:     Sorry, your request could not be completed because it looked suspicious. If you meant to perform an action on Stack Overflow, please return to the previous page and try again.     This question has sort of been asked , but this answers the cause, and doesn't provide the solution. What can I do to prevent this situation? Changing my ISP isn't an option.  Edit: SSHing into a remote server sort of solved this problem. But I need a more permanent solution.

I am getting this error repeatedly when I try to login to the  site for the first time using a Google id.  Sorry, your request could not be completed because it looked suspicious. If you meant to perform an action on Physics, please return to the previous page and try again.  I am using few other Stack Exchange and Stack Overflow sites,


Let $Z = (X, Y)$ be a random variable uniform inside circle of radius $R$. How to find cumulative distribution function (CDF) on disk?

How to find the Cumulative Distribution Function (CDF) and Probability Distribution Function (PDF) for uniform variable inside circle given by $R^2 = (X-c_1)^2+(Y-c_2)^2$, where ($c_1, c_2$) is the center of circle.  I think that the PDF for problem is given by  \begin{equation} f(x,y) = \begin{cases} \frac{1}{\pi R^2}&, \quad (x-c_1)^2 + (y-c_2)^2 \leq R^2\\ 0&, \quad otherwise \end{cases} \end{equation}


Peter has lived in this city since he was born.  Peter has been living in this city since he was born.

Here I know I have one present perfect and present perfect continuous sentence.   I have lived in Europe for 2 years. I have been living in Europe for 2 years.   Can you use both of them interchangeably? What is the exact difference between them? To me both suggest that the person is still living in Europe.


I am trying to validate email addresses using a regex. This is what I have now ^([\w-.]+)@([\w-]+).(aero|asia|be|biz|com.ar|co.in|co.jp|co.kr|co.sg|com|com.ar|com.mx|com.sg|com.ph|co.uk|coop|de|edu|fr|gov|in|info|jobs|mil|mobi|museum|name|net|net.mx|org|ru)*$  I found many solutions using non-capturing groups but did not know why. Also can you tell me if this is the correct regex and also if there are any valid emails which are not being validated correctly and vice-versa

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


Is it natural to say "he explained the reason why he was late"? I suspect that it doesn't make sense.  But I reckon "That is the reason why he's sick" is acceptable with "the reason".  Could it be that the crucial difference lies in the verb we select? The verb explain has as its object a situation, a problem, etc., not a reason.   What do you think?

Can the "why" be removed from the phrase "have some reason why you?"  Example:     Do you have some reason you ____?   vs.     Do you have some reason why you ____?   Are these both grammatically correct? What's the difference, if any? Googling I find a lot of both, but I'm still wondering about this.