I have used google maps for displaying some locations using markers, based on the user's current location. User's current location is the center point of the map. The default zoom level is 12. In default, I displayed markers within 300 miles(In my case) distance only.  In that how can I do the following,   1) If decrease the zoom level, I need to increase the distance that should display markers within the increased distance also. how much distance should I increase in miles (For e.g. Zoom level is 11) ?   2) If increase the zoom level, I need to  decrease the distance that should display markers without the increased distance. how much distance should I decrease in miles (For e.g. Zoom level is 13) ?   Please suggest me there is any built-in option to do that ...

Can anyone provide me with a link (or some details) on the actual ratio to "zoom level" figures for Google Maps?  e.g. Google Maps Level 13 = 1:20000


As the title says, I'm wondering if some sites have customised their pointing system.   I've just come across Troy Hunt's profile on Information Security:   Currently he has 2,785 points. But he also an answer that has 381 upvotes. He has other highly upvoted answers but this answer alone should give him 3,810 points assuming upvoted answer gets 10 points. I couldn't make sense of the numbers so decided to ask here.  Sorry if it's a silly question :-)

How is this possible that the user with  question only has that little reputation? I've checked his site and he doesn't have a lot of downvotes or bounties.


We use && operator to run a command after previous one finishes. update-system-configuration && restart-service  but how do I run a command only if previous command is unsuccessful ? For example, if I have to update system configuration and if it fails I need to send a mail to system admin? Edit: Come on this is not a duplicate question of control operators. This will help users who are searching for specifically this, I understand that answer to control operators will answer this question too, but people searching specifically for how to handle unsuccessful commands won't reach there directly, otherwise I would have got there before asking this question.

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


Background I am self-learning C++ from . I am trying to overload an operator in a class using a friend function ). EDIT The linked question does not answer my question. The accepted solution to that question gives a way for templates to be implemented in header + cpp file (not all in the same file). In fact, I have consulted that question to partially come up with my situation. My attempt Using , I have almost gotten my code to work (see the cryptic error message). It turns out I am missing a <>.  (). I have tried googling, but no-one else had the situations of  friend function, operator overloading, and in a templated class  simultaneously. My rationale You should not use a class public function to do operator overloading, because the object who calls the function will be implicitly passed, taking up one function parameter. It is better code-style to have the overloaded operator be symmetric (both in usage and in definition). The usage of friend was suggested by the lecture notes. Question  Why is <> needed? Is there a better approach to doing operator overloading in a templated class? (Optional) How can I make sense of the error message?  Thank you. Code stack.h #include <iostream> #include <vector> using std::cout; using std::vector;  template <typename T> class Stack;  template <typename T> Stack<T> operator+(Stack<T> a, Stack<T> b);  template <typename T> class Stack { // use default constructors and destructors private:     vector<T> s; public:     bool empty();     void push(const T &item);     T& top();     void pop();     friend Stack<T> operator+(Stack<T> a, Stack<T> b); // need operator+<> };  stack.cpp #include <iostream> #include <vector> using std::cout; #include "stack.h"  template <typename T> bool Stack<T>::empty() {     return s.empty(); }  template <typename T> void Stack<T>::push(const T &item) {     s.push_back(item); }  template <typename T> T& Stack<T>::top() {     return s.back(); }  template <typename T> void Stack<T>::pop() {     s.pop_back(); }  template <typename T> Stack<T> operator+(Stack<T> a, Stack<T> b) {     Stack<T> temp;     while (!b.empty()) {         temp.push(b.top());          b.pop();     }     while (!a.empty()) {         temp.push(a.top());         a.pop();     }     Stack<T> c;     while (!temp.empty()) {         c.push(temp.top());         temp.pop();     }     return c; }  int main() {     Stack<int> a, b;     a.push(1);     a.push(2);     b.push(3);     b.push(4);     Stack<int> c = a + b;     cout << c.top() << "\n";      return 0; }  Error message Undefined symbols for architecture x86_64:   "operator+(Stack<int>, Stack<int>)", referenced from:       _main in stack-d2f02a.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1

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


A lot of times I've seen a post and wanted to edit it, but I wasn't sure if it changed the original intent of the post, or would be helpful, so I held off, knowing that my edits would be binding unless someone edited them out or rolled back the changes.   In these situations, it would be great to be able to suggest an edit, to see if the rest of the community agrees with the edit. Instead of them having to undo a bad edit of mine, it would be better to have the edit rejected before it ever gets seen by other users. There are a few things that could be used in replacement for a >2k rep user suggesting edits, such as   Editing it anyway, but writing in the edit summary "I'm not sure if this changes the meaning of the post" Asking about the potential edit in a comment Going on chat and asking about it there Open a new browser and suggest an edit anonymously   However, all of these seem like workarounds. I think it'd be nice to at least have the edit approved by one other person if you're unsure about it. Perhaps a button on the edit window saying "Do you want this edit to go into the queue"?

I have now enough reputation points on Stack Overflow to edit every post directly. But sometimes (especially if this is about a field where I'm not savvy, or when I try to edit a question title without having understood the question itself) I might be not totally sure about whether my edit really is an improvement.  For now, I have these options:   Do the edit anyway, hope that someone else will catch it if it is wrong Don't do the edit, and hope that someone else will see this post and edit it in the right way Let a comment and hope that someone will see it (either after editing or instead of it). Flag the post for moderator attention (but will the moderators know it better?) Search the right chat room to find someone who knows more about the topic.   All these are not really optimal, I think.  I would like to have a check box     [_] Submit this edit for approval   which, when checked, would submit the edit into the usual edit approval queue. Then I would get at least one or two other pairs of eyes looking over my edit, and maybe even improving it.  (I don't really care about the +2 reputation for the edit - I think it should be without any reputation difference here.)  There's an  for nearly giving everyone the ability to suggest edits that the post owner can approve, but I'm simply interested in being able to insert them into the general edit queue where anyone can approve them.  Actually, I could do this right now by having a low-reputation sock puppet (or a totally anonymous edit), but I think this is not the intended use for sock puppets, is it? Also, I would like to be able to get feedback for my edit.


My site URL is like example.com/html/Project I had put the Google Analytics code snippet on this site.  After doing so, I'm started looking for this URL in Google, but it is not showing.  Actually, I want to see that my page is being crawled by in Google. Just to make sure I didn't mess up the meta noindex for security reasons.

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I've created this simple HTML website where while scrolling background images are changed with jQuery. There are 500 images so while scrolling its like a silent film, it's really cool. My problem is images take time to load, so while scrolling most of them are just white, waiting to be loaded. Can i somehow load them all before opening the website and allowing the user to scroll?

I'm looking for a quick and easy way to preload images with JavaScript. I'm using jQuery if that's important.  I saw this here ():  function complexLoad(config, fileNames) {   for (var x = 0; x < fileNames.length; x++) {     $("<img>").attr({       id: fileNames[x],       src: config.imgDir + fileNames[x] + config.imgFormat,       title: "The " + fileNames[x] + " nebula"     }).appendTo("#" + config.imgContainer).css({ display: "none" });   } };   But, it looks a bit over-the-top for what I want!  I know there are jQuery plugins out there that do this but they all seem a bit big (in size); I just need a quick, easy and short way of preloading images!


Let R and S be rings . Consider K an ideal in RS. Show that there exist an ideal I in R and J in S such that K=IJ . How can I proceed this ?

$R$ and $S$ are two rings. Let $J$ be an ideal in $R\times S$. Then there are $I_{1}$, ideal of $R$, and $I_{2}$, ideal of $S$ such that $J=I_{1}\times I_{2}$.  For me it's obvious why $\left\{ r\in R\mid \left(r,s\right)\in J\text{ for some } s\in S\right\}$ is an ideal of $R$ (and the same for $S$) so I can prove $J$ is a subset of the product of two ideals and also that the product of these two ideals is an ideal. But I can't see how to prove equality without assuming existence of unity or commutativity. Trying basically to show that if $\left(r,s\right)\in J$ then also $\left(r,0\right),\left(0,s\right)\in J$. Thank you for your help!


I have a hard time trying to prove this since the only proofs that come to mind are the ones based on a compact domain/closed interval (which is not the case here). Can someone help me out a bit? Thank you!

I got pretty confused at that question... Can anyone help me understand this question better and/or drop some hints please? Thank you!


I am developing a desktop app in JavaFx for mac and windows and want to distribute it to users but not as a .jar file. I want to distribute it as an installer file for both mac and windows.  I have read at some forums and in stackoverflow also that we can export a project a .exe for windows and .app for mac using Neatbeans but I am not able to find how to do it.  Is it possible through netbeans to create .exe and .app files ??  I have neatbeans 8.  I can see some ways to convert it to .exe using some apps, but for .app or .dmg I am not able to find anything.

If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file?  I also need an installer for my program.


I wrote a code to find a substring within a string in java but i want to know is there a short way to do this or is there a inbuilt function to do this.  Here's the code :  import java.util.*; class substr  {     public static void main (String args [])     {         String str1 = new String();         String str2 = new String();         String str3 = new String();         int check=1,k;         Scanner obj= new Scanner (System.in);         System.out.println("Enter a string");         str1=obj.nextLine();         System.out.println("Enter Sub String");         str2=obj.nextLine();         int len=str1.length();         System.out.println(check);         for( int c = 0 ; c < len&&check!=0 ; c++ )         {             for( int i = 1 ; i <= len - c&& check!=0 ; i++ )             {                 str3 = str1.substring(c, c+i);                 if (str2.equals(str3))                 {                        check=0;                 }             }        }        System.out.println(check);        if (check==0)        {            System.out.println("Sub String");        }        else if ( check==1)        {            System.out.println("No");        }     } }

Say I have two strings,  String s1 = "AbBaCca"; String s2 = "bac";   I want to perform a check returning that s2 is contained within s1. I can do this with:  return s1.contains(s2);   I am pretty sure that contains() is case sensitive, however I can't determine this for sure from reading the documentation. If it is then I suppose my best method would be something like:  return s1.toLowerCase().contains(s2.toLowerCase());   All this aside, is there another (possibly better) way to accomplish this without caring about case-sensitivity?


I have fixed set of Account Names stored in one custom object.  Set<String> NameSet = new Set<String>();   Custom object NameSet account Name values: Intel, HP, Dell, IBM etc  I have a query on Account object.  My Account Names are Intel-Aus, HP, Dell-US, IBM etc   List<Account> accList = [Select Name from Account where Name IN: NameSet]   The above accList only gives 2 records HP and IBM!  Intel and Dell do not come in the list because these account names have "hyphen" in it.    How do I write the query to get all the Account Names using %Like% in a single query.

Is there a way to mix LIKE operator with IN ? Something Like  SELECT Id FROM Account WHERE Name LIKE IN:nameList   Where nameList is list of String? Is this is possible ? (I can make a dynamic query by doing OR with all the elements, but was looking for a more elegant way to do this)


After using .finditer() on a string I want to extract the index of the 'Match object; span=(xx,xx) and use them in a print(search_text[xx:xx])  statement.  How would I extract the locations of the search results.  matches = search_pattern.finditer(search_text)  print(search_text[xx:xx])    # need to find a way to get the slice indexes

How can I get the start and end positions of all matches using the re module? For example given the pattern r'[a-z]' and the string 'a1b2c3d4' I'd want to get the positions where it finds each letter. Ideally, I'd like to get the text of the match back too.


I am unable to remove languages from windows.  I have the following list of 4 languages installed   I want to keep only English (United States) and Hebrew  The other 2 languages I want to remove but the "Remove" option is disbaled.  Things I tried: The internet is full of suggestions like: editing: Computer\HKEY_USERS.DEFAULT\Keyboard Layout\Preload which had no effect  There are suggestions to try using the control panel to edit the languages but the control panel simply links back to the Settings app  There are suggestions to set some language as a default. but the default option simply does not exist  There are suggestion to use the options and remove the keyboard from the installed language. Each language has a single keyboard installed and the option to remove there keyboards is disabled as well.  This is very frustrating and any help would be appreciated.

I have just updated to Windows 10 April 2018 Update (1803 / 17134.1)  I had my laptop configured completely as UK with only a UK keyboard layout  Since the update, a US keyboard has been added so I now see the switch icon in my task bar    It appears that all the keyboard language settings are now migrated to the new Settings app and no longer in the old Control Panel    However, as can be seen from the screenshot above, the Remove button under the newly added US layout is greyed out (as is the UK one)  How can I remove the US layout?  UPDATE 1: I just updated my desktop and it hasn't added a US keyboard!  UPDATE 2: I added a third language (French) and was able to remove it, the button was enabled. The US remove button remained disabled both after adding French and after removing it.  UPDATE 3: I added another English language (Australian) and this cannot be removed! Button is disabled  UPDATE 4: I followed this  except I removed the values from the keys for all users and also the values under the Substitutions key. The task bar switch icon is gone but I still have all 3 languages in Settings still


INSERT INTO FoodLog (Person,Food,ServingSize,Date,Meal) VALUES ('John','Cheerios',2,'1-APR-2014','Breakfast') ('John','TBoneSteak',1,'2-APR-2014','Lunch')   In this code, the first line of code works just fine, but when I type up the second line of code with the same person name, it doesn't accept it.    This is the error that I receive:     Msg 102, Level 15, State 1, Line 5   Incorrect syntax near 'John'.

I have multiple set of data to insert at once, say 4 rows. My table has three columns: Person, Id and Office.  INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office"); INSERT INTO MyTable VALUES ("Jane", 124, "Lloyds Office"); INSERT INTO MyTable VALUES ("Billy", 125, "London Office"); INSERT INTO MyTable VALUES ("Miranda", 126, "Bristol Office");   Can I insert all 4 rows in a single SQL statement?


Every time I want to connect my Bluetooth speaker, I have to go through a fiddly annoying procedure. On initial connection it works with HSP/HFP (headset quality) but on A2DP (higher quality) there is only silence. I have to switch it from A2DP to HSP/HFP, then disconnect from it, then reconnect to it, then switch to it as an audio device, then switch it from HSP/HFP to A2DP. Then A2DP works.  Why does this happen and how can I stop it from happening?  I am open to upgrading software that might feature fixes for this and am open to automating the annoying procedure as a workaround.

I have an Emby media server running on Ubuntu 16.04 on a home server. I like to watch video on my laptop, running Ubuntu 16.10. Playback works as expected but when I try to watch with my Bluetooth headphones connected videos will not play.  If I run top on my server I can see that ffmpeg is maxing out the CPU:  6626 emby      20   0 1094264 348240  27820 R 181.2  4.3  10:46.21 ffmpeg   As soon as I quit trying to playback the video CPU usage drops back to an expected normal level.  If I disconnect the Bluetooth headphones, video playback immediately works OK and audio comes through the laptop built in speakers OK.  I usually use Firefox but I've tried Chrome, Chromium and Opera but they all exhibit the same behaviour when trying to play video with the headphones connected.  It appears the behaviour is not limited to my Emby media server, I've tried to play YouTube videos and they will not play either with the Bluetooth headphones connected.  The headphones and Emby video playback both work OK with my Android phone.  If I play the same video file from my server through VLC on my laptop, the video and audio work fine. This is a workaround but not my preference.  The problem seems to be related to playing video in a web browser with Bluetooth headphones connected. Can anyone help me get this working?


In the "Introduction to Cryptography: With Coding Theory" by Trappe and Washington, in the chapter about DES algorithm the authors say that:     "If double encryption is equivalent to single encryption, then the   (single encryption) cryptosystem is much less secure than one might   guess initially"   The authors don't explain what this means and why. Are you able to tell me ?

In the "Introduction to Cryptography: With Coding Theory" by Trappe and Washington, in the chapter about DES algorithm the authors say that:     "if a cryptosystem is such that double encryption is equivalent to a single encryption, then there is no additional security obtained by double encryption"   Why is this?


I am using Asus zenfone 5 running 4.4 kitkat, i have moved many games with obb files to sd card but when i was trying to move nfs most wanted to sd card but i noticed that it doesn't have an obb file rather it has multiple game files in android data folder, when i moved it to sd card via settings the data wasn't moved it is still occupying 1.95 gb on my internal storage, please help me move the game, and yes, my phone is under warranty so i don't want to root it

I have a Karbonn A15 with Android ICS (4.0.4), it's not rooted. I want to move the app data to my external sd card. I tried to move the /mnt/sdcard/data folder, just to check whether it releases any memory in the storage section in phone settings. But the internal storage was same, there was no change. Can anyone tell me where the app data resides in the internal memory? It's fine if I can move app data manually to the external SD card.


How would I rewrite this code snippet into a form that doesn't produce java.lang.NullPointerException?   Intent bank_Amount_Intent = getIntent(); Bundle bundle = bank_Amount_Intent.getExtras(); double buyin_Money = bundle.getDouble("buyin", 0); total = buyin_Money; bank_Amount.setText(String.valueOf(currency_Format.format(buyin_Money)));

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


I have a file 'controlpanel.php' that uses jQuery and communicates to another php file through AJAX Get requests. That ajax request will result in a table with some buttons being displayed in controlpanel.php  $(document).ready() is only called once, and it is called before the table is loaded (from the AJAX request).  How can I use jQuery to watch mouse handlers for the newly loaded table (aka after $(document).ready() has been called?   Specifically, I am trying to do something like:   $('[id^=modify-btn]').click(     function () {          alert("modify-btn !!");         //and other fun stuff     }     );   AFTER the AJAX request goes through, but I am unsure as to how to enable this trigger.    Thank you for your time!

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


is this happening because of the rig or something else? and how can i fix

I follow this  which uses rigify and I have run into some issues.    Not every vertex moves along the rig. Any idea what could cause this? I applied the location and rotation for every object.  The entire head is weight painted with blue.


Prove or disprove that the sum of two irrational numbers is irrational. How do i answer this? Thanks.

If $x$ and $y$ are irrational, is $x + y$ irrational? Is $x - y$ irrational?


After starting the virtual machine, it freezes at this point and won't start installing Ubuntu. There's no pop-up, welcome screen or whatsoever. I am using Ubuntu 16.04 LTS i386    UPDATE: So i was following this guide:  until I start the virtual machine. I should be seeing a welcome screen but I didn't. No error message or warning. I don't think it is the duplicate of How to install Ubuntu on VirtualBox? thread. Memory I gave: 1024 mb I also followed nathanwww's solution but got the same result.  Ok... So now I am confused. If I am trying to run Ubuntu on virtual box. Do I need a CD or USB to boot it?

I would like to know if anyone can help me with installing Ubuntu on VirtualBox


Is it possible to change the distribution of the label (default is  33/66%) in a horizontal form?    How can I have these label inline without let them going to new line?

Say we have a LWC with the following template in a component named example:  <template>     <lightning-textarea class="test"></lightning-textarea> </template>   And some css to go with it:  .test textarea {     min-height: 500px; }   The expected behavior is that the lightning-textarea will be 500px tall because the nested textarea has been made 500px tall.  The actual behavior is that nothing happens. The reason for this is that the compiled css will be:  .test[c-example_example] textarea[c-example_example] {     min-height: 500px; }   And the compiled (relevant parts of the) html will be:  <lightning-textarea c-example_example lightning-textarea_textarea class="test">     <textarea lightning-textarea_textarea></textarea> </lightning-textarea>   It's obvious that the  has scoped the textarea element to its parent, lightning-textarea and not our example component. This is an issue because the CSS processor has appended [c-example_example] not only to the .test part of the selector, but textarea as well.  It makes sense that CSS would be scoped downward, which is how Aura components handled scoping, but in LWC it's actually entirely isolated, so neither parent nor child elements can target it.  Is there any way around this? Or plans to support targeting child components? Being able to override and tweak the CSS of the standard component library was a very handy feature of Aura components, allowing customized appearances without having to rewrite the base component from scratch.  On top of that, this means that you can't reuse your own components in different contexts, giving them different styles in each. The component itself must be responsible for  all of its styling. While this is possible it requires a lot of conditional class assignments which is frustrating.


If $p$, $q$, $r$ are the real roots of equation $x^3-6x^2+3x+1=0$, determine the possible value of $p^2q+q^2r+r^2p$. My Attempt: $p+q+r=6     (1)$ $pq+qr+pr=3  (2)$ $pqr=-1      (3)$ Multiplying (1) and (2) and substituting (3) in it... I came close but still unable to find solution... Please Help

Let $a$, $b$, $c$ be the roots of $$x^3 - 6x^2 + 3x + 1 = 0$$ Find all possible values of $a^2 b + b^2 c + c^2 a$. Express all the possible values, in commas.  I've already tried to bash out all the roots, Vieta's Formula, and try to manipulate the equation to become easier to work with. However, Vieta's didn't get me anywhere, and I couldn't find a way to make the equation simpler or anything. Any hints to start this problem?


I was looking for the definition of "brimming" and I found it "To be abundantly filled or supplied"  And those examples on it A monument brimming with tourists. Workers brimming with pride. according to thefreedictionary.com My question: Is "Brim + ing" a  verb or a noun?

How can I distinguish between words which have the -ing in a sentence that are nouns, verbs, or adjectives?    For example sometimes -ing come with word to give us a noun, and sometimes a verb or an adjective.       That interesting snake.   That crawling snake.   That barking dog keeps everyone awake.     Is there any rule to determine whether a word with -ing is a noun, verb, or adjective?


If I ask someone this question:  What have you been doing in the last two hours?  is it the same if I asked: What were you doing two hours ago?  If it is different, what is the difference can you explain?  Thanks

I was just wondering, what is the most normal way of interpretating in the last two hours.  If somebody asked you: What have you been doing in the last two hours?  What events from what time period would you mostly cover in your answer if it was already 19:40?     A. I would mention all important things since 17:00 until 19:40(now)   or       B. I would mention all important things since 18:00 until 19:40   (because 40 minutes can be understood as almost hour, but I am not sure if people would count it if it is not full 60 minute hour yet)     C. I would mention all important things since 17:00 until 19:00   Personally, I would go with choice A. But I am not sure if this is the most common way people use it. It might seem that it is almost 3 hours (2h 40m) but so far it is still just 2 hours + some minutes because i would say in the last 3 hours ONLY if 3x60m was completed and would not care if it was more than 3 hours but it still would have to be less than 4 hours.  Does somebody understand me? Which is the most common way of understanding?


I remember reading a short story where the official space navy of the “Golden Empire” would only fight if hospital ships were close by, so they could be picked up and treated. They had to defend their home planet against some settlers from outer asteroids. The settlers welded guns onto every possible part of their ships, disorganized and messy compared to the Imperial ships. One settler ship blew up two navy ships, and then  kamikaze'd into the hospital ship, blowing it up as it exploded. All the Empire ships surrendered, and the Empire fell.  There was an Imperial historian, laughing as their city burned. It was because he realized the same thing would happen to the conquerors, later, as they developed an empire of their own.  I'm not sure when, or where, this was published. I've read a lot of science fiction over the years.  This was a story about centralized, decaying power and the virility of the frontier.

I read a short story a few years ago (late 90s) where a professor of Ancient History is giving his favorite lecture to his students about the rise of their empire.  Some points I remember:   The story is set in a packed lecture hall The lecture is about an ancient poem that commemorates the battle where the current empire captured Earth from the last empire. The lecture is interspersed with flashbacks from the invasion under discussion. In the flashbacks a professor of history discusses the rise and fall of the Roman Empire. The professor is excited to finish the lecture, but is interrupted right at the end and forced to read an announcement       This announcement suggests that a new invasion is imminent, but is couched in language that makes it sound like everything is business-as-usual.   My Google-fu has failed me.  Does anyone have any clue as to the title or the author?


I'm having trouble compressing image using compressor library() when I try compressing using Android-Image-Cropper() Everything works well, but when I use       Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);             photoPickerIntent.setType("image/*");             startActivityForResult(photoPickerIntent, RESULT_LOAD_IMG);   The error          java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference   occure

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 ask about the +1 ability of .  If the creature (that was the untapped land) dies from combat damage or any other effects, is the land removed from battlefield afterwards? Usually I´d say yes, but the card explicitly says It´s still a land.  If it is removed, then can I bring the land back with the -3 ability?  Thank you.

Some lands have an ability to become a creature, but they usually say they are still a land. If a land is a 3/3 creature and a land, can you target and kill it with a  to send it to the graveyard, or does it remain in play as a land?


I need run two Java applications simultaneously but each one use requires different Java version. My default Java is 1.8, but I need to run one of the applications with version 1.6. Is there a way of config the two versions simultaneously?  The applications are:   Oracle JDeveloper 12.2.1.2.0 (JDK 1.8) Oracle JDeveloper 11.1.1.6.0 (JDK 1.6)   Thanks

On Ubuntu 12.04 LTS I have installed Sun's JDK7, Eclipse, and the Arduino IDE. I want the Arduino to use OpenJDK 6 and want Eclipse to use Sun's JDK 7.   From my understanding I need to manually choose which Java to use before running each application. This led me to the update-java-alternatives -l command. When I run this I only see the following:   java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64   but when I run update-alternatives --config java I see the following:   *0  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   auto mode 1  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   manual mode 2  /usr/lib/jvm/jdk1.7.0/bin/java                   manual mode 3  /usr/lib/jvm/jre1.7.0/bin/java                   manual mode   I don't understand why the update-java-alternatives doesn't display the same 3 options. I also don't understand how to switch between OpenJDK6 and JDK7. How I can go about using the OpenJDK6 for Arduino development and Sun JDK7 for Eclipse/Android development?


I was issued a Schengen visa from the German embassy. I gave all the right documents and dates, and while the date validity matches my trip, the duration of stay is 1 day less than it should be based on my tickets. (I have a 8 day duration of stay, and my flight out is on the 9th day after I land. My visa is valid until the 10th day after I land)  Is there any way I can get away with not changing my tickets? (It is super expensive to change). For example, can I get to the airport and get out of the Schengen area a day before my flight and stay "airside" for ~14 hours?

I have short term german visa for three days.  I don't have a flight in my budget on the 3rd day night so I want to know if I can finish my immigration on the 3rd day night and take up the flight next day morning.   Do the airline companies and immigration allow such things.


I try to deploy my web application on Tomcat by IntelliJ. This application is in WAR. I run server and start deploy, but I get the following error:     cze 21, 2017 2:18:39 PM org.apache.tomcat.util.modeler.BaseModelMBean invoke SEVERE: Exception invoking method createStandardContext java.lang.NullPointerException at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:633) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1471) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1312) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1404) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:832) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)   I have Tomcat v. 7.0.62 bundle with Liferay Portal 6.2 CE GA6 and IntelliJ Idea Ultimate 2017.1. What can I do with this problem?  EDIT: My run configuration in IntelliJ:


I'm trying to use footage from my Samsung Galaxy S6 for tracking in Blender but I don't understand the camera settings. Focal length and sensor width confuses me.  I've used a sensor width of 5,8 mm and a focal length of 4,3 mm. I got those settings from the "Phone tester" app.  Average error of about 300.

I've been trying to track a footage taken by my Samsung Galaxy Note 8.0 (GT-n5100) tablet. It has a good 5 mp camera and I tracked the footage well. But the problem arises at the time of solving the camera. The solve error is too high (more than 2). I don't know the width the tablet's camera sensor or the focal length or any other specifications. So my question is, has anybody been able to solve the camera on footage shot by a smartphone and if yes,  what camera and lense specs did you feed to the Blender?


I'd like to run dpkg --configure virtualbox-guest-x11 from within a shell script so it can answer N to the following question.  $ dpkg --configure virtualbox-guest-x11 Setting up virtualbox-guest-x11 (4.1.12-dfsg-2ubuntu0.6) ...  Configuration file `/etc/X11/Xsession.d/98vboxadd-xclient'  ==> File on system created by you or by a script.  ==> File also in package provided by package maintainer.    What would you like to do about it ?  Your options are:     Y or I  : install the package maintainer's version     N or O  : keep your currently-installed version       D     : show the differences between the versions       Z     : start a shell to examine the situation  The default action is to keep your current version. *** 98vboxadd-xclient (Y/I/N/O/D/Z) [default=N] ?   Is there way I can pass an argument to dpkg --configure or is there a certain file where I can set the default arguments that should be accepted when the package virtualbox-guest-x11 is configured?

When running apt-get -y install <packages ...> on Ubuntu 10.04 I would like apt-get (or aptitude if that makes it easier) to not prompt me when installing additional dependencies (behavior of -y as I understand it) and but not prompt me about overwriting configuration files, instead assume to keep the existing ones always (which is usually the default). Unfortunately --trivial-only seems to be the inverse of -y and not affect the prompt that is shown, according to the man page.  In particular packages auch as samba, nullmailer, localepurge and lighttpd have forced me to interact with the terminal, even though the whole procedure was scripted and meant to be non-interactive.


I am trying to get the value of 1-0.9 in javascript but it giving me 0.09999999999999998 in place of 0.1. Please help to get the desired output.

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


Say I have a copy of Llanowar Elves from the 2017 Core Set. Can I put it in a current Standard deck, or do I need to have a version from currently Standard-legal set?

Say, for example, you have a card that is still legal in standard but the version you have of it comes from a set that has since been rotated out. Can you still play the version from your older set?


My PC has 8Gb DDR3 RAM. I use Ubuntu 16.4.   I did not set swap memory due limitations of my HDD (which allows me only 4 active partitions).  Do I need swap? What difference does it make to my PC? What do I get from swap memory?

I had installed Ubuntu to my Dell Inspiron laptop with 3 partitions.   After I installed Windows I was unable to create new partitions, since I already reached the maximum number of partitions.  So I deleted the Ubuntu partitions and I installed Windows on two partitions. So I have got 4 partitions with Windows.  Then I tried to install the Ubuntu that previously deleted(on unallocated space). But the problem is that unallocated partitions are grayed out and can't be used.  Now what can I do?


I have the following declaration for a function collectStats in a class called Analyzer:     template <size_t C>     void collectStats();  And the following definition (empty since I'm just trying to get everything to link)     template <size_t C>     void Analyzer::collectStats() {}  And the following invocation:     collector.collectStats<size_t(3)>();  And the following error message: undefined reference to `void Analyzer::collectStats<3ul>()'  I've seen other similar invocations posted around stackoverflow (passing non-type template parameters) () I have also tried static-casting 3 to a size_t, but I get the same error message. Maybe this error has something to do with the fact that the parameter seems to be resolving to an unsigned long, but I don't know why this would happen in the first place? Any insight would be greatly appreciated.

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


Two vectors  $a = (1,-2,2,-3)$ and $b=(2,-3,2,4)$  I need to complete the basis for $\Bbb{R}^4$  I know that there's a way of solving 2-equations linear system like $$\begin{pmatrix}a \\ b\ \end{pmatrix}\cdot x = 0$$ to get vector $c$, and then solving 3-equations linear system to get vector $d$ But are not there other ways? I heard that gram schmid proccess could be helpful, but I am not sure how to apply it here as well ass if this idea is correct at all.

This is a very elementary question but I can't find the answer in my book at the moment.  If I have, for example, two vectors $v_1$ and $v_2$ in $\mathbb R^5$ and knowing that they are linear independent , how can I extend this two vectors to a basis of $\mathbb R^5$. I  know that I just have to add $v_i$ for $3\leq i \leq 5$ such that they are linear independent but how can I do that? Is there an easy algorithm?


I have read that accelerating continuously dilates time in the frame of reference of the traveller asymptotically until reaching speeds near c. You read for example that the voyager could reach the center of the galaxy in just 27 years from his perspective:     But from the reference of a photon traveling at the speed of light, how much time has passed ? And I know those questions are far from graduate level physics but, one paradigm you learn in highschool describes photon as both particule and electromagnetic wave, with a certain frequency. Could you ask then, from the reference of the photon traveling at c, how many time did it oscillate from A to B ?  Does time exists in the reference of the photon or is it traversing the whole space "immediately" in its frame of reference ?    Thanks !

To an an external observer it appears that time has stopped for photon. But this relation is reflexive, so for an observer travelling with the photon it appears the universe has stopped everywhere.  Is this right?  Space also gets distorted parallel to the direction of motion, but not perpendicular to it.   Does this mean that for an observer travelling with a photon sees spacetime as a flat plane?  Note 1: I'm using language vividly not literally when I say a photon experiences space and time. Not that I'm against idealist or panpyschist interpretations of matter or energy come to that.  Note 2: Since it's been pointed out that an inertial frame can't be boosted into the frame of a photon and moreover there is no limiting behaviour here - no matter what frame you are boosted into, light will always appear to travel at c. Nevertheless, when an external observer watches a train chasing a photon by gradually increasing its speed, he will note that the train speed is approaching the speed of the photon (but will never match it) and when he looks at the clock inside the train he will not too that it is gradually slowing down (but never actually stops). Using this picture, we can attempt the thought experiment - if not one that can be carried out - of what a world looks like to a photon.


Good day! Сan anyone help me please? How can i create realistic coffee foam?   I am new to blender and don’t know much.  Here is my nodes.   I took a 2D cooffee foam texture from google and created a normal map at .  But i'm sure that there is an option to create more realistic foam.

My goal is create realistic foam. I mean really realistic foam with bubbles, no only SSS shader and done :-).   Use particle system's is not enough, because bubbles overlaps and black artifact's appear.  Any ideas? Some reference images and something about bubbles:    EDIT:  I want this for 360° turntable animation. Bubbles and foam does not to be animated, but should be good keep reasonable render time.  Of course, if someone know how to make it animated I glad to learn it and I'm sure I'm not only one. But my priority is realistic look, not animation.  Only for clarification: I don't need to know how to make bubbles in beer (there is very good tutorial by Andy Price), please focus only on foam. Beer is not important.


According to "ESRI Shapefile Technical Description An ESRI White Paper—July 1998", Vertices for a single, ringed polygon are, therefore,always in clockwise order. Otherwise,"Dirty" polygons occur when the rings that define holes in the polygon also go clockwise, which causes overlapping interiors.   In my understanding, you can create donuts polygon with "avoid intersection of new polygons" is checked on snapping option, even if both polygon(inner and outer) are created clockwise roated.    It has not necessary to care about clockwise rotation when you create polygon in QGIS.  Is this a right understanding?

Two days ago I asked a question about the internal storing order for the vertices of a polygon in ESRI shapefiles. That question was answered () and it was also answered in an old post () But now my question is more general, and I don't know if it has an unique answer. Is the clockwise order only for ESRI shapefiles or for general GIS formats? And what about the internal representation for a GIS software? For example, if I use QGIS and I read a *.shp containing polygons I suppose the internal representation of the outer bound is clockwise as in the original shapefile, but what about for all the file formats supported by QGIS? And for ArcGIS? And in the case there exists a file format with polygons stored in counterclockwise, if these files are loaded in QGIS, ArcGIS, etc., is the orientation changed internally, so if I read the data using PyQGIS, for example, the polygons are clockwise ordered? My purpose is to write a plugin for QGIS, but the source of data can be ESRI shapefiles or other formats. As I need to check the angles between consecutive sides of polygons using their azimuths I need to known if the order is clockwise. One solution is computing the area of each polygon and, if I remember correctly, if it is positive the order is clockwise and if negative the order is counterclockwise. Area computation is not an intensive task, so it will not slow my plugin so much. But in the special case of QGIS, anybody knows if it stores the polygons clockwise or counterclockwise, regardless the order in the original source? By now I'm working with ESRI shapefiles and the coordinates in layer.getFeatures().geometry().asPolygon() are stored in clockwise for the outer border and counterclockwise for the holes, i. e. as in the original *.shp.


I created a dictionary that counts the number of occurrences of each word in a separate text file. So far it looks like this. import sys  def main():     d = dict({})          with open(sys.argv[1], encoding="utf-8") as f:         for line in f:              line = line.strip()              line = line.lower()              words = line.split(" ")             for word in words:                  if word in d:                      d[word] = d[word] + 1                 else:                      d[word] = 1          for key in list(d.keys()):         print(key, ":", d[key])      if __name__ == "__main__":     main()  In the command line, I input a text file for it to count the frequencies of each word (executing "python3 frequencycount.py example.txt"). This code effectively executes a list of all words in the text file and it counts how many times they occur. What I'm trying to do now is print the words in descending order by frequency of occurrence. For example, my text file is a list of vegetables (pepper 5 times, carrot 9 times, peas 8 times, and broccoli 1 time). The list looks like this: Pepper : 5 Carrot : 9 Peas : 8 Broccoli : 1  However, I would want it to print like this: Carrot : 9 Peas : 8 Pepper : 5 Broccoli : 1  How can I make it print in descending order like this? Thanks.

I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]


I used \newtheorem{definition}{Definition}[section] \newtheorem{proposition}[definition]{Proposition}  so that the numbering goes on as if proposition and definition are "the same object". But the problem is if I use \cref{...some proposition name...}, then the output is not "proposition 2.7", but "definition 2.7". How can I fix this problem?

I am trying to use the  package.  I have the following counters defined (hopefully this is the right way to do it!)  \newtheorem{thm}{Theorem}[section] \newtheorem{lemma}[thm]{Lemma} \newtheorem{cor}[thm]{Corollary}   This works as I would like (i.e. Theorem 1.1, Corollary 1.2, Lemma 1.3, etc.)  My problem is \cref always returns Theorem 1.2, Theorem 1.3. I   Perhaps this is not right? (In my preamble)  \crefname{thm}{theorem}{theorem's} \crefname{lemma}{lemma}{lemma's}


I have a problem, I want to import a model in a Marmoset Toolbag scene into Blender. MarmoSet can export models to FBX and it is working great, except the textures. In the Principled BSDF node the metallic slider is set to 1 and specular to 2, which makes it a mirror, but when I make it lower it  looks like PS2 textures. While the materials look beautiful in Marmoset.. Is there any way to change this? Or import a .tbmat file to see if that works, thanks for helping, here are screenshots of marmoset, blender and node editor. @Duarte Farrajota Ramos I dont get what you mean, I need to import Marmoset into Blender instead of other way around sorry if i dont understand

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


Trying to create an Object array, but get "cannot create a generic array of Object".  I tried to cast it with (Object[]), but it didn't help.  public class Container<Object> {  Object start;    Container(Object start){      this.start=start;  }   LinkedList<Object> save = new LinkedList<>();   public Object[] toArray() {     Object[] test = (Object[]) new Object [3]; // cannot create here     for (int i=0; i<save.size(); i++)     {             ...     } }

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I have create a simple user registration form in C#.net (windows application) which have DateTimePicker control, TextBox control and a ComboBox control. Now i want that all the entered information can be view from a second form say ProfilePage of the user. How can i achieve this as i am new to this technology. Thanks in advance

What do you do to pass information between forms?  Forward is straight forward (sorry) using Properties or maybe parameters in a New() or DoStuff() method, but what about sending something back when the user is done with the second form?  (IE. ID of the item selected) We have used all these:   Passed the calling form into the called form as a ref so the called form could access properties or methods on the calling form.  I really don't like this because the two forms are very dependent of each other.  Passing the calling form as a object only slightly improves this. Use Events This somewhat decouples the code, but the signatures must match on the event handler. Use an Public Interface I'm talking about the .NET built in one, but I suppose you could create your own.  This seems like the best to me.   Now raise the bar, what if the forms are in two different DLLs?  As long as the forms are not dependent on each other, I would think this wouldn't be a big step.


I am having issues with battery, touchscreen, rotation, authentication and freezing problems in 20.10, I want to downgrade is that possible?

I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible?


I was wondering if you guys know how to get the date of currents week's monday based on todays date?   i.e 2009-11-03 passed in and 2009-11-02 gets returned back  /M

How do I find the start of the week (both Sunday and Monday) knowing just the current time in C#?  Something like:  DateTime.Now.StartWeek(Monday);


I have downloaded "libweb-scraper-perl_0.36.orig.tar.gz " from the link given below :     and it is in desktop folder, help me to install it in 32 bit ubuntu 14.04.2

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


Let us imagine some amount of mercury $\left(\text{Hg}\right)$ contained in a cylinder. It is being rotated about the central axis at a constant angular velocity $ω$, and the system has moment of inertia $I$.  I want to find an expression for its radius of curvature. Let us place the cross section of the system on the $\left(x,\,y\right)$-plane such that the $y$-axis passes through the center of the surface and the $x$-axis tangents the surface in the following way:$\hspace{200px}$.  Now, if we can express this curvature as $y=f\left(x\right)$, then we can say that$$ r=\left| \frac{\left[1+\left(f^{'}\left(x\right)\right)^2 \right]^{3/2}}{f^{''}\left(x\right)} \right| \,.$$   Now, if we can find $f\left(x\right)$ in terms of the $I$ and/or $ω$ and any physical quantity like acceleration due to gravity, we would replace it in the previous equation and find $r$.   Please help me to proceed.  EDIT:  I read the page tagged. My Question is how did the get $y= \dfrac{(x^2 \cdot \omega^2)}{2g}$?

I was going through fluid dynamics and I came upon this section on the shape of a liquid surface in a rotating cylindrical vessel. The working in the book is something like this:   It considers a mass $m$ of water on the surface of the rotating liquid at a distance $x$ from its axis of rotation .It takes into account a pseudo force ($m \cdot x \cdot \omega^2$) radially outwards and its weight force ($mg$).It then proceeds to calculate the net force and the angle it makes with the vertical.From there through basic integration it gets the equation of the surface of liquid  i.e. $y= \dfrac{(x^2 \cdot \omega^2)}{2g}$ .  I get this working.  But if I were to view the same rotation through an inertial frame,how would I proceed? I mean, there wouldn't be any pseudo force, rather a centripetal acceleration of same magnitude radially inwards.This is where I am facing certain doubts.  The forces on the liquid would be  the centripetal force inwards and the weight force downwards.The net force would therefore be in a different direction,and consequently the slope of the surface at that point would be in a different direction.How is it possible for the same surface to have two different shapes in two different frames?   I would be obliged if someone could help me out by pointing out the flaw in my understanding.


I am trying to write a python code for select analysis.  FIPS: column in feature nameofinputfeature whose values needs to be compared with OFIPS  OFIPS: variable whose value is known each time the code is run.  I am having a problem in syntax of the {where clause}   my code is:  arcpy.Select_analysis("nameofinputfeature", "C:\\a.shp", '"FIPS" = %OFIPS%')

I am trying to loop through a shapefile, selecting each feature in turn and copying it to a temporary shapefile to by included in a union analysis. I'm using a cursor to find the ID name for each feature which I'm setting to a varible 'Name'. Whenever I try to use this variable as part of the where clause in arcpy.Select_analysis I get an error:   ExecuteError: ERROR 999999: Error executing function. An invalid SQL statement was used. An invalid SQL statement was used. Failed to execute (Select).  The code I'm using is:  Name = 101 where = "\'\"StudyID\" = \\'"+str(Name)+"\\'\'" arcpy.Select_analysis("C:\\input.shp", "C:\\output.shp", where)   If I type it out without using the variables:  arcpy.Select_analysis("C:\\input.shp", "C:\\output.shp", '"StudyID" = \'101\'')   it works fine  What to I need to do to fit the variable into the sql statement?


My very limited understanding of magnetism is that it is essentially stored energy. However what I'm confused on is about the following situation: If you have a compass and you move a magnet close to it the compass will move. My question is, where is that energy coming from? Is the magnet losing some magnetism or energy related to the magnetism? And if so does that mean that a "permanent" magnet would actually lose magnetism faster if you were to bring it around things that react to magnets easily than if it were left in an area devoid of such things?

When a permanent magnet attracts some object, lets say a steel ball, energy is converted into for instance kinetic energy and heat when attraction happens, and they eventually collide. Does this imply that energy is drawn from the magnetic field and the magnet is depleted, making it weaker and weaker for each magnetic attraction performed?  (if the answer requires Quantum Mechanical explanations, please elaborate :))


I would like to produce an equation over two lines with a bracket opening in the first line and closing in the second line. Unfortunately, however, using the "\left" and "\right" commands (to have the size of the brackets automatically adjusted) leads to an error.  \begin{align*} L &= \left[ \frac{a}{b} \\ &+ a \right] \end{align*}   I would be very grateful for any advice on how to solve this problem! :)

I have a multi-line equation that I want to have matching sized parentheses. The advice I read online was to use \left( equation \right. \\ left. rest-of-equation \right) . However, this syntax leaves first half of the equation unaware of what is in the second half. For example, if you include a square root term after the break, the second parenthesis will be larger than the opening parenthesis. When you are using the aligned environment to split a long equation this can look somewhat offputting.    Compare the top equation to the bottom one. The parentheses match in size for the bottom equation, but the left hand parentheses for the top one is  noticeably smaller.  Top Code:   \begin{aligned}[t]   \gamma_{\text{u}} + \frac{1}{108}   \left(57\gamma_{\text{er}} \right. &+  38\gamma_{\text{se}}\\ & {}\pm  \left.\sqrt{2601 \gamma_{\text{er}}^2 + 3648  \gamma_{\text{er}}\gamma_{\text{se}} + 1444 \gamma_{\text{se}}^2}  \right)   \end{aligned}   Bottom Code:  \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{16} \left(9\gamma_{\text{er}}  +  6\gamma_{\text{se}} \pm  \sqrt{49 \gamma_{\text{er}}^2 + 76 \gamma_{\text{er}}\gamma_{\text{se}} + 36 \gamma_{\text{se}}^2} \right) \end{aligned}


I can't find the story I read which is about a boy raised by two male dark wizards in a kingdom where dark wizards are hunted.       He meets a princess that escaped and I think one of his foster parents die in the end.

I was reading Sew You Want to be a Hero, second book of the Threadbare series, and there's a scene where a character is commenting on how the Knight class (it's LitRPG where people are aware of their game stats) gain power by taking a vow and sticking with it, and it reminded me of another (non-LitRPG) work of fiction where there were several forms of magic, but the most common accepted one involves taking self-denying vows of poverty, chastity, etc to gain fighting prowess (and no, I'm not thinking of The Book of Exalted Deeds) with one particularly powerful warrior having given up eating and drinking for some decades (he wore a sort of armor that kept him from malnourishment, but does not alleviate the hunger and thirst). Initially, it's described only as being male warriors, but it later turns out that a set of religious sisters have a similar powerset owing to privation. A key factor in both forms is that you gain more power the longer you keep your vow, but the moment you break it, you're back to square one.  There were other forms of magic, one being some sort of "forbidden magic" that still works on sacrifice, but allows you to use the (possibly unwilling) sacrifice of others, and a lost art of enchanting objects (which is where the previously mentioned magic armor comes from).  I read this in the last decade, but I can't say where.


Why don't I have this option?    here's my disk layout  sudo fdisk -l  Disk /dev/sda: 640.1 GB, 640135028736 bytes 255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x5b53cc54     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048      409599      203776    7  HPFS/NTFS/exFAT /dev/sda2          409600  1153767021   576678711    7  HPFS/NTFS/exFAT /dev/sda3      1216962560  1250050047    16543744    7  HPFS/NTFS/exFAT /dev/sda4      1250050048  1250261679      105816    c  W95 FAT32 (LBA)  Disk /dev/sdb: 4005 MB, 4005527552 bytes 32 heads, 63 sectors/track, 3880 cylinders, total 7823296 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x20d8782d     Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *          63     7822079     3911008+   c  W95 FAT32 (LBA)

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


I know that lsof can list all files which are being opened by running processes.  If there is a process, which will open a file and then will be terminated, I don't think I can catch the file that is opened by the process with lsof because the process terminated itself too fast.  So I'm looking for such a tool (named XXX), allowing me to do the thing as below:  XXX ./my_process args   And the output of the command should be like this:  file1 file2 file3   Which means that the my_process opens three files: file1, file2 and file3 while running.

time is a brilliant command if you want to figure out how much CPU time a given command takes.  I am looking for something similar that can list the files being accessed by a program and its children. Either in real time or as a report afterwards.  Currently I use:  #!/bin/bash  strace -ff -e trace=file "$@" 2>&1 | perl -ne 's/^[^"]+"(([^\\"]|\\[\\"nt])*)".*/$1/ && print'   but its fails if the command to run involves sudo. It is not very intelligent (it would be nice if it could only list files existing or that had permission problems or group them into files that are read and files that are written). Also strace is slow, so it would be good with a faster choice.


I'm sure this question has been asked before but probably not to the extreme degree of my situation. I am nearing the end of my undergrad experience (Electical Engineering and Mathematics) and I want to at least apply to some solid grad/PhD programs in pure math. The problem is that while I have a top notch GPA in all of my math classes from Calc I to my graduate level real analysis class, I have a very poor GPA in just about every non-math or EE class I ever took. To quantify this more precisely, I get almost all A's with one exception (B+ in abstract algebra) in math classes but I get mostly C's and the occasional B in all of the useless gen-ed classes. For my electrical engineering classes, I also get mostly A's but a few more B's sprinkled in. I also got a "C" in chemistry for whatever that is worth.   I have been fearing that my distaste for the "liberal arts" might greatly restrict my choices for grad school. I'll say that I am at a state school that has a solid reputation for technical (think something along the lines of NC State) studies but is much more focused on the applied side of things. My main interests are in functional analysis and as you might guess from my user name, I really like wavelets. I was thinking about applying to somewhere like Rice, which might be a stretch given my mediocre overall GPA but perhaps with the right recommendations, I might have a chance. Can anyone with some experience in this area tell me if I am living in a fantasy land or if I have a realistic chance?  Edit: Just to make this more clear, lets say hypothetically that my overall GPA was 2.8 but my math GPA was a 3.95 and my EE GPA was a 3.75.  Edit: This question is a little bit different in the sense that my situation is probably more extreme and specific. I was hoping to get some feedback from people who have been in my shoes or known other people in my shoes. While the answers to the other question were somewhat enlightening, I am not a foreigner/ESL and I do not have that excuse for why I did poorly in the humanities.

I'm currently a junior in mathematics at UIUC. I have been doing pretty well in my math courses (mostly A and A+). I will be completing a graduate course in topology, a second course in abstract algebra, and a complex analysis course before I graduate.  I feel that I can work hard to maintain good grades in my math courses, but my non-math courses are not that good (some B and C's).    Do graduate schools care more about my math courses grades more or my general GPA more?  Will poorer marks in non-math courses hurt my chances of getting into good grad schools?


My question is as follows:  Why is it problematic to define energy-momentum tensor for the gravitational field?  P.S. It is well-known that in GR we get the energy-momentum tensor of "matter" by taking the variational derivative of the action $S_m$ of matter fields with respect to the metric field: $$ T_{MN}=-\cfrac{2}{\sqrt{|g|}}\cfrac{\delta S_{m}}{\delta g^{MN}} $$  Why can't we use an analogous procedure to define the energy-momentum tensor for the gravitational field $g_{MN}$? That would lead to the Einstein tensor $G_{MN}$ (at least for the Einstein-Hilbert action $S_g\sim g^{MN}Ric_{MN}$). However, for some reason the phrase "energy-momentum tensor of gravity" is persistently avoided. I understand that the problem is conceptual (for instance, then we would have the total energy-momentum of a gravitating system always being zero), but could anybody explain that in more detail?  Thanks!

Starting  with the Einstein-Hilbert Lagrangian  $$ L_{EH} = -\frac{1}{2}(R + 2\Lambda)$$  one can formally calculate a gravitational energy-momentum tensor   $$ T_{EH}^{\mu\nu} = -2 \frac{\delta L_{EH}}{\delta g_{\mu\nu}}$$  leading to  $$ T_{EH}^{\mu\nu} = -G_{\mu\nu} + \Lambda g_{\mu\nu} = -(R_{\mu\nu} - \frac{1}{2}g_{\mu\nu}R) + \Lambda g_{\mu\nu}. $$  But then, in the paragraph below Eq. (228) on page 62 of  paper, it is said that this quantity is not a physical quantity and that it is well known that for the gravitational field no (physical) energy-momentum tensor exists.  To me personally, this fact is rather surprising than well known. So can somebody explain to me (mathematically and/or "intuitively") why there is no energy-momentum tensor for the gravitational field?


The name currently escapes me, but the story goes along the lines of that the protagonist, a high school student, who is a werewolf, meets a new student by the name of Elise.  Somewhere down the lines, she meets a stranger, and ends up becoming a vampire. That stranger is also targeting other students, and it's up to the protagonist, and a friend knowledgeable about the supernatural to put a stop to him. Prior to Elise being turned, there was not active conflict between the vampires and werewolves.  The only other info I can muster up is the book is from the late 80's - early 90's from the cover art, although I read it in my high school in 2008.

I'm searching for an old novel I read back in high school. It involved the main protagonist being a high school student who is also a Lycan (werewolf). It's set in high school, where she meets a new girl, named Elise. Somewhere down the lines, Elise becomes seduced by a stranger, and turned into a vampire.  That stranger is also targeting other students, and it's up to the protagonist, and a friend knowledgeable about the supernatural to put a stop to him. Prior to Elise being turned, there was no active conflict between the vampires and werewolves.  Eventually, the protagonist manages to track him down, with Elise helping her, at the expense of her life.  The only other info I can muster up is that the book is from the late 80's - early 90's from the cover art, although I read it in my high school in 2008.


I'm posting links to photos on Dropbox of 3 de Buyer skillets I own. They have been placed into the dishwasher over and over again against my advice unfortunately. I want to know if what I'm seeing on them now is rust, and if so are they permanently damaged or is there something I can do to revive them?

So this has been an on-going saga the last few days, and I've already posted several related questions here, and I am feeling quite defeated.  I have/had a beautiful 16" cast iron dutch oven from Cabelas. I took it out for a test spin the other night (I had completed all seasoning steps that the Google Gods recommended). Then:   I tried (and failed spectacularly) to cook a pork roast in it, but cooked it at way too hot a temperature and burned/charred/fused the animal fats/juices into the oven, whereby it basically baked into the cast iron (related question ) I tried cleaning/scrubbing it with coarse-grained salt -> did nothing Then I tried cleaning it with dishwashing liquid + salt -> did nothing Then I let the whole thing soak in a vat of a 50/50 mixture of water + white vinegar -> took all the tarry slude off, stripped some seasoning off (revealing bare iron), but in 80% of the burned/charred areas, still did nothing Then I went to town on it with a steel wool and salt and dishwashing liquid and was left with some smooth, properly seasoned surfaces, and some more areas stripped down to bare metal I decided to just re-season it. So I scrubbed it one last time (about 1 hour ago) with a steel wool and some water, got all the rust and remaining crud off (finally), and built a fire. I placed it on the hot coals of the fire and let it sit there for 15 mins. My intention (whether misled or not) was to burn off all the remaining water from when I had previously washed/scrubbed it, then let it cool off, then season it with oil, and then bake it for a few hours.   So I just took the oven off the fire and opened the lid...and the entire inside is covered in rust. An hour ago there was none. When I put the oven into the fire 15 mins prior, there had been none (yes, I checked) This just came out of nowhere.  I'm ready to give up, unless anyone can offer some concrete set of steps for me that will salvage this $100 rust bucket. How can I get rid of the rust and then re-season this before more rust sets in? Meh...


I'm trying to model a dino, but when I try to move a selected vertex the whole cube moves.

My problem is that I sometimes lose the ability to independently translate or otherwise transform any parts of a single mesh. If I try, for example, to just translate several faces, edges, or vertices, then the entire mesh will stretch and displace itself in order to follow the translation. Or, alternatively, if I try to translate just one face then the whole mesh will move as if I'm translating in Object Mode.  I'm not really sure I know how to describe this problem properly. I don't even know how to reliably reproduce it. It seems to happen to any given mesh at random, and it doesn't stop happening to that mesh unless I delete and remake it.  I assume that I must be doing something wrong to cause this to happen. Does anyone have any ideas? Thanks.


I look for information that I have not found in the PHB or in the DMG. With what level are the spells of a scroll cast?  Example: a level 20 wizard with a scroll of Magic Missile. At what level does he cast the spell on the scroll?   In what section or page does the rule that explains it appear?

For example,  says:  You create three glowing darts of magical force. Each dart hits a creature of your choice that you can see within range. A dart deals 1d4 + 1 force damage to its target. The darts all strike simultaneously, and you can direct them to hit one creature or several. At Higher Levels. When you cast this spell using a spell slot of 2nd level or higher, the spell creates one more dart for each slot level above 1st.  If a PC finds a scroll of Magic Missile, can it be cast as you would with a level 2 slot (and what are the conditions to do this)? Or will it always be level 1?


is there a photo recovery tool for lost partition except photorec becuz photorec recovers all file extensions, I really need to recover photos, please don't tell me to use testdisk, I just need photo recovery tool.

I was working on a LibreOffice Writer document when my computer turned off. No problem there, I booted up, went back into LibreOffice and it gave the option to recover everything. I left the document up on my computer and a family member came by, closed it and hit Don't save. I had never officially saved it yet I believe.  I see that by going to .config/libreoffice/4/user/backup, it looks like I can view LibreOffice documents that are being "autosaved" until I officially save them (or "don't save" them). That leads me to believe it may be possible to recover this document since it was at least autosaved there before. Would I just go to advanced options in testdisk, and from there select the large partition (I only have one SSD), and then read through the list? Will testdisk pay attention to these autosaved LibreOffice documents that were temporarily in a backup folder until the user decided to oficially save?


I have limited experience with matlab's nn toolbox but I can manage to train a network and get it to generate decent results. However, I have no idea how many hidden layers, hidden nodes, which transfer function for each layer, and which training method to use.  I tried searching online for tutorials but all of it seems really vague and subjective. Can someone direct me to any good websites?

I'm looking for a paper that could help in giving a guideline on how to choose the hyperparameters of a deep architecture, like stacked auto-encoders or deep believe networks. There are a lot of hyperparameters and I'm very confused on how to choose them. Also using cross-validation is not an option since training really takes a lot of time!


In my calculus class, my teacher said that if one was to try to calculate the maclaurin or taylor series of $\tan x$ by strictly using the definition , then you would run into many problems and your answer would involve 'Bernoulli' numbers. That is why if we are to do the expansion for $\tan x$ , we must use division of power series.  But my question is, what are these numbers? Is it a just the ratio that appears when doing division of the series of $\sin x$ over $\cos x$? Is it some special ratio related to factorials?  Apologize if it is trivial, I have looked at other sources but I don't seem to fully understand this. Thank you all.

Can somebody explain me or give me a link with a intuitive point of view of Bernoulli numbers? I mean, somebody just saw a typical sequence of numbers that appears in some Taylor expansions, and them called them "Bernoulli numbers"? How do they become with a method for finding these numbers? What's the intuition behind this?  I'm asking it because I can only find non-intuitive PDFs that only accept strange formulas and don't even explain them. And I wanted to know how to calculate a Bernoulli number.


My question is:   n-qubit product state. $$|\psi\rangle=(a_1|0\rangle+a_2|1\rangle)\otimes(b_1|0\rangle+b_2|1\rangle)\otimes \cdots$$  n-qubit Entangled state  $$|\psi\rangle=(a_1|000\cdots000\rangle)+(a_2|000\cdots001\rangle)+(a_3|000\cdots010\rangle) \cdots$$  In the entangled states there are $2^n$ different amplitudes which I understand why. My problem lies in if we multiply out the product states we will also get $2^n$ amplitudes (while the correct answer is $2N$) (correct me if i am incorrect)  if we considered it to be three qubits then it will be  $$(a_1|0\rangle+a_2|1\rangle)\otimes(a_3|0\rangle+a_4|1\rangle)\otimes(a_5|0\rangle+a_6|1\rangle) $$  if we multiply them together it will be:  $$a_1a_3a_5|000\rangle+a_1a_3a_6|001\rangle+a_1a_4a_6|011\rangle+a_1a_4a_5|010\rangle+a_2a_4a_6|111\rangle+a_2a_4a_5|110\rangle+a_2a_3a_5|100\rangle+a_2a_3a_6|101\rangle$$  which also gives the same 3 qubit arrangements as a general entangled qubit state $$a_1|000\rangle+a_2|001\rangle+a_3|010\rangle+a_4|100\rangle+a_5|110\rangle+a_6|101\rangle+a_7|111\rangle+a_8|011\rangle$$  So where is the difference? If I made any mistake along the way please point it out for me. This is an assumption i made in an online course on quantum computation and i didnt quite understand what made entangled states increase computational space to 2^n and when using product states computational states was only 2N  Consider that this is my main concern. I am sorry if its a silly question as i am still a beginner in the field.

Entanglement also allows multiple states to be acted on simultaneously, unlike classical bits that can only have one value at a time. Entanglement is a necessary ingredient of any quantum computation that cannot be done efficiently on a classical computer.      –, Wikipedia   I thought this was the definition of . Why is quantum entanglement so important in quantum computing, to the point where advances are also measured in number of qubits entangled?


For every polynomial $p(x)$ of degree $n>3$, can we find a factorization of factors with degree at most $2$? (factorization in $\mathbb R$).  Example. $$x^5-1=(x-1)(x^4+x^3+x^2+x+1)=(x-1)(x^2+\frac{\sqrt{5}+1}{2}x+1)(x^2+\frac{-\sqrt{5}+1}{2}x+1)$$  In case $n$ even we need to talk:  If $n$ be odd and the coefficient of $x^n$ be positive (negative), we see $p(-\infty)=-\infty$ and $p(+\infty)=+\infty$ $\Big(p(-\infty)=+\infty$ and $p(+\infty)=-\infty\Big)$ then it has a root and we reduce degree to case $n-1$.

So I understand how to do integration on rational functions with a linear and a quadratic denominator, and I understand how to do a partial fraction decomposition, but I was wondering what happens if the polynomial is higher degree and can't be factored. Later in the page, it says this:     However, it can be shown that any polynomial with real coefficients is a product of linear and/or irreducible quadratic factors with real coefficients.   And I was wondering, how do we know this and is this definitely true?


I'm trying to take a list of tag rows and add them to a column as a CSV. I thought a subquery would be appropriate for this using string_agg. Below eventstags is a many-to-many table associating tags with their event.  (SELECT string_agg(name, ',') FROM tags WHERE tags.id IN (SELECT eventstags.tags_id WHERE eventstags.events_id = events.id)) AS tags   This appears to only return a single tag, as if it's ignoring all the other tag rows. Any idea how I can get the IN query to be aware of the other rows so that it concatenates the tag names as a CSV column?  I'm using psycopg2 and Postgres 9.5

I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table:  ID   COMPANY_ID   EMPLOYEE 1    1            Anna 2    1            Bill 3    2            Carol 4    2            Dave   and I wanted to group by company_id to get something like:  COMPANY_ID   EMPLOYEE 1            Anna, Bill 2            Carol, Dave   There is a built-in function in mySQL to do this


For my university assignment i'm trying to pass an int as a parameter to another class. However I keep receiving a null error for some reason. I even printed out the integer to see if it was null but it wasn't. Now I don't know what the problem could be. I've been trying different stuff for a couple hours now and I thought I should post my issue here.  I created a field in this class called currentBuild so that I can call methods in the Build class.  private Build currentBuild;   This is my method that gets the integer from the user and sends it to another class called Build.  private void addFromCat(){     int partNo;      System.out.println("Enter catalogue number of the part: ");     partNo = In.nextInt();     System.out.println(partNo);     currentBuild.getNum(partNo); }   This is the method in the Build class that receives the integer. It's called getNum.  public class Build {  private List <Part> parts = new ArrayList <Part>();  /**  * Constructor for objects of class Build  */ public Build() {  }  public void getNum(int partNo){      int numberPart = partNo;     System.out.println("part number is: " + numberPart);     }    }

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


Let's say Bob really wants Fred to act quickly for an eventual fight which they feel will come soon.  Can Bob repeatedly give Fred the Help Action for his eventual Initiative roll ("Stay focused! Stay focused! Stay focused!") in order to give Fred Initiative advantage when the encounter begins?

My DM's saying that since the Help action is found in the actions in Combat in the PHB, he's disallowing use of it outside of combat. It's true that it's found in that part, but I thought you could use it even when there's no fighting happening. Is there a particular ruling for this?


I would like to ask if you can tell me , what is the linux version that best fits my system to install ?!  Intel Pentium 4 CPU 3.40GHz 1 GB RAM Nvidia 6600  Pending your reply , Thank you very much !

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I'm doing mathematics and my thesis consists mainly of understanding and elaborating couple of articles, writing clearly everything down, and possibly including a little of my own original work at the end. Of course, I am citing everything, and also I am not copypasting, rather writing known stuff with my own words and trying to be more detailed. But I am not sure what to do with the pictures(there are about 20 of them which are relatively difficult to draw, next to the 30-35 pages of plain text). I have an access to the tex files of these articles and could easily copy paste the code for pictures. On the other hand, I could write down(rather draw) everything by myself, and anyway I would properly cite the source because many of these pictures represent ideas behind which are not mine. So what should I do? On the one hand, straight copypasting is not good. On the other hand, this is not a piece of text where I could write more details, although if I wouldn't have seen those pictures but I would been explained the ideas, then I would have drawn slightly differently. Should I draw everything by myself, while trying to be visually different then authors(while properly citing them of course).

So, I've seen a really nice figure in a paper; what's the best way to 'get a copy'?  Will it be on the publisher's website? Do I need to draw my own version? Email the author?  And, finally, how does the answer vary for (a) those wishing to republish the figure in their own work, (b) those not wishing to publish the figure e.g. for student coursework.


At the end of this post-apocalyptic film, the central protagonist - Zac Hobson (Bruno Lawrence) - drives a truck laden with explosives onto the weakened roof of an underground laboratory. The explosives detonate ... and we witness a red flash. Hobson is now shown to be on a beach. In the distance can be seen strange clouds - and a large ringed planet rises over the horizon.   This ending is rather different from that of the original novel (by Craig Harrison), in which Hobson's character re-awakens at the start of the story - and is forced, it seems, to endlessly repeat his nightmare existence.  In the film, what has happened to Hobson? And where is he meant to be? In what way (if at all) is this connected to the 'Project Flashlight' described in the story?   Note - I'm after information about the final scene of the movie, and its meaning. I'm not asking a question about the film more generally (and am not seeking an explanation of the 'overall plot device' of the movie).

In the 1985 movie, Quiet Earth, the protagonist finds himself apparently the only man on Earth. Later, he finds:      two others who, like him were at the moment of death. He further determines that this is all due to an American experiment. Here's where I get a little fuzzy...was it that an entirely different reality was created and these folks were shunted to it, or did truly everyone else get wiped out? The ending, where the protagonist is shunted to a THIRD existence, seems to bear out the alternate reality existence...does this mean that the events are experienced only by the characters in the movie, and everyone else is just fine back in reality prime? Or did everyone get wiped out?   Which one is it?


I was testing out the substring capabilities in Java when I ran into an error. Although the substring's value is correct, it fails in an if statement. Here is my code:  public static void main(String[] args) {     String foo="bar";     String subFoo=foo.substring(0,1);     System.out.println(foo);     System.out.println(subFoo);     if (subFoo=="b") {         System.out.println("its b");     } else if (subFoo!="b") {         System.out.println("its not b");     } else {         System.out.println("who knows?");     }  }   It is supposed to output the lines  bar b its b   when run, but instead prints  bar b its not b   Even though it prints subFoo correctly as "b" it doesn't seem to register properly in the if statement. Any ideas?

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


I have a xml file which I want to open and write in. The xml file has this structure:   <?xml version="1.0" encoding="UTF-8"?>            <polygons>                     <polygon name="polygon-1">                  <point>                 <x>38,241885</x>                 <y>-5,965407</y>              </point>               <point>                     <x>38,242251</x>                     <y>-5,965423</y>                  </point>             </polygon>     <polygon name="polygon-2">         .         .     </polygon>   </polygons>      I want to add new polygons into my xml, so I have to read it and then add a polygon at the last position. ¿How can I do this?

Is there a simple method of parsing XML files in C#? If so, what?


I have tried using polar coordinates and several polynomial functions, but they all converge to the value of $0$; checking at Wolfram Alpha, however, it confirms that the limit does not exist. How should I approach these kinds of questions and not get stuck?  $$ \lim_{(x,y) \rightarrow (0,0)} \frac{x^{2}y^{2}}{x^{3}+y^{3}} $$

I want to know whether $\lim_{(x,y)\to (0,0)}\dfrac{x^2y^2}{x^3+y^3}$ exists or not. I tried to approximate to (0,0) from different "paths" and the result was always 0. For example,  $f(x,mx^2) = \dfrac{m^2x^3}{1+m^3x^3}$  But that doesn't show that the limit is 0.


Kernel driver not installed (rc=-1908)      The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or   there is a permission problem with /dev/vboxdrv. Please reinstall the   kernel module by executing      '/etc/init.d/vboxdrv setup'      as root. If it is available in your distribution, you should install   the DKMS package first. This package keeps track of Linux kernel   changes and recompiles the vboxdrv kernel module if necessary.   This is a familiar message to everyone that uses Virtual Box. This "bug" has been popping up every few months at least since 11.10. I got it today for the first time on 14.04 and unfortunately the  of re-installing virtualbox-dkms is not having any effect:  sudo apt-get install linux-headers-generic build-essential dkms sudo apt-get remove virtualbox-dkms sudo apt-get install virtualbox-dkms   What could be the reason for this old fix to fail?  Update: In the comments user bain makes reference to an old thread that apparently reports to the same problem. While the error message is similar, on Ubuntu 14.04 this issue seems to have a different nature, unrelated to the virtualbox-dkms package. For instance, on Ubuntu 14.04 the virtualbox package is up to date:  $ sudo apt-cache policy virtualbox virtualbox:   Installed: 4.3.10-dfsg-1   Candidate: 4.3.10-dfsg-1   Version table:  *** 4.3.10-dfsg-1 0         500 http://de.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages         100 /var/lib/dpkg/status

I tried to use my Virtual Box and this is the error I received - (I just updated to the new Ubuntu also) and I am VERY new at this Linux OS.     Kernel driver not installed (rc=-1908)      The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or   there is a permission problem with /dev/vboxdrv. Please reinstall the   kernel module by executing      '/etc/init.d/vboxdrv setup'      as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS   package first. This package keeps track of Linux kernel changes and   recompiles the vboxdrv kernel module if necessary.


For example, if I get the namespaces in EntityFramework.dll using  assembly.GetTypes().Select(t => t.Namespace).Where(n => n != null).Distinct()    and then only list the namespaces with the minimum periods, I get the following two namespaces  System.Data.Entity System.Linq.Expressions   However, System.Linq.Expressions is the namespace of an assembly that EntityFramework.dll is dependent on and not the primary namespace of EntityFramework.dll, which clearly is System.Data.Entity.  How do I distinguish between the 2?  EDIT: By "primary namespace", I am referring to the root namespace of the classes within the assembly itself and not its dependencies.

Given an instance of System.Reflection.Assembly.


I have suggested my mother to use Ubuntu (16.04) because she is likely to get viruses while using Windows. She agreed but gave one condition: "I must be able to watch TV-players online", and these are (both using Silverlight):   www.player.pl www.vod.tvp.pl   How to make it run?

I am using Ubuntu 12.04 LTS 64-bit on my system. I am using Mozilla Firefox 37.0 and Google Chrome 41.0 browsers.  I went to  in both browsers. In Chrome I could see the content on the webpage perfectly. In Firefox it asked me to install Microsoft Silverlight. I'm surprised that on Chrome it didn't ask me to install Silverlight.  Please explain me what is Silverlight, why it is needed, and how to install this on my system in an easy, efficient and reliable way?  P.S. Please don't suggest to do anything using WINE as I know it's not a reliable approach.  Thanks in advance.


LIST FOR      00:00:00.0000980 LIST FOREACH  00:00:00.0000007 ARRAY FOR     00:00:00.0028450 ARRAY FOREACH 00:00:00.0051233  I have always made performance heavy things with arrays, but it seems lists are much faster. using System; using System.Diagnostics; using System.Collections.Generic;  public class Program {     public static void Main()     {         var cron = NCrontab.Advanced.CrontabSchedule.Parse("0 0 1 1 * 2016",             NCrontab.Advanced.Enumerations.CronStringFormat.WithYears);         var date = new System.DateTime(year: 2016, month: 1, day: 1,             hour: 0, minute: 0, second: 0);                  int[] testArray = new int[1000000];         List<int> testList = new List<int>(1000000);                  var stopWatch = new Stopwatch();         stopWatch.Start();         for (int i = 0; i < testList.Count;i++)         {             var s = 1;         }         stopWatch.Stop();         Console.WriteLine("LIST FOR      " + stopWatch.Elapsed);                  stopWatch = new Stopwatch();         stopWatch.Start();         foreach (int i in testList)         {             var d = 1;         }         stopWatch.Stop();         Console.WriteLine("LIST FOREACH  " + stopWatch.Elapsed);                          stopWatch = new Stopwatch();         stopWatch.Start();         for (int i = 0; i < testArray.Length;i++)         {             var f = 1;         }         stopWatch.Stop();         Console.WriteLine("ARRAY FOR     " + stopWatch.Elapsed);                  stopWatch = new Stopwatch();         stopWatch.Start();         foreach (int i in testArray)         {             var h = 1;         }         stopWatch.Stop();         Console.WriteLine("ARRAY FOREACH " + stopWatch.Elapsed);     } }    List internally implements T[], just that its flexible and internally keeps expanding when Capacity is over. Since for the all the important operations, it internally does the array operations, just that it provides the convenience for the dynamic expansion.  I don't understand it, but I need to know for heavy and frequent operations. Basically I'm trying to determine what's better to have high FPS.

Say you need to have a list/array of integers which you need iterate frequently, and I mean extremely often. The reasons may vary, but say it's in the heart of the inner most loop of a high volume processing.  In general, one would opt for using Lists (List) due to their flexibility in size. On top of that, msdn documentation claims Lists use an array internally and should perform just as fast (a quick look with Reflector confirms this). Neverless, there is some overhead involved.  Did anyone actually measure this? would iterating 6M times through a list take the same time as an array would?


I have just upgraded to Ubuntu 18.04. It's all fine, except that my printer, a HP Laser Jet 2035, does not work. I keep getting messages about drivers, but I either can't find them or can't download them?   The printer was working great in 16.04, so I am not sure what advantage I now have!

Let's assume that one has some modern HP printer and/or scanner which is  supported by HPLIP package from official repository. Or supported by newer version of HPLIP package (see  about installation).  From official documentation () it is known that device needs proprietary/binary driver or plugin.  How should one install such plugin?


I mount the first one, run the Setup (it's a Windows program), and when it asks for DISC 2, I try to unmount the ISO, but it says it can't be unmounted because it's busy, which is obvious. In Windows, you can unmount the disc while the Setup is still running. My question is if there's any workaround this and mount the second image while the setup is still running?  Thank you.

I would like to install Medieval II : Total War under wine. Everything goes well until I am prompted to install the second dvd-rom to finish the install.   No matter what path I supply to the installer it says setup can't find a file on the specified path or disk. I've tried the options shown for D and Z drives, /dev/sr0, /media/myname etc.  I've also had similar problems with Medal of Honour.  Can anyone help?


I want the container div (#a-container in this example) to fit the width of its children, that are inline-block divs. In this example, I want the #a-container div to be just the size of 2 .a div. Is it possible? (pure CSS please)    #a-container {   width: 250px;   background-color: gray; } .a {   background-color:blue;   width:100px;   height: 100px;   display:inline-block; }

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.