In my course notes of topology, we have seen the following example of a space that is connected but not path-connected.  Define $X := \{(0,0)\} \cup \{(x,\sin(\frac{1}{x}))\mid  x > 0\}$  I understand why this is connected but I have troubles by arguing why it's not path-connected. my opinion: consider $X$ is path-connected   for $x = (0,0)$ and $y = (1,\sin(1))$ , there is a continuous function $f\colon [0,1] \rightarrow X: 0 \mapsto x, 1 \mapsto y$  because $[0,1]$ is compact and $f$ is continuous, $X$ is compact. I think that $X$ is not compact but I can't prove why. If I can prove this, $f$ can't be continuous and then it's ok.


Animations about a young man pulled into a fantasy setting with dragons?

I'm looking for an animation (more likely a film not a series) that I watched as a kid, watched early 90's I'm sure it contained a book loving male main character (wears glasses might have even had an amulet) who gets pulled into a fantasy via a magic book  Setting with dragons and an evil wizard, I remember it being on TV as I never had it on VHS.  Same sort of animation technique as visionaries or thundercats.  Thanks.


Ramsey (graph) theory question with tree and girth

Sorry for the abundance of questions I'm asking. Test is soon...  Prove that for every tree $T$ and every $g \in \mathbb{N}$, exist $G$ with girth $g$, so that in any 2-edge-coloring of $G$ there is a monochromatic copy of $T$.  Anyone have an idea how to attack this question?  Thanks in advance.


What does "is hashed" mean when using the type command?

I was reading  and trying out all of the commands in the first answer... I don't really have anything else better to do right now.  Anyways, I ran through them all in regards to rm. What piqued my interest is this:  root@headdesk:~# type ls ls is /bin/ls root@headdesk:~# hash ls root@headdesk:~# type ls ls is hashed (/bin/ls) root@headdesk:~#   Running help/man hash is not very helpful, and help type isn't really either (it does not mention hash anywhere). Since I can't seem to find a relation in the man/info/help pages unless I am missing something, could someone please explain what hashing is doing in regards to the type command?


Why do we perceive a mixture of blue and yellow paint as green?

If I were to mix yellow paint (which reflects yellow light) and blue paint (which reflects blue light), I would get a mixture of paints that I would perceive as green.   Is that because the mixture is now reflecting green light (and absorbing blue/yellow)?  OR  Is it because both blue and yellow light is being reflected simultaneously and my visual cortex is interpreting that as "green?"   In other words, are humans capable of perceiving both green frequency light as well as mixtures of colors that our brains interpret as one color/shade? How much of color perception is physics (blue = 450 nm) vs subjective brain interpretation (450 nm + 570 nm = GREEN)?  Experimental example of my question: Man A and Man B both describe a laser emitting 525 nm light as "green." Is it possible for Man A to perceive a mixture of two different wavelength lasers to be a different color than Man B?


present and past perfect with a dead entity

I learned that "had", or past perfect is usually used with a dead entity. But what if I am not trying to emphasize the fact that an action had taken place before that entity died? Such as:     My dead grandfather has stepped on a mine (when he was alive).   This sentence is resultative, showing why he died, and uses present perfect.  And this sentence below:     My dead grandfather stepped on a mine (on July 6, 1995).   This sentence is incorporating the specific date at which he stepped on a mine, therefore using simple past tense.  Are the uses of simple past and present perfect tense above valid?


What gear do I need for a newborn photography session?

I am an amateur photographer and I have a newborn session coming up for a family friend.   My current gear is:   Canon T5i (crop sensor) Canon 18-55 IS STM Kit lens 85mm f/1.8 lens   I plan on buying a reflector for the shoot and will be using natural light as my light source.  So my question is: is this enough gear to get some nice photos? Should I get another prime lens besides the 85mm? I don't really use the kit lens.  I also have another 8 month old baby shoot coming up and an informal wedding shoot coming up so it would be nice to use the lenses in all situations. I don't need a telephoto at the moment and will probably not use one any time soon.


How to remove bloatware in non-rooted android smartphone?

Is therr anyway to remove the system app via adb or else ? I am not talking about disabling application!?


Seeking Name of Lovecraftian Short Story About Ancient City In The North

I'm trying to remember the name of this story: Some gold panners? are in Alaska? (I remember it was cold, and or the pacific northwest) near a huge hand-shaped mountain, and see an eerie blue light in the sky, a pillar shining from beyond the mountain; it draws them hypnotically, but they resist. Coming south from the mountains and into their camp is a raving, semi-comatose man, lashed to his sled/sled-dogs. He wakes up and speaks or they see his journal, and start to read his story.   He was drawn to the legends of an ancient city in the wilderness, either for knowledge or gold, and comes from the north to its reputed location; his native guides do the stereotypical desertion in the progress, and he is left alone to enter. He finds himself at the edge of a canyon, where there are a giant set of stairs leading down. Flanking the steps are a pair of weathered statues, making warding gestures. He proceeds down, the stairs switching back and forth, passing by resting places dug into the cliff, each also guarded by statues. Protected from the wind in the canyon, these are less eroded, and he can see they are natives? At the bottom, a bridge extends out from the stairs and enters the city. The architecture is hollow tubes laid on their sides in pyramidal configurations. The landscape features mist and alien disk-shaped? vegetation. The bridge goes inside the largest structure, where there is an idol.   He passes through there, and starts exploring. Night falls, and presences stir. They are basically invisible, except for glowing lights inside them; they are slug-shaped? He tries to hide, but they capture him and chain him to the idol. His mind or soul starts to be taken by them, and they start to become visible. He reacts to the alien other with prototypical Lovecraftian revulsion. During the day, they all go away. He is fed on bowls of something like milk, which drugs or changes him, or furthers the communion. Several days go by. He determines to escape before he is too weak, breaks the chain, and crawls to the first shelter on the stairs. When night comes, his absence is noted and they shine the blue light. Only his own weakness and the protective powers of the statues keep him from succumbing to its hypnotic power and going back. In the day, he keeps climbing the stairs. Either that day or later, he makes it back to the top, and starts south. That brings us back to the present.  He is dying, and begs to be burned so that the city cannot claim him, even in death. He dies, and they burn him, and they have to burn, or melt or shun the remnants of the manacle on his wrist, even though it's made of gold? or something. And then, suitably horrified, they go back south.  I'm pretty sure the story wasn't by Lovecraft, but it was absolutely Lovecraftian, and I believe it was an entry in the mythos.  Thank you.


Sci-fi/time traveller cartoon where a time traveler on a training mission saves a girl from being killed which makes Earth disappear

Sci-fi/time traveller cartoon from the early to mid 2000's.  The plot goes like this:  A time traveler was in some sort of training mission. Whilst he was on this mission he witnesses this girl that was going to get killed (I think this was taking part during the French Revolution). He saves the girl but it somehow causes the Earth to just disappear as if it had never existed. After this they go on an journey to find out what happened.     I remember seeing it when I was growing up in Portugal and I think it either aired on .


Is there any way to hide your Steam status from others?

Is there any way to prevent others from seeing your Steam status without removing them as a friend?   Let's say I want to play Borderlands 2 without letting some friends know. Is there any way to hide my status to prevent them from knowing I'm playing it?  Basically, what I'm asking if Steam has an "Appear Offline" option.


x=100 def fun2():     print x     x=10000     print x fun2()   The above program showing local variable x reference before assignment. Why it is not printing  100 10000


Speculative conditional: Why does it use the past tense or past perfect tense?

We use simple past to state a hypothetical present situation that we would like to speculate about (If they were here, I would be happy), past perfect for a hypothetical past (had they been here, I would have been happy), and simple present to a hypothetical future. Any explanation why this makes sense, as opposed to past for past, present for present, and future for future?


I'm putting together a presentation.  My presentation style, however, often involves bright red callouts to the most important points of the text, especially when said text consists of code samples or command line output.  Here's an example from a presentation I made in LibreOffice:    How can I do something similar with TikZ?


Some spells and abilities specify that the target must be able to hear you. Is an unconscious PC (0 HP) considered a valid target?  Unconscious ... An unconscious creature is incapacitated (see the condition), can't move or speak, and is unaware of its surroundings...  For example, the Oath of the Crown Paladin has the following ability:  Turn the Tide As a bonus action, you can bolster injured creatures with your Channel Divinity. Each creature of your choice that can hear you within 30 feet of you regains hit points equal to 1d6 + your Charisma modifier (minimum of 1) if it has no more than half of its hit points.  Can the Paladin grant hp to unconscious party members using this ability?


HI! I am a newbie to C#, can someone please help me out with this code

I want to open a form inside a panel by clicking btnPlaceOrder which is on the same panel  private void btnPlaceOrder_Click(object sender, EventArgs e)     {         frmDashboard.PanelDesktop.Controls.Clear();         frmPlaceOrder formPlaceOrder = new frmPlaceOrder();         formPlaceOrder.TopLevel = false;         frmDashboard.PanelDesktop.Controls.Add(formPlaceOrder);         formPlaceOrder.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;         formPlaceOrder.Dock = DockStyle.Fill;         formPlaceOrder.Show();     }  error im getting:  Error CS0120  An object reference is required for the non-static field, method, or property 'frmDashboard.PanelDesktop'   projectRMS  E:\projectRMS\projectRMS\frmOrders.cs   28  Active


Compiz Grid/Put Not Working After Upgrading from 17.04 to 17.10

On Ubuntu 17.04, I had CompizConfig set up so that Ctrl+Alt+Key pad number would place the current window into the appropriate quarter/half of the screen.  This is not working after upgrading to 17.10.  I've tried changing the Grid and Put settings in Compiz but nothing seems to take effect.  In addition, I have an external monitor connected to my laptop and now Ctrl+Alt+4 and Ctrl+Alt+6 move the window from one monitor to the next.  I want the window to remain on the current monitor.  How can I get this back?  Update: I'm using GNOME display environment. I had Wayland setup by default after the upgrade but disabled it due to another issue I was experiencing.


Flight tickets: buy two weeks before even during holiday seasons?

There is a common story that airline ticket prices rise significantly if you buy them less than two weeks before departure.  And that any time before that will yield standard prices.  Is that advice valid for flying during holiday seasons?  As an example: if I want to fly coast to coast USA on December 7th, must I buy my ticket ASAP, or would I get a similar price buying on November 21st?


Resource commendations for SUSY gauge theory

Does anyone know of recent SUSY gauge theory reviews aimed at the graduate student? Preferably something to bring the reader up to speed?


$f(x)$ is monoic polynomial , prove that if $f(k), f(k + 1),..., f(k + p)$ is not divisible by $p + 1$, then $f(x) = 0$ has no rational solution.

Given a monic polynomial $f(x)$ of degree $n$ over $Z$ and $k, p \in N$ , prove that if none of the numbers $f(k), f(k + 1),..., f(k + p)$ is divisible by $p + 1$, then $f(x) = 0$ has no rational solution.   Question from 'Problem solving Strategies'.  Here is the solution    Can anyone please explain why the polynomial $g(x)$ should have integral coefficients (2nd line of solution)?


Finding a closed form for a recurrence relation $a_n=3a_{n-1}+4a_{n-2}$

Consider the sequence defined by $$ \begin{cases} a_0=1\\ a_1=2\\ a_n=3a_{n-1}+4a_{n-2} & \text{if }n\ge 2 \end{cases} .$$ Find a closed form for $a_n$.    I tried listing out examples, but I don't see any common pattern between them.  All solutions are greatly appreciated.


Using If statement inside OnChildEventListener to mimic notEqualTo() for doing queries in Firebase

sorry for this silly question but I am going insane, it's a simple if statement inside OnChildEventListener to exclude the current user results from my gridView as Firebase doesn't apparently have notEqualTo() method. However, the if statment doesn't seem to give me correct result when it should be true. Please see below :    String name = "eee";   //setting a username just a test for here  databaseRef.addChildEventListener(new ChildEventListener() {         @Override         public void onChildAdded(DataSnapshot dataSnapshot, String s) {             if (String.valueOf(dataSnapshot.child("username").getValue()) == name) {                  GridItem item = dataSnapshot.getValue(GridItem.class);                 mGridData.add(item);                 mGridAdapter.setGridData(mGridData);              }         }   I log the String value of what I have inside my if statment and it logs out as eee , now why doesn't this if statement result in true? I would appreciate if someone tells me what I am missing? if I simply do if(true) or any other string inside, it works!   Appreciate the help.


I am preparing a document to send to print. I was asked to add bleed. Is it necessary for a no background document?  The image on the design will not go all the way to the edge.  Or should I add a white background layer and add the bleed to that?


How do you append an int to a string in C++?

int i = 4; string text = "Player "; cout << (text + i);   I'd like it to print Player 4.  The above is obviously wrong but it shows what I'm trying to do here. Is there an easy way to do this or do I have to start adding new includes?


xdg-open on debian 9 fails to open browser

I decided to try lxdm (was using fluxbox and xfce), and discovered that for many programs the url handler was failing, producing this error message;   Quite strange as you can see, it's prepending the user directory to the url.  The example here is from telegram, but it happens in discord, as well as when executing from the command line; xdg-open https://www.google.com produces a similar error. xdg-settings get default-web-browser output's firefox.desktop which works as a link in both xfce and lxdm.  More information; I ran bash -x on it and...  $ bash -x /usr/bin/xdg-open http://www.google.com + check_common_commands http://www.google.com + '[' 1 -gt 0 ']' + parm=http://www.google.com + shift + case "$parm" in + '[' 0 -gt 0 ']' + '[' -z '' ']' + unset XDG_UTILS_DEBUG_LEVEL + '[' 0 -lt 1 ']' + xdg_redirect_output=' > /dev/null 2> /dev/null' + '[' xhttp://www.google.com '!=' x ']' + url= + '[' 1 -gt 0 ']' + parm=http://www.google.com + shift + case "$parm" in + '[' -n '' ']' + url=http://www.google.com + '[' 0 -gt 0 ']' + '[' -z http://www.google.com ']' + detectDE + unset GREP_OPTIONS + '[' -n LXDE ']' + case "${XDG_CURRENT_DESKTOP}" in + DE=lxde + '[' xlxde = x ']' + '[' xlxde = x ']' + '[' xlxde = x ']' + '[' xlxde = xgnome ']' + '[' -f /run/user/1000/flatpak-info ']' + '[' xlxde = x ']' + DEBUG 2 'Selected DE lxde' + '[' -z '' ']' + return 0 + case "${BROWSER}" in + case "$DE" in + open_lxde http://www.google.com + pcmanfm --help -a is_file_url_or_path http://www.google.com ++ file_url_to_path http://www.google.com ++ local file=http://www.google.com ++ echo http://www.google.com ++ grep -q '^file:///' ++ echo http://www.google.com + local file=http://www.google.com + echo http://www.google.com + grep -q '^/' ++ pwd + file=/home/nesmerrill/.local/share/applications/http://www.google.com + pcmanfm /home/nesmerrill/.local/share/applications/http://www.google.com + '[' 0 -eq 0 ']' + exit_success + '[' 0 -gt 0 ']' + exit 0   The important part seems to be pcmanfm --help -a is_file_url_or_path http://www.google.com but, that command if that's how it was used, doesn't seem to do much of anything?  $ pcmanfm --help -a is_file_url_or_path http://www.google.com Usage:   pcmanfm [OPTION…] [FILE1, FILE2,...]    Help Options:   -h, --help                   Show help options   --help-all                   Show all help options   --help-gtk                   Show GTK+ Options  Application Options:   -p, --profile=PROFILE        Name of configuration profile   -d, --daemon-mode            Run PCManFM as a daemon   --no-desktop                 No function. Just to be compatible with nautilus   --desktop                    Launch desktop manager   --desktop-off                Turn off desktop manager if it's running   --desktop-pref               Open desktop preference dialog   --one-screen                 Use --desktop option only for one screen   -w, --set-wallpaper=FILE     Set desktop wallpaper from image FILE   --wallpaper-mode=MODE        Set mode of desktop wallpaper. MODE=(color|stretch|fit|crop|center|tile|screen)   --show-pref=N                Open Preferences dialog on the page N   -n, --new-win                Open new window   -f, --find-files             Open a Find Files window   --role=ROLE                  Window role for usage by window manager   --display=DISPLAY            X display to use


apt wants to uninstall VLC because libgles1 is too old, even though the VLC team removed the libgles1 dependency

From /var/log/dist-upgrade/apt.log:  Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) libgles1-mesa [ amd64 ] < 12.0.6-0ubuntu0.16.04.1 > ( libs ) Broken libgles1-mesa:amd64 Depends on libglapi-mesa [ amd64 ] < 12.0.6-0ubuntu0.16.04.1 -> 17.0.7-0ubuntu0.16.04.1 > ( libs ) (= 12.0.6-0ubuntu0.16   .04.1)     Considering libglapi-mesa:amd64 64 as a solution to libgles1-mesa:amd64 2     Removing libgles1-mesa:amd64 rather than change libglapi-mesa:amd64 Investigating (0) vlc [ amd64 ] < 2.2.2+git20170721+r59033+56~ubuntu16.04.1 > ( video ) Broken vlc:amd64 Depends on libgles1-mesa [ amd64 ] < 12.0.6-0ubuntu0.16.04.1 > ( libs ) (>= 7.8.1)     Considering libgles1-mesa:amd64 2 as a solution to vlc:amd64 1 Broken vlc:amd64 Depends on libgles1 [ amd64 ] < none ->  > ( none )     Considering libgles1-mesa:amd64 2 as a solution to vlc:amd64 1     Or group remove for vlc:amd64 Done   Searching the web, I found that .  The VLC team have updated their dependencies from 2.2.2-5ubuntu0.16.04.2, but my system has apparently not caught up with that (I checked by running apt-cache depends vlc, and it shows a dependency on libgles1-mesa).  Now it happens that a couple of months ago I added the  (to get the latest, least buggy VLC).    That gave me VLC version 2.2.7 and fixed the VLC bug, and is what I have on my system today.  I know, because vlc --version tells me so.  apt-cache policy vlc says:  Installed: 2.2.2+git20170721+r59033+56~ubuntu16.04.1 Candidate: 2.2.2+git20170721+r59033+56~ubuntu16.04.1 Version table: *** 2.2.2+git20170721+r59033+56~ubuntu16.04.1 500     500 http://ppa.launchpad.net/videolan/stable-daily/ubuntu xenial/main amd64 Packages     100 /var/lib/dpkg/status  2.2.2-5ubuntu0.16.04.3 500     500 http://gb.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages     500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages  2.2.2-5 500     500 http://gb.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages   (It seems weird that apt-cache policy says that 2.2.2+git20170721+r59033+56~ubuntu16.04.1 is installed; I read that as vlc version 2.2.2, which conflicts with the 2.2.7 that vlc --version gives.)  Apparently I have Ubuntu version 16.04.2 LTS 64-bit installed (from System Details in the GUI Control Panel thing).  I suppose that I could disable the launchpad PPA, but in that case I would presumably revert to an older vlc binary which was crashing my system.  So my question is (at least I think this is the right question): How do I convince apt that it's ok that libgles1-mesa is old or missing?


I tried some method for this but I couldn't do it somehow. I have a openfile dialog for choose .csv file and I've a button for start indexing data. My HTML codes like this

                       Electronic Archiving

         <form id="indexForm" method="post" enctype="multipart/form-data">
         File:&nbsp;<input type="file" id="updateFile" style="position:fixed" accept=".csv">

<input type="button" value="UPDATE FILE" class="btn btn-sm" id="indexCSV">

         </form>    And my jquery like this         When I'm clicking the button there is no action. I don't understand why.


Introductory Group Theory Book Recommendation

I am looking for an introductory book on group theory as I would like to know more about the subject. I am aware that this an extremely useful area of mathematics. What book would you suggest for a first course on group theory?


Is it possible to follow or bookmark a Stack Overflow user?

There are some incredibly smart chaps around here and I'd like to read more of their answers. Just like you can bookmark threads, is there a way to bookmark other users? If not, it'll be a very useful feature.  Here's the feature description:  User A may go to the profile page of User B and click a link that reads Follow B or some such. Upon doing that, user A sees user B listed on his profile page under a list named Users I Follow. That's all. No RSS feeds, no email notifications are required for following a user.  Is this something you'd like to do?


Disabling the Links on the Picture Library Slideshow webpart. or ammending the code to open the link in the same window

I am using SharePoint 2010 Picture library Slideshow webpart. But want to disable the link from opening in another window.   I have used the following code succesfully to change the image link to the page link.   in particular this line of code.  ssObj.link.href = '';  //<--put your custom picture link url here   I have a customer requirement to disable links from the slideshow. Is there a way of getting the javascript code in the link above to just go back to the top of the page in the same page? Maybe using the #top or _self ? giving the illusion of the link being redundant.


How to test randomness (case in point - Shuffling)

First off, this question is ripped out from  question. I did it because I think this part is bigger than a sub-part of a longer question. If it offends, please pardon me.  Assume that you have a algorithm that generates randomness. Now how do you test it? Or to be more direct - Assume you have an algorithm that shuffles a deck of cards, how do you test that it's a perfectly random algorithm?  To add some theory to the problem - A deck of cards can be shuffled in 52! (52 factorial) different ways. Take a deck of cards, shuffle it by hand and write down the order of all cards. What is the probability that you would have gotten exactly that shuffle? Answer: 1 / 52!.  What is the chance that you, after shuffling, will get A, K, Q, J ... of each suit in a sequence? Answer 1 / 52!  So, just shuffling once and looking at the result will give you absolutely no information about your shuffling algorithms randomness. Twice and you have more information, Three even more...  How would you black box test a shuffling algorithm for randomness?


How to interact with elements generated by a javascript code?

Example using jquery and materialize.js  Once created an element with a js code, for example:  $('#buttonA').click(function() {  $('.container').empty;  $('.container').prepend('Second button'); }   Is created a button successfully but the problem appears when I want to code something with this generated button, for example:  $('#buttonB').click(function() {      Materialize.toast('This message is not gonna appear', 1500, 'green');     }   Nothing will happen. Anybody knows how to make it work as a normal element? I'd be so grateful :-)


I cannot update my BQ M10 Ubuntu pad. Can anyone advise?


Call member's constructor in a Class constructor's try-catch block?

I have a problem understanding when the default constructor of a class member is called. My class MyClass has a member of class Reader. In the constructor of MyClass I need to call the constructor of Reader and catch an Exception in case it fails. Because in the rest of MyClass's functions, I need to know if it was instantiated successfully and if I can use it. I know that I can call the default constructor in the initializer list. But when do I call it in the constructor? What's the common approach here?  class MyClass { public:     MyClass() {         hasReader = true;         try{             //Call Reader constructor here         }         catch(Exception)         {             hasReader = false;         }     }  protected:     Reader mReader;     bool hasReader; };  class Reader { public:     Reader()     {         bConnected = true;         if (something fails)         {             bConnected = false;                throw new Exception();         }     }  protected:     bool bConnected; };


Hastable of hastables, .Add access problem

I'm trying to re-create an old script that I already have working in Ruby, and I'm doing it with C# because I'm migrating a project of mine to Unity. This Script searches for files inside folders inside 3 different levels. This is what I mean, is a filepath, Folder1/Folder2/Folder3/files_are_here. Explanation: My working script (on Ruby) performs that by searching every "Folder1", and assigning the name of each one as a Key to a Hashtable. (So now I have a Hashtable in which every key is the name of a Folder that will represent the "Folder1" part of the filepath that I mentioned above). I've also defined as a Value for each of this keys, a new Hashtable. Thereafter, for each "Folder1" in my Hashtable, it performs a second search for every "Folder2" that is inside each "Folder1", and here I add each Folder name of each "Folder2", as a Key for the Hashtable of the "Folder1" that contains that "Folder2". For each "Folder2" for each "Folder1", I search each "Folder3" inside that "Folder2" that is inside that "Folder1", etc. I'm having a problem. I have my main Hashtable with every key representing a "Folder1", and I can perform the search for every "Folder2" inside every "Folder1". My problem is when I try to do: main_hash[first_folder.Key].Add(folder_2_name, new Hashtable())  It says that ('object' does not contain a definition for 'Add'), but if I: Debug.Log(main_hash[first_folder.Key])  It prints System.Collections.Hashtable, so it is a Hashtable, and it should have to have an .Add() Method. What is going on? Anyone knows?. (Even if you tell me to do it other ways so I can improve it, I would love to know why I'm having that error).


What is the precedence of Guardian Angel compared to other revive effects?

In League of Legends, there are a number of effects which revive a champion upon death.  The item  is the most well-known and widely used of these.  I was wondering, however, whether its effect would come before or after other revive effects?  I have two examples.  First, Zilean's ultimate  will provide a champion with a Guardian Angel -like buff for a limited time.  If a champion has this buff in addition to a Guardian Angel, which effect will happen first?  Second, Anivia's passive  allows her to come back to life if her egg is not destroyed after she is killed.  If she has a Guardian Angel, will her passive be triggered before or after it? How does this compare to  and ?  It seems like in one case it is more beneficial to have Guardian Angel's precedence be greater, and in the other it is more beneficial to have it be less.  In the first scenario, if the Guardian Angel was triggered first, then Zilean would have a good chance of simply wasting his ultimate.  On the other hand, if it is triggered after these revival effects, then Anivia could not get the full benefit of her passive.  Is there a set order of precedence, or does each revival effect have their own unique "priority level" that is explicitly detailed for each ability?


I am trying to migrate my current C drive with Windows 10 installed (250GB M.2 SSD) to a 1TB M.2 SSD. Both are physically installed in my PC.  I used Macrium Reflect to clone the drive to the new SSD, which was successful as they were both identical (except the extra unallocated space in the new drive). I made sure that the new drive was GPT.  I then restarted, and in the boot menu changed the boot priority to the 1TB SSD, with the 250GB SSD as second priority. The boot mode is in UEFI.  However, it didn't work and when booting, the windows icon was still next to the 250GB SSD meaning it had booted from that drive.  I then opened my PC and physically disconnected the 250GB SSD. When I started up the computer again it gave me a "Recovery - your PC needs to be repaired" error, so obviously it was not able to boot from the 1TB drive at all and was going into recovery mode instead when it couldn't find the second priority boot.   I then reconnected the 250GB SSD, but instead of booting it in second priority, I disabled it in the boot menu. But this still didn't work and windows is still booting from this drive (evidenced by the windows icon next to it).  I am at a loss as to why even after disabling it in the boot menu it is still booting from this drive and why cloning, setting the new drive as GPT and ensuring it is booting in UEFI doesn't seem to be working. I've spent hours googling this and am at a loss! Any tips would be greatly appreciated!  Thanks


\newcommand{\name}{Name} to change a keyword in different versions

Well, I'm using   \newcommand{\Name}{Name }   so I can change the name for different versions of my pdf. When I use it like {Name }, with a space bar, sometimes in the text it gives 2 spaces, and sometives gives 1. "Name  Age" wrong or "Name Age" The way I want to be But if I use it like {Name}, without a spacebar they just unify words. like "NameAge".again wrong  I'd like to know if someone know how to solve, or another way to just change the command for a word that it is not a new command maybe.


Cannot add PPA. Please check that the PPA name or format is correct

Internet connection is working.  apt-get is working.  Trying to add ppa:cooperjona/lightread but an error has raised:  Cannot add PPA 'ppa:cooperjona/lightread' . Please check that the PPA name or format is correct.   I supposed there is an error in writing or in the PPA.  I tried also the 'ppa:tombeckmann/ppa' but with same error.


How do I turn my USB into a bootable device?

So, I messed up my windows 7 boot loader, and I'm trying to change my USB so that I can use it as you would use the Windows Recovery disk. I have the .iso for the recovery disk and I've changed the file system of my USB drive to FAT32 and extracted the .iso to my USB, but I the USB drive is still not being recognized as bootable media.  I see plenty of guides for windows, but none for doing this on Ubuntu. I've tried changing the boot order in my BIOS, and it still doesn't work. How can I get my USB drive to act like the Windows Recovery Disk?


I am using Ubuntu 18.04 and I am experiencing a problem when I attempt to open the Gnome-Terminal.  The error message is:  Failed to launch "Terminal" Failed to execute child process "gnome-terminal" (No such file or directory)   See also attached creenshot below:


How do I turn off battery warning in Ubuntu 16.04

My battery is broken, so it's always at 0%. How can I remove the annoying notify-send with beep warning about low battery?  Things I've tried so far:   Altering /etc/UPower/UPower.conf dconf-editor → org → gnome → settings-daemon → plugins → power (which  seems to save settings to file UPower.conf) service upower stop service acpid stop Various GUI power related options in System Settings   Nothing seems to stop the damn popup.


Variable that is varying itself processing

i want to write a shell script   cd /dev for hdd in sd*; do     [ -f "$hdd" ] || continue     status_$hdd=$(my_def_get_hddstaus "$hdd")       #my_def_get_hddstaus returns OK or FAIL randomly just to test    done   i get error like   status_sda0=OK: command not found status_sda1=FAIL: command not found   I want to record the value OK or Fail into these variable, I am using bash, what I am doing wrong.  if I write status_sda0=OK in shell it record OK into status_sda0


Why is `apt-get update` telling me to run `apt-get update`?

I recently autoremoved my old unused kernels. At the end of the process it output this message:  W: Duplicate sources.list entry http://dl.google.com/linux/talkplugin/deb/ stable/main amd64 Packages (/var/lib/apt/lists/dl.google.com_linux_talkplugin_deb_dists_stable_main_binary-amd64_Packages) W: Duplicate sources.list entry http://dl.google.com/linux/talkplugin/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_talkplugin_deb_dists_stable_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   So I ran sudo apt-get update but got the same message at the end of that. So I ran it again and still got the same message.  What should I do now?    Details  sources.list.d   chris-lea-node_js-trustyy.list daniel_pavel-solaar-trusty.list daniel_pavel-solaar-trusty.list google.list google.chrome.list google-chrome.list.save google-talkplugin.list   source.list (comments removed for brevity)  deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted  deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted  deb http://us.archive.ubuntu.com/ubuntu/ trusty universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe  deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse  deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse  deb http://security.ubuntu.com/ubuntu trusty-security main restricted deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted deb http://security.ubuntu.com/ubuntu trusty-security universe deb-src http://security.ubuntu.com/ubuntu trusty-security universe deb http://security.ubuntu.com/ubuntu trusty-security multiverse deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse  deb http://extras.ubuntu.com/ubuntu trusty main deb-src http://extras.ubuntu.com/ubuntu trusty main


Which is correct, "neither is" or "neither are"?

Bob: "Can I set the font color? Can I customize the text?"  Frank: "Neither of these options is available. Sorry!"    Is "neither is" always correct or should one use "neither are" in some cases and what are the exact rules?  of this-is-why-stackexchange-exists :P


Selecting elements with matching text keywords, ignoring capitals (jQuery)

I thought I would share with the community my somewhat unique spin on targeting elements that contain keywords of text, yet ignoring capital letters, then finishing off with a little CSS to the element. I don't every proclaim my code I use is ever perfect, but please if you see improving, feel free, enjoy.


Null Pointer Exception in Array List- How do objects work?

I am having null pointer exception. Could you please assist me? I am having problems with objects in the Array list. I don't know where is the issue.  Main Class public class JavaApplication3 {  public static void main(String[] args) {        ArrayList<user> object=new ArrayList<user>();     user[] obj=new user[3];      obj[0].setName("S");      obj[0].setNumber(5);        obj[1].setName("7");      obj[1].setNumber(6);      object.add(obj[0]);         object.add(obj[1]);     System.out.println(object.get(0).getName());     System.out.println(object.get(1).getName());       }  }  And this is my user class: public class user {  private int no;  private String name;     public int getNo() {      return this.no;  }   public void setNumber(int no) {      this.no = no;  }    public String getName(){   return this.name;  }   public void setName(String S){       this.name=name;   }  }   AND THIS IS MY ERROR: Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true Exception in thread "main" java.lang.NullPointerException     at javaapplication3.JavaApplication3.main(JavaApplication3.java:26) C:\Users\User\AppData\Local\NetBeans\Cache\12.3\executor-snippets\run.xml:111: The following error occurred while executing this line: C:\Users\User\AppData\Local\NetBeans\Cache\12.3\executor-snippets\run.xml:68: Java returned: 1 BUILD FAILED (total time: 0 seconds)


Which one of $* or $@ is better to use (in array syntax,command line parameters, etc.) to avoid any bugs/problems in code? Or it does not make any difference?


How do I delete all terms from a vocabulary (bulk delete)?

I have a large vocabulary, and  does not yet work for taxonomy.  does not do this as well. Are there other options for bulk-deleting taxonomy terms?


It is said that XLAT is an abbr of translate. But I don't understand how come it ends up like that? There is no site on internet would explain it but they're all agree that XLAT is shorten of translate. I can get that LAT is in the end part of translate (LATe) but what about the X?


Say you and your friend play a coin toss game where the coin is fair and there is 1/2 chance of winning for each player. What your probability of winning the next game if you have won 5 games and your friend has won 7? What if you have won just 2 games and they have won 9? Note that the first person to win 10 games wins the set.  Please explain in simple terms (like to a five year-old) or to someone with a limited math background how you got your answer.


Intuition behind expression for expected value in terms of CDF

Let $X$ be a random variable with support on $S \subseteq [0, \infty)$. Let $f$ be the pdf of $X$ and $F$ be the cdf.  I'm trying to get some intuition behind this identity for random variables with support on the nonnegative reals. I have a proof (given below).  $$ E[X] := \int_0^{\infty} f(t)tdt = \int_0^\infty 1 - F(s)ds $$  I've managed to convince myself that it is true, but I don't have the faintest idea why the integral of the complement of the cdf should mean anything in particular, let alone something nice like the expected value.  I got the proof mostly by pushing symbols around and remembering that you can sometimes do nifty things with indicator functions and reordering sums.  Proof  Start with LHS  $$ \int_{t \in [0,\infty)} f(t) t \; dt $$  Express $t$ as integral of indicator function.  $$ \int_{t \in [0,\infty)} f(t) \left( \int_{s \in [0, \infty)} \text{I}[t \ge s] ds \right) dt $$  move constant inside integral.  $$ \int_{t \in [0,\infty)} \left( \int_{s \in [0, \infty)} f(t) \text{I}[t \ge s] ds \right) dt $$  reorder integrals  $$ \int_{s \in [0,\infty)} \left( \int_{t \in [0, \infty)} f(t) \text{I}[t \ge s] dt \right) ds $$  This indicator function is equivalent to evaluating the inner integral on the interval $[s, \infty)$  $$ \int_{s \in [0,\infty)} \left( \int_{t \in [s, \infty)} f(t) dt \right) ds $$  difference of integrals over $[0,\infty)$ and $[0, s)$  $$ \int_{s \in [0,\infty)} \left( \int_{t \in [0, \infty)} f(t) dt - \int_{t \in [0,s)} f(t) dt \right) ds $$  Use the fact that $f$ is a pdf and integrates to one and definition of $F$  $$ \int_{ s \in [0, \infty) } 1 - F(s) ds $$  Thus  $$ \int_{t \in [0,\infty)} f(t)tdt = \int_{s \in [0,\infty)} 1 - F(s)ds $$


How do I solve file ignored in /etc/apt/sources.list and release file not found errors while updating APT cache?

I am trying to run sudo apt-get update and running in these kinds of errors. N: Ignoring file 'libjpeg8_8c-2ubuntu8_amd64.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'libdouble-conversion1_3.1.0-3_amd64.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension E: The repository 'http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


Difficult Problem on Calculus of variation

Consider the functional  $$J(y)=y^2(1)+\int_0^1 y'^2(x) \ dx$$ with $y(0)=1$ where $y\in C^2[0,1]$. If $y$ extremizes $J$ then find $y$.  Any hint will be appreciated.


Is it possible to stack three relations or symbols ontop of one another? Specifically I would like to stack three symbols, R, \rightleftarrows and L in order to define a pair of adjoint functors $R:C\to D$ and $C\gets D:L$.  Also, is there a \rightleftarrow with long arrows? EDIT I actually meant to ask wether there is a version of \rightleftarrows with long arrows.  I'm not a regular user, so I don't know how to format my question adequately, could someone convert what's inside the dollar so that it appears as latex please?


Q: The escape velocity for a body projected vertically upwards from the surface of earth is 11 km/s. If the body is projected at an angle of $45^\circ$ with vertical, the escape velocity will be?   My Approach:  The new vertical velocity will be $u * \sin(45^\circ)$ = $u /\sqrt2$  Calculating expression for escape velocity:  $$\frac{1}{2} mv^2 = \frac{GMm}{r}$$ $$\frac{1}{4} mu^2 = \frac{GMm}{r}$$ $$u = 2\sqrt\frac{GMm}{r}$$  Hence the new escape velocity = $\sqrt2 * 11$km/s.  However, the Correct Answer is 11km/s.


Converting characters from MySQL Database to standard characters

I have a database which contains some blocks of text. These text blocks contain extended characters such as: ’ ‘ … “ and ”. When displayed directly to a web page they all show like this: �.  I've tried doing as str_replace to show normal characters, with no luck. I've tried iconv, which will only work when set to ignore, which makes the punctuation look wrong. I've tried html_encode, which also doesn't work. (I'm also using the parsedown script to format the text.)  The funny thing is, the website I'm replacing supports these characters fine, so I don't know what I'm doing wrong! (I don't have access to this website, or source code, or database, which is why I'm replacing it!)  Can anyone provide any help??  I just want to stop showing � and start showing proper characters!


How do I make a rectangular mesh subdivided evenly with square faces / quads?

I have a rectangle that grid mesh that I want to subdivide, however, all attempts resulted into the subdivided faces being proportional to the rectangle mesh, I would like to be able to have the rectangle mesh be made up of smaller squares, not rectangles; how would I do this?


In a recursive forecasting model, let's say you are trying to predict sales for the next month and you will append that prediction to your input and predict the month after. Basically, your target is Sales quantity, which you lagged. But let's say you have other continuous numerical features like Price which you will lag as well. As your model is making predictions on sales_qty, it will feed it back to sales_qty as input so you will never run out of values for that one. So how do you deal with your other features (other than the target) in order to generate them as next months inputs in a recursive forecasting model (because eventually you will run out of them)? Do you create a sub-model and try to predict them as well?


Colour only the text in a tabularx environment

Edit: This question is related to this one:   I tried the solution given , but it enlarges the line spacing of the table as shown in the second example in the screenshot below.    \documentclass{article} \usepackage{amsmath,numprint,tabularx,xcolor}  \begin{document}  Tabularx table \textbf{without} any color: \textbf{the spacing is normal.}   \begin{tabularx}{5cm}{|*{11}{X|}} \hline \multicolumn{2}{|c|}{$\rm m^2$} &  \multicolumn{2}{c|}{$\rm dm^2$} &  \multicolumn{2}{c|}{$\rm cm^2$} &  \multicolumn{2}{c|}{$\rm mm^2$} \\ \hline &&&4,&&&& \\ &&&4&0&0&0& 0,\\ &0,&0&4&&&& \\ \hline \end{tabularx} \bigskip  Tabularx table \textbf{with} colors: \textbf{the line spacing is enlarged.}  \begin{tabularx}{5cm}{|*{11}{>{\color{blue}}X|}} \hline \multicolumn{2}{|c|}{$\rm m^2$} &  \multicolumn{2}{c|}{$\rm dm^2$} &  \multicolumn{2}{c|}{$\rm cm^2$} &  \multicolumn{2}{c|}{$\rm mm^2$} \\ \hline &&&4,&&&& \\ &&&4&0&0&0& 0,\\ &0,&0&4&&&& \\ \hline \end{tabularx} \bigskip   Table with individually placed colours. \textbf{No problem at all.}  \begin{tabularx}{5cm}{|*{11}{X|}} \hline \multicolumn{2}{|c|}{$\rm m^2$} &  \multicolumn{2}{c|}{$\rm dm^2$} &  \multicolumn{2}{c|}{$\rm cm^2$} &  \multicolumn{2}{c|}{$\rm mm^2$} \\ \hline &&&\textcolor{blue}{4,}&&&& \\ &&&\textcolor{blue}{4}&\textcolor{blue}{0}&\textcolor{blue}{0}&\textcolor{blue}{0}& \textcolor{blue}{0},\\ &\textcolor{blue}{0,}&\textcolor{blue}{0}&\textcolor{blue}{4}&&&& \\ \hline \end{tabularx}  \end{document}   How to color the text without coloring the rest of the table?


windows 10 unremoveable language keyboard

I don't know how but suddenly a new language was added to my keyboard settings. The problem is that I can't remove it because it's not in the settings.  I want only English and Hebrew, but somehow I get:    English Hebrew Hebrew US keyboard (this one I want to delete, it is just English)    here are the settings:    Clicking on options I don't have the "Hebrew US keyboard" option anywhere to disable.


Difficulty in showing $\mathbb Z[\frac{1+\sqrt{-7}}{2}]$ is euclidean domain using another way

This is not duplicate As I wanted to check why my argument is not working,Please have a look     $\mathbb Z[\frac{1+\sqrt{-7}}{2}]$ is euclidean domain.   My attempt:  I had thought following proof for $\mathbb Z[\frac{1+\sqrt{-3}}{2}]$ but there is problem to use same method to show $\mathbb Z[\frac{1+\sqrt{-7}}{2}]$ is ED. So I thought is my attempt is wrong?  $a,b\in  \mathbb Z[\frac{1+\sqrt{-3}}{2}]$  Consider $\frac{a}{b}=r+s(\frac{1+\sqrt{-3}}{2})$ where $r,s \in \mathbb Q$  So choose $m,n \in \mathbb Z$ such that $-1/2N(b)\leq r-m\leq 1/2N(b)$ and $|n-s|\leq 1/2N(b)$  So $a=mb+nb(\frac{1+\sqrt{-3}}{2})+r_1+r_2(\frac{1+\sqrt{-3}}{2})$ where $r_1+mb=r$ and $r_2+nb=s$  Now $N(r_1+r_2(\frac{1+\sqrt{-3}}{2})$=$r_1^2+r_1r_2+r_2^2\leq 3/4N(b)<N(b)$  Hence Done  Similar proof I tried for   $\mathbb Z[\frac{1+\sqrt{-7}}{2}]$  but last step I get $N(r_1+r_2(\frac{1+\sqrt{-7}}{2})\leq N(b)$  So I could not conclude.  I would thankful if someone help me out


What does s.split("\\s+")) means here in the below code?

I am given a String name say String s in below code. This String contains a phrase i.e. one or more words separated by single spaces. This program computes and return the acronym of this phrase.  import java.math.*; import java.util.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class Initials {   public String getInitials(String s) {      String r = "";     for(String t:s.split("\\s+")){       r += t.charAt(0);     }     return r;   }     void p(Object... o) {           System.out.println(deepToString(o));       }   }   Example: "john fitzgerald kennedy"  Returns: "jfk"


Ficticious forces influences what an accelerometer exactly measures?

Take two different reference frames. The first one - say $\lbrace{W}\rbrace$ - is inertial and it's fixed to the Earth surface. The second one $\lbrace{B}\rbrace$ is moving and in general is rotating and accelerated, so $\lbrace{B}\rbrace$ it is not inertial.  The equations of motion for the origin of the frame $\lbrace{B}\rbrace$ can be formulated on both frames as:  $$ \sum_{i}\,  ^wF_{ext} = m\, ^w\dot{v}$$ in the inertial frame and $$ \sum_{i}\,  ^bF_{ext} = m\, ^b\dot{v} - ^b\omega \times m ^bv$$ on the non-inertial one, where $^f x$ represents the vector $x$ expressed on the frame $f$.  Let an accelerometer to be installed over $\lbrace{B}\rbrace$ which by design subtracts gravity from its output.  I'm not sure if it is measuring the term $^b\omega \times m ^bv$ or not so, what is the accelerometer exactly giving as output?


Are mean normalization and feature scaling needed for k-means clustering?

What are the best (recommended) pre-processing steps before performing k-means?


Suppose x and y are coprime integers and z is a natural number. Prove that If xy is a zth power then x and y are both zth powers.

I'm supposed to use a prime factorization somewhere, and that the fundamental theorem of arithmetic is to be applied as well.


Convergence of an Improper Integral (Determination of values of p and q that make intergral converge)

Q. Determine the values of p and q for which the improper integral converges \begin{equation}  \int_0^{\infty}x^p[\ln(1+x)]^q\,dx \end{equation}  After some calculation, I found out this integral diverges when:  $p,q \leq 0$ or $p \geq 0, q \leq 0$ or $p,q \geq 0$  So we have to only consider when $p < 0, q > 0 $ .  I used integration by parts method but after that, the remaining integral has a different form. For example: \begin{equation} \int_2^{\infty}x^p(\ln x)^q\,dx \end{equation}  This case is rather easy because after using integration by parts, the remaining integral also has a same form, that is:  \begin{equation} {q\over p+1}\int_2^{\infty}x^p(\ln x)^{q-1}\,dx \end{equation}  How do I proceed from here?


Floating point precision should still give correct result

I understand that the number 0.3 cannot be exactly represented in binary, and thats why doing something like:  0.1+0.2==0.3   gives False as an answer.  However even if the number cannot be exactly represented, the result should still be True. Here's my reasoning:  Python will do the operation 0.1+0.2 and the result will not be exactly 0.3, it will be some number close to 0.3 that will be stored as the left operand of the comparison.  But then it has to take the right operand 0.3, convert it to a number, which will give again number not exactly equal to 0.3 and store it as the right operand of the comparison.  Finally compare both numbers.  So the result should actually give True, even if internally it will be comparing two numbers and none of them will actually be 0.3  What am I missing here? If the number cannot be exactly represented, then this must be true for both operands, so we will be comparing something like  0.1+0.2==0.3 0.30000000000000004 == 0.30000000000000004 True


How to determine if a site is visited through mobile

How can I tell (in php) if a site is visited through a mobile device?  I can't use get_browser() because I'm not able to edit php.ini (to set the path of browscap.ini).


Terminal not displaying colors for directory listings

I don't know why my bash session doesn't show colors. I have tried Terminal as well as iTerm.  I have tried:   ls -G Setting export CLICOLOR=1 and export LSCOLORS=GxFxCxDxBxegedabagaced Using different themes such as solarized and something else   The versions of my software are:   bash: GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13) osx: 10.9.2   I have Homebrew installed  I don't know what other information might be helpful. I spend a lot of time on the shell, this problem is becoming very annoying :)  edit: in terminal preferences, I have 'Declare terminal as: xterm-256color' and 'Display ANSI colors' along with 'Use bright colors for bold text'


Improve GUI appearance of Wine applications

In many cases Windows programs run ok in Wine, but there is still the annoying problem of their appearance.  How to make things look better in Wine, especially fonts?


Remove optional ubuntu packages for speeding up release-upgrade

I have to update ubuntu 13 to ubuntu 14. When I issued release-upgrade it is showing that about 700 MB data is to be downloaded from internet. I have slow internet connection now. So it will take hours to complete. I believe if I remove some optional packages then it will ignore their updates. Hence I can reduce the amount of data downloaded from internet. How can I do it easily?


If class B and class C extend class A and I have an object of type B or C, how can I determine of which type it is an instance?


Problems upgrading to Python 3.3 and setting up Django

I'm new to Linux and am trying to set up Python / Django on my machine!  I installed Python 3.3 from the source file and it was compiled into /usr/local/bin. Then I created a symbolic link between /usr/bin/python and /usr/local/bin/python3, so that whenever I invoke python from the command line it uses the latest version.  Now I am trying to install MySQL Python and I got the following output:  apt-get install python-mysqldb  Reading package lists... Done Building dependency tree Reading state information... Done python-mysqldb is already the newest version. The following extra packages will be installed:   apt-listchanges python-apt Suggested packages:   python-glade2 python-gtk2 python-apt-dbg python-vte python-apt-doc The following packages will be upgraded:   apt-listchanges python-apt 2 upgraded, 0 newly installed, 0 to remove and 142 not upgraded. 3 not fully installed or removed. Need to get 0 B/394 kB of archives. After this operation, 250 kB of additional disk space will be used. Do you want to continue [Y/n]? Y Traceback (most recent call last):   File "/usr/bin/apt-listchanges", line 28, in <module>     import apt_pkg ImportError: No module named 'apt_pkg'   Any ideas on how to fix this?  Or any tips on how to clean up this install (if this one is too broken)?


Is there any special way to remark and format using markdown a summary in a very large question?

Although the title should summarize the content of a question, sometimes it is hard to synthesize the whole question in just a sentence.   It would be very interesting if there is any standard way to provide it. Taking into account accessibility principles, questions in Stack Exchange should be written in an easy and plain English, understandable for everyone, avoiding the using of jargon terms like TL;DR.  So my question is: Using , what is the best way to format and remark a summary to a question?  Maybe the next approach could be correct?     Using , what is the best way to format and remark a summary to a very large question?


I'm a little confused about how to interpert this qq plot. The huge gap between the values makes me think it's not the best normal distribution, but i'm not sure how to draw a good conclusion out of the following data. Help is highly appreciated !!


Why does my PyQGIS code for saving selected features result in altered geometries?

In a plugin I want to save the selected features in a new shapefile. I search and I try  ( to create a new layer and write the selected fields and features in that:      vl = QgsVectorLayer("Polygon", "temporary_points", "memory")     pr = vl.dataProvider()      # add geometry and fields     pr.addAttributes(fields)     pr.addFeatures(features)   But this result is not what I wanted. I get this:   In this image, the selected polygon is yellow and the pink polygon is the saved one as another shapefile. So the geometry is not completely correct and I need the perfect copy of the original.  Anyone knows how to get it?    I can use the algorithm from Processing Toolbox, "Save selected features".


Schedule to the batch. By launching a single class (CRON creation)

I want to automation of the different steps by adding a schedule to the batch. By launching a single class (CRON creation). Setup the launch of the multiple phase throughout the time.  Example:   Phase 1 : NOW + 1hour Phase 2: NOW + 6 days Phase 3: NOW + 10 days Phase 4: NOW + 12 day   How to set the CRON_EXPR for the above phases?  I have created this class. Could anyone plase help me to complete this class?  global class ScheduleBatch_AnonymizeEmail implements Schedulable {        /*         Call this from Anonymous Apex to schedule at the default regularity       */   global static String schedulePhase1() {     Datetime sysTime = System.now().addHours(1);      String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();     ScheduleBatch_AnonymizeEmail job = new ScheduleBatch_AnonymizeEmail();     return System.schedule('Email Anonymization Phase1', chronExpression, job);   }   global static String schedulePhase2() {     Datetime sysTime = System.now().addDays(6);      String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();     ScheduleBatch_AnonymizeEmail job = new ScheduleBatch_AnonymizeEmail();     return System.schedule('Email Anonymization Phase2', chronExpression, job);   }   global static String schedulePhase3() {     Datetime sysTime = System.now().addDays(10);      String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();     ScheduleBatch_AnonymizeEmail job = new ScheduleBatch_AnonymizeEmail();     return System.schedule('Email Anonymization Phase3', chronExpression, job);   }   global static String schedulePhase4() {     Datetime sysTime = System.now().addDays(12);      String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();     ScheduleBatch_AnonymizeEmail job = new ScheduleBatch_AnonymizeEmail();     return System.schedule('Email Anonymization Phase4', chronExpression, job);   }    global void execute(SchedulableContext sc) {     // This is good practice if you are likely to be processing a     // lot of records at a time     Batch_Class b = new Batch_Class ();     Database.executeBatch(b);   } }   is this correct?


Short story, space traveller crashes on planet, planet can replicate water, man eventually transforms into alien

I read this story 30+ years ago in grade school. A man crashes on an alien planet. He has a small amount of water and accidentally spills some, and the planet replicates it but it must destroy part of itself to do so.  The man then finds some stale crumbs in his pocket, puts them in a trough, and the planet replicates them as well, but it's disgusting to eat. The man eventually decides that his situation is hopeless, so he lays down to die on a table in a hot room and thinks he can at least give back to the planet some of the nutrients it sacrificed for him. He falls asleep, and when he awakens, he has been transformed into an alien creature that is perfectly suited and adapted to live on the planet without discomfort to himself or damage the planet.


The geometry meaning of Riemann–Stieltjes integral

Maybe my question seems so strange but I want to know what is the geometry meaning of Riemann stieltjes integral ??


How to copy YouTube playlist from one account to another

The link below provides the old answer to this question. The new YouTube playlist play interface is very different. So, what's the trick now? Tired of searching!


Is "Salaamun Alekum" in a question "religious content"?

A suggested edit came up in the queue that I wasn't sure how to handle:   (The link to the edit suggestion may or may not work for other users)  Although it is true it is unnecessary for the question, should it be removed? I guess the real question is, is Salaamun Alekum considered to be "religious content" on StackExchange, or is it more akin to a new user writing (which happens rather frequently):     Good morning. My C# ExecuteSqlCommand is not returning output from stored procedure.


I want to know that if the equation in the title  always holds?   I have generated a random Hermitian matrix $A$, and then compute $\log(\det A)$ and $ tr(\log(A))$ in matlab, it is not equal. So I'm really puzzled.  Can you give me the proof of this equation if it is true. Thanks in advance  I just show an example:  $$A=\begin{bmatrix}30.9186 + 0.0000i & -0.5120 - 0.0197i  \\-0.5120 + 0.0197i & 10.3822 + 0.0000i  \end{bmatrix}$$  $K>> log2(det(A))$  $ans =   8.3253 + 0.0000i$  $K>> trace(log2(A))$  $ans =8.3264 + 0.0000i$  what's wrong about it?  it is essentially different from these problem such as    because I think this equation is totally wrong, so I don't know why it can be proved.


Showing the factor ring $\mathbb Z[x]/\langle x^2 + 1\rangle$ is isomorphic to the Gaussian integers.

I'm hoping for feedback on my understanding of how to approach this question.    Firstly to recall;   $$R = \mathbb Z[x]/\langle x^2 + 1\rangle = \{ l(x) + \langle x^2 + 1\rangle | l(x) = 0 \text{ or } deg(l) < 2\}$$  If $a(x),b(x) \in R, $ we define multiplication and addition as:  $$a(x)\cdot b(x) = a(x) \cdot b(x) \text{ mod } x^2 +1,\ a(x) + b(x) = a(x) + b(x) \text{ mod } x^2 +1$$  To understand how this structure works we can see what happens to the basis on multiplication:  $$1\cdot1 = 0\cdot(x^2 + 1) + 1 = 1,\ x\cdot 1 = 1\cdot x = 0\cdot(x^2 + 1) + 1 = 1,\ x\cdot x = 1\cdot(x^2 + 1) - 1 = -1$$  So by investigation I can treat the $1$ as the real part and $x$ as the imaginary part. Given an arbitrary element of $R$ has the form $ \alpha \cdot 1 + \beta \cdot x$ for $\alpha,\beta\in \mathbb Z$, I define the mapping $\phi:R\rightarrow R$ as $\phi(\alpha \cdot 1 + \beta \cdot x) \rightarrow \alpha + \beta I$. Now to check this is an isomorphism between the two rings, I need to check that the mapping is a bijection on both operations of the ring.  I won't do this part as it's quite long winded, but my general approach here highlights a correct understanding right?  Thanks heaps.


Wordle-like word clouds - can it be done without using an image?

I have seen the answer to this question:    So yes it can be done by generating an image and inserting it, but that's kind of cheating. I'd like to be able to generate a word cloud that is made of searchable text, rather than a .png file. Does anyone know if that is possible?  Edit I'm interested in any style, it doesn't have to be a complex cloud with words in different directions, it could be a "horizontal" cloud like some of those .


How to get the running total pay and running balance in mysql?


Everytime I download Ubuntu onto my mac laptop, it is downloaded as an .iso file.  I cannot open the file because it tells me in Launchpad:   hdiutil: mount failed - No such file or directory


This, that and it for non-material objects

The question is not about how to use "this, that, it" with material objects, but how to use them with non-material ones? I don't understand (it, that, this) yet. For example:  I go to a gym every day and I like (it, this, that?). You helped me and (it, this, that) is very good.  Is there any rule about (again it, this, that?)? Suggestions? Can I use "this, that, it" interchangeably in most situations?


How to automatically (semi, if not fully) convert two-column LaTeX paper into MS-Word

I could not find full automatic conversion with math formulas and figures. Thought, let me get converted to ASCII then I will paste and format. Even that did not work well due to two-columns. I had to manually select-and-paste pdf, re-do all the maths and insert figures.  Any better way?


How should I apply brick to an interior wall?

I don't want to use veneer, I want to use real brick. Is it as easy as using tie-ins to the studs and setting the brick as one would normally?  The existing wall is drywall, So I was thinking of leaving this in place, screwing in the tie-ins and laying up the brick to my desired height.


Prove that $\mathbb{Z}[\omega]$ is an integral domain

Prove that $\mathbb{Z}[\omega]=\{ a+b \omega | a,b \in \mathbb{Z} \}$ is an integral domain, where $\omega^3=1$.   My solution:  Let $(a+b\omega)(c+d\omega)= (ac-bd)+(ad+bc-bd)\omega=0$  $\Rightarrow ac=bd \; \& \; ad+bc=bd. $  If $a\neq  0$, then put $c= bd/a$ to solve the equation and get  \begin{equation} \begin{split} &\quad d(a^2+b^2-ab)=0 \\  &\quad \Rightarrow d= 0 \; \text{or} \; a^2+b^2=ab. \end{split} \end{equation}  The first case $d=0$ solves the problem, but I am not able to figure out, how to reject case 2, when $a^2+b^2=ab$.


How can I block a program from accessing the Internet?

I really want to know how can I prevent a program to connect to Internet with Windows 7 firewall?    I have smart security nod32 business edition installed on my computer. should i do this job with nod or there is a way in Windows Firewall?


How can I calculate the distance between two positions in mysql query?

Can anyone help me with that. at mysql database I have providers table which contains longitude and latitude attributes, there is a user who will looking for providers who will be after x km from him so suppose that I have the user longitude and latitude. Is there any way to do that with mysql


How can I balance uniformity of style files against modularity?

I'm using Windows/TeXworks/MiKTeX, and I would like to have one style file I can use anywhere in any document in my top-level folder. If I want to add a new command or renew an old one, I'd like that to be available in all documents recursively contained in my top-level folder. I have a very hierarchical structure to my top-level folder. So this would seem to point to having a single file that TeXworks knows about. Could I add a path in Preferences -> Typesetting -> Paths for TeX and related programs? I've tried that, possibly superficially, without any success. Adding the correct folder to the Windows PATH variable doesn't seem to do the trick, either.   On the other hand, suppose I want to send someone a TeX file? It would be nice in such circumstances to be able to have the style file in the same folder as the TeX file. If I do that, how could I ensure that it's always up-to-date? Is there a script available somewhere that could take my master style file and push it down to all pre-existing lower-level locations?   Just to reiterate: I want uniformity of my style files in my very hierarchical folder structure. However, I would also like modularity, in that each folder is self-contained. How can I achieve that?  Also, out of curiosity, since I may acquire a Linux computer soon, how would I do this in, say, *ubuntu with TeXlive?


Complete files from a different directory in bash

I wrote two functions push and pull to copy files to and from a directory ($FILE_EXCHANGE_DIR). I want bash to autocomplete names from that directory when I use the pull function. I want the autocompletion to only take names from the said directory. In the current form, my autocompletion also finds names of the files in the current directory, regardless of whether there was a match in the source dir ($FILE_EXCHANGE_DIR) or not.  Here are two versions of the function I passed to complete. Neither of them worked.  _pull () {     local cmd="${1##*/}";     local word=${COMP_WORDS[COMP_CWORD]};     local line=${COMP_LINE};     filelist=( $(ls ${FILE_EXCHANGE_DIR} ) )      local TEMP_COMPREPLY=( $(compgen -W "${filelist[@]}" -- ${word} ) )      COMPREPLY=( "${TEMP_COMPREPLY[@]}" )     return 0; }  _pull ()  {     local word=${COMP_WORDS[COMP_CWORD]};     local line=${COMP_LINE};     local pat="$FILE_EXCHANGE_DIR/*"      COMPREPLY=($(compgen -f -G "$pat" -- "$FILE_EXCHANGE_DIR/${word}"));      i=0     for item in "${COMPREPLY[@]}"; do         COMPREPLY[$i]="${item##*/}"         i+=1     done;     return 0; }   In the end, I do  complete -f -F _pull pull   Is there a good way of completing names only from one directory (that is not the current one) and not from current? Even in the case when there was no match in the source (which should default to readline default completion?


Etcher used to be great for burning ISO to USB or microSD card. However, it still doesn't support DVDs. What is the alternative to make a bootable DVD from ISO?  P.S tried a few suggestions and  worked for me.


Does anyone have Clojure examples of how to edit data in JTable/TableModel i

My attempt to use JTable and ModelTable in clojure has been successful only to the point of being able to read a file and put the data into suitable rows & columns. My difficulty arises when I want to change some of the data. The Clojure examples I have examined only display cell values.   If anyone can direct me to 1 or more Clojure examples of how to use listeners associated with JTable/ModelTable I would be most grateful. The application is very simple and only needs to display data in a table then save any changes or additions to a file.


I was trying to understand which one to use. If someone says "I don't like you" Should I say "me neither", "neither do I" or "me either"? If she says "I hate you", what will be the difference and why?


Unexpected residuals plot of mixed linear model using lmer (lme4 package) in R

I have conducted an experiment with multiple (categorical) conditions per subject, and multiple subject measurements.  My data-frame in short: A subject has one property, is_frisian which is either 0 or 1 depending on the subject. And it is tested for two conditions, person and condition. The measurement variable is error, which is either 0 or 1.  My mixed linear model in R is:  > model <- lmer(error~is_frisian*condition*person+(1|subject_id), data=output)   However, the residuals plot of this model gives an unexpected (?) result.    I was taught that this plot should show randomly scattered points, and they should be normal distributed. When plotting the density of the fitted and the residuals, it shows a reasonable normal distribution. The lines you can see in the graph, however, how is this to be explained? And is this okay?  The only thing I could come up with is that the graph has two lines due to the categorical variables. The output variable error is either 0 or 1. But I do not have that much knowledge of the underlying system to confirm this. And then again, the lines also seem to have a low negative slope, is this then perhaps a problem?  UPDATE:  > model <- glmer(error~is_frisian*condition*person + (1|subject_id), data=output, family='binomial') > binnedplot(fitted(model),resid(model))   Gives the following result:    FINAL EDIT:  The density-plots have been omitted, they have nothing to do with satisfaction of assumptions in this case. For a list of assumptions on logistic regression (when using family=binomial),


I am trying to detect if exactly 1 player is in a radius using testfor. To my understanding, I should be able to use the c argument to count players, but I am having no such luck.  /testfor @e[x=0,y=0,z=0,r=100,c=1]   The intended output of this command is to return true if exactly 1 players is within 100 blocks of 0,0,0, and false if not.  If it makes any difference, testing for less than 2 players would solve my problem as well.


How can I reformat a list into a list of lists?

Let's say I have a a list, example = [1,2,3,4,5,6,7,8,9,10]. How can I reformat this into a list of lists such as [[1,2,3],[4,5,6],[7,8,9],[10]]. Note that the final element is a single element intentionally. I wrote the basic code shown below to do this but there must be an easier way. example = [1,2,3,4,5,6,7,8,9,10] temp = [] new_list = [] counter = 0 for num in example:      temp.append(num)     counter = counter + 1     if counter == 3:         new_list.append(temp)         temp = []         counter = 0 new_list.append(temp)     I'm trying to start writing cleaner code that doesn't utilize as many loops, if possible. There should be a way to do this without one.


Are other sites (besides MSE) growing inactive?

Ever since Everything That Happened with Stack Exchange, it's understandable that many users are hesitant to get re-involved on SE.  It's understandable that  are deleting their own accounts, out of protest, or out of frustration, or for many other reasons.  But I have noticed that, at the very least on , where I spend most of my time, questions are getting fewer views and fewer answers, fewer votes are being cast, and fewer questions themselves are being asked.  I've also noticed that flags are taking a long time to be processed, probably because of the fact that Writing.SE .    Are other sites also experiencing inactivity?  Is this in direct correlation with Everything That Happened?  Is it just this site, or are other sites experiencing the same patterns as well?


Online test with 80 questions best practices

I have to create an online test that has around 80 questions. These are one sentence questions with 5 answer options for all questions (no free form). Now my question is what would be the optimal way of displaying the question for a UX point of view.   Either showing 20 questions per page or  showing one question per page and when an answer is selected it automatically and in a fast way takes the user to the new question (allowing user to go back if the selected answer is incorrect).


So, during algebra class, one of the 5th-year students who was there to help us and I tried to find the proof for $$\left.p\middle|{p \choose k}\right. \forall k, 0<k<p \iff \text{p is a prime number}$$  So to do this we need Kummer's Theorem, which itself uses an alternate form of Legendre's formula. What I want to prove is the following identity: $$\sum_{i=1}^\infty\left\lfloor \frac n {p^i} \right\rfloor = \frac {n - s_p(n)}{p-1}$$  Where the brackets denote the floor function and $s_p(n)$ denotes the sum of all digits of $n$ when $n$ is written is base $p$.  The proof is in Wikipedia, but I'm afraid there are some steps I don't get.


How can I use the find command to list all the file types in a directory and all subdirectories?

How can I use the find command to recursively list all the file extensions in a directory?  Using wildcards I can find all the files of a certain type:  find . -iname '*.mp3'   but what I want to to list to search a directory and all sub directories and list all of the file extensions found.


graphicx (or graphics) package distorts format

I have a strange problem. I am writing my thesis and the style file is provided by my university. The normally working graphicx package seems to be distorting the format when I enable it using \usepackage{graphics}   If I enable this package, and not even insert a figure, the bottom margin changes as demonstrated in the figures below. And naturally, I can not add a figure without graphicx!   How can I overcome this problem?


What is the difference between $\emptyset$ and $\{\emptyset\}$?   I am reading from some notes and author denotes the empty set by $\{\emptyset\}$. I am getting confused as definition says      In mathematics, and more specifically set theory, the empty set or   null set is the unique set having no elements   I think $\{\emptyset\}$ is wrong notation as that implies that it has one element. More specifically it should be the notation of power set of $\emptyset$


What time will Ubuntu 16.04 LTS be available for upgrade in Ireland from Ubuntu 14.04 LTS?

I know that it is sometime today, I have updated all my software and it says up-to-date now. If I run update-manager -d in the therminal it does say that 16.04 LTS is available but in the release notes it says that it is a development update for testing. I was looking for the final release


Clipping a raster DEM between two elevations

I am trying to clip a raster DEM between two elevations, specifically a portion of the contiguous United States in an SRTM 90m DEM.  I would like to create a vector polygon mask that overlies the all parts of the DEM that lie between two elevations; for example, between 1000m and 2000m.  At the moment I have downloaded the SRTM section I need in both ASCII and GeoTIFF formats. I am using QGIS 2.18.15.


What does installing games through discs do to my xbox 360

I installed a game through the original game disc but I still need the disc for some reason. Why?


If neutronium existed out there, are we capable of observing it?

I know that theoretically, neutronium cannot exist. However, no work was done until now even looking for neutronim around us. So my question is that, if neutronium actually existed with some minimum mass number (above 2, excluding the observed unbound dineutron in 2012), can we observe them? They don't interact with optical light, as the minimum photon energy to excite surface neutrons should be very high, and they are not charged! So how we can proof our theoretical look for neutronium? My question is about how can we roof our theoretical look for neutronium?


I installed ubuntu alongside windows 8.1 and i installed correctly by creating partitions and the laptop finally says restart to use ubuntu but when i do , it agains diplays a gnu grub version showing : -try ubuntu without installing -install ubuntu -oem install -check disc for defects.  also i have no idea where my windows has gone.


How to install Ubuntu on a different drive from Windows8?

I really need a help. I have an SSD in which I have Win8 and I also have an HDD in which I want to install Ubuntu. I reduced the size of my HDD of 40gb from Ubuntu and now I'm in the installation procedure. I don't know how to do:    I want to create /, /home and swap partitions without losing any data (I know it's recommended a backup but I have no time), so what I need to choose? It ask me "select device to install bootloader", which I need to choose: SSD in which I have Win8 or HDD in which I 'm installing Ubuntu?


Convergence of a sequence with repeated sines

Let $x\in(0,\pi/2)$ and $\{a_n\}_{n\in\mathbb N}$ defined recursively as follows: $$ a_0=x, \quad \text{and} \quad a_{n+1}=\sin(a_n). $$  Show that $$ \lim_{n\to\infty}{n\,a_n^2}=3. $$  Note. There is a very strong numerical evidence that the above is valid, and the limit is independent of the initial choice of $a_0$. I have no idea where to start from.


Suppose you are an instructor and you have given a (midterm or final) exam. This is a substantial portion of the grade; a student who misses it has little chance of passing the class. (I have in mind a college course, but maybe this a question in high school as well.)  Suppose that a few students don't show up for the exam. Of course, if the students were ill or had personal emergencies, you would like to give them a chance to make up the exam. You send them an email after the exam, but hear nothing back for a few days.  After those few days, you grade the rest of the exams, and would like to return them to the class and post solutions online so that your students can learn from their mistakes  However, if any of the students who missed the exam will later ask for a makeup, then they will have the advantage of seeing the solutions. While you certainly wouldn't give them an identical exam, it seems like this would still be a substantial advantage.  What is the fair thing for you to do here?  EDIT:   I thank Peter K. for commenting. However, the referenced question is about a quite different situation; it has nothing to do with discussing or posting solutions for the rest of the class.


Blender as video editor tracks out of sync

I'm using blender as a video editor, everything is setup correctly for what I normally do.  I capture game footage with Open Broadcasting Software and upload the odd video here and there.  Blender seems awesome in almost every way but I recently switched to using Nvidia ShadowPlay to record my gameplay footage as the quality is fantastic at high bitrates with almost no penalty to performance.  The problem I have is that when I try to edit a video in Blender the audio and video tracks are out of sync.  When I view the video information in VNC while playing the raw recording the frame rate is never the same.  Each video has a slightly different frame rate.  I have the frame rate set to 60fps.  However the actual videos come out as 59.8842fps or 59.245fps.  I think this is what is causing the audio and video to be out of sync in Blender maybe?  I can input a custom frame rate but it looks like it only allows certain increments such as 59 or 59.4, or 60.  Is there any way to get these tracks to sync up so I can simple cut out the parts I don't want?  Any help would be greatly appreciated.


Using the properties panel I can add, with "+"  button, only eight UV maps. Is it possible to have more than 8 of them?


Null SPFile reference when trying to check whether a list item is checked out

I am trying to show an error when a user performs an operation with a list item that is checked out.   How I get the list item:   var listItem = list.GetItemById(itemId);   This works and I can perform some other checks, like check the item's column values.   Now I try to check whether the list item is checked out:   if (listItem.File.CheckOutType != SPFile.SPCheckOutType.None) {     var checkedOutBy = listItem.File.CheckedOutByUser.Name;     throw new Exception("This item is checked out by " + checkedOutBy); }   This throws an exception "Object reference not set to an instance of an object".   I check whether the listItem.File is null:   if (listItem.File == null) {     throw new Exception("listItem.File is null"); //gets thrown }   This confirms that the .File is null.   What did I do wrong? Is there any other way to check whether a list item is checked out?


How to get rid of the foreach statement in this piece of code

I have a simple method:  internal void run() {     foreach (string file in Directory.GetFiles(Path).ToList()         .Where(x => DateTime.Today.Subtract(File.GetCreationTime(x)).Days > NumberOfDays))     {         File.Delete(file);     } }   Is it possible to get rid of the foreach statement?


we need to know about simple message header accessor in web-socket spring boot. how to pass the database value to websocket using simple message header accessor.


How do you convert an SSH private key to a .ppk on the Windows command line?

I have generated a key pair with ssh-keygen. I now want to use the same key pair with PuTTY-based applications.  Because I'm working in a CLI environment, I want to convert the key to the .ppk format from within this environment.  Apparently, you can use puttygen openssh_private_key -o output_filename.ppk on UNIX-like environments. But the Windows version of puttygen will just load the key and prompt you to use the GUI to export the key.   suggests that this simply is not currently possible, at least with puttygen. I'd gladly accept and option that uses other means though.  How can I convert the key from the command line?


Indian, USA resident, visit Europe , London Transit , transit visa needed?

Confusion is because I hold a USA visa but not traveling TO the USA. I'm visiting Europe for tourism.  I am an Indian Passport holder, working in the USA (NOTE: Holding USA F1, Student Visa). I am visiting Sweden for New Year and have received a visiting visa (NOTE: Holding Schengen visiting visa ). I have booked British Airways flight transiting through London (NOTE: Same Terminal for arriving and departing flights at London, two hours apart). I have a return ticket confirmed from USA to Sweden to back to USA .  Would I need a Transit visa in this case?  UK GOV says:     You’ll need a visa to pass through the UK in transit (unless you’re   exempt) You should apply for a Direct Airside Transit visa if you   arrive in the UK on a flight and leave again without passing through   immigration control.      Exemptions You don’t need a visa if you have one of the following:      a visa for Canada, New Zealand, Australia or the USA (this can be used   for travel to any country) a residence permit issued by Australia or   New Zealand you have a common format residence permit issued by an   European Economic Area (EEA) country or Switzerland a resident permit   issued by Canada after 28 June 2002 a uniform format category D visa   for entry into a country in the European Economic Area (EEA) or   Switzerland an Irish biometric visa a Schengen Approved Destination   Scheme (ADS) group tourism visa where th e holder is travelling to to   the Schengen country that issued the visa a flight ticket from the   Schengen area, if you can prove that you entered the Schengen area in   the previous 30 days on the basis of a valid Schengen ADS visa a valid   USA I-551 Temporary Immigrant visa issued by the USA (a wet-ink stamp   version will not be accepted) a valid USA permanent residence card   issued by the USA on or after 21 April 1998 an expired USA I-551   Permanent Residence card issued by the USA on or after 21 April 1998,   with a valid I-797 letter authorising extension a valid standalone US   Immigration Form 155A/155B issued by the USA (attached to a sealed   brown envelope) All visas and residence permits must be valid.   Does point 1 apply as an exemption in my case?


Has anyone got product rich snippets to work with ld+json?

Has anyone got this to work? Snippets appearing in search results?  Reason I ask is because I've added the script but it's not showing up in Google search results. I added the script last week and Google search console tells me three pages have been processed.


Throughout the Harry Potter series, Professor Trelawney makes many different prophecies and predictions. Although most of them are implied to be nonsense, often enough they still get fulfilled. Which ones have come true? Which ones have been proven false? Which ones are still possible?  How many of Trelawney's prophecies have come true?  I'm not asking if Divination in Harry Potter is real, or what it is. I am asking for a finite list of which of Trelawney's prophecies came true, and which ones didn't.


Determine list of event handlers bound to event

I have a WinForms form that won't close. In OnFormClosing, e.Cancel is set to true. I am guessing that some object in my application has bound to the Closing or FormClosing event, and is blocking the close. To find out, I'd like to determine what delegates are bound to one of these events.  Is there a way to determine the list of handlers bound to an event? Ideally I would do this via the Visual Studio debugger, but can write code in the application to find the handlers if necessary. Understanding that an event is like a hidden private field, I've navigated through the Debugger to the "Non-Public Fields" for the "Windows.Forms.Form" ancestor of my form, but to no avail.


Should this "wasn't" be a "weren't"? Why?

If it wasn't raining I would have gone to work.   I was told this sentence isn't correct, because it should have "weren't" instead of "wasn't":     If it weren't raining I would have gone to work.   Is this actually true, and if so, why?


Does OEAP padding limit the size of my modulous to the size fo the hash function?

im looking  at wiki at the moment as how to use oeap padding and it appears, help  me out if im wrong as G(r) - expands r to the size of the padded message, I am then limited by the size of my hash function as say a SHA-256 hash function would expand to only 256 bits, but what if I had a 2048 bit modulus? I'm unsure if there are any 2000+bit hash functions out there, or could I use a series  of different r values, hash them and use the concatenation of the hash outputs to create a 2000  bit xor?


Is there any way to downgrade my Mac mini to Mojave 10.14.3?

I updated my Mac mini to Catalina an this broke an important app I use. I think downgrading to 10.14.3 will make it work again (a colleague of mine has their Mac mini at this version and the app works) Is there a way I can downgrade it?


How can I find my public IP using the terminal?

I am on DHCP, having dynamic IP.  Finding your public IP when using a GUI and a browser is extremely easy. Simply go to Google.com and search for "What is my IP". Google will display it in the very first line.  However I am unable to find my public IP when inside Ubuntu server.  I have created a system with Ubuntu server (LAMP Stack) for my personal use. This system boots up simply in terminal mode. I want to do SSH using some other system across the internet; thus knowing the public IP becomes necessary.  What is the command to display the current public IP adress of that system?


Null Pointer Exception in Recycler View Holder onClick

I have a RecyclerHolder called EventHolder which I use in multiple layouts. It works perfectly in one activity. In the second activity, while the RecyclerView displays everything correctly, it throws a null pointer exception when I click on one of the items in the list in an attempt to move to the 'ViewSingleEvent' activity. I cannot figure out why this is, especially since it works for the first layout.  Code from EventHolder class:      @Override     public void onClick(View v) {          //handle the on click event for the ViewHolder - get single event details and switch activity         if (this.event != null) {             //getting the ID of the particular event clicked             String indEventId = this.event.id;             //using an intent to pass data between values             Intent i = new Intent(context, ViewSingleEvent.class); //nullpointerexception here             i.putExtra("id",indEventId);             context.startActivity(i);         }     }   The line Intent i = new Intent(context, ViewSingleEvent.class); holds the error. Is this something to do with getting the context of the second activity? Please help.  ALSO: I have already looked at multiple similar NullPointerException questions already, and have not found the answer to my question, so please don't mark this question as a duplicate - I'm stumped.  Edit: Code from EventHolder class where I get the context.  private Context context;      public EventHolder(final Context context, View itemView) {         super(itemView);          this.context = context;   I THINK this is how I pass the context from the first activity (the one that works):          //declaring the layout manager         RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);         eventsListview.setLayoutManager(layoutManager);   This is what I did for the one that doesn't work. Note that it is a fragment, not an activity.          //declaring the layout manager         RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());         eventsListview.setLayoutManager(layoutManager);


How to diagonally divide a table cell … adaptation?

I try to adapt this solution  to my needs.  But I have a width problem 1\tabcolsep is too short, but anything longer is too long, should be 2\tabcolsep.    \documentclass[10pt]{article} \usepackage[T1]{fontenc}  \usepackage{array} \usepackage{tabularx} \usepackage{ragged2e}  \newcolumntype{C}[1]{>{\Centering}p{#1}} \usepackage{tikz}  \newcommand\Tdiag[4]{%     \multicolumn{1}{|p{#2}|}{\hskip-\tabcolsep     \begin{tikzpicture}[%                 baseline={(0,-.25\baselineskip)},                 every node/.style={outer sep=0pt,inner sep=#1}]     \node[minimum width={#2+1\tabcolsep-\pgflinewidth},         minimum height=2\baselineskip-\pgflinewidth+\extrarowheight,         use as bounding box] (box) {};     \draw[line cap=round] (box.north west) -- (box.south east);     \node[anchor=south west,text width=.75*#2,align=left] at (box.south west) {#3};     \node[anchor=north east,text width=.75*#2,align=right] at (box.north east) {#4}; \end{tikzpicture}\hskip-\tabcolsep}}  \begin{document}  \begin{tabular}{|C{1.2cm}*{3}{|c}|}\hline \Tdiag{.2em}{1.2cm}{\^Age}{Sexe}& Féminin & Masculin & Totaux  \\\hline 15 ans&&1&\\\hline 16 ans & 16 & &  \\\hline 17 ans & 3 & &  \\\hline Totaux & & & 36  \\\hline \end{tabular}   \end{document}


Getting different results running same commands step by step at a terminal and within a script

pid=$(pgrep 'engrampa') #Get the PID of the engrampa processes . killpid=$(echo $pid | head -1) #Get only the first line of the $pid variable and put into a new variable called $killpid. kill $killpid   I want to maintain only the first line of the variable $pid.  Let's say I have 3 instances of the engrampa process open.  When I run the commands above step by step at terminal, I get exactly what I want: 2590    When I run those exaclty commands in a script I get this result: 2590 18425 18449    Why is that happening?


picklist value not recognized in the test

When trying the test class for the related picklist value in a Quote field i get the following message:      System.DmlException: Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: 3668: [Sales_Org__c]   But the value 3668 exists and it's free of errors in the org. Any idea? thanks


Why is my actual download speed less than that found by by speedtest.net?

I ran my Internet connection through SpeedTest.net which claims that it finds out the actual Internet speed, much lower than that promised by my ISP.  But—while downloading—the speed is much lesser than the test results. Even after using download mangers like Internet Download Manager, there isn’t much difference.  Are some background apps consuming my Internet bandwidth? If so, how can I divert all of the bandwidth towards one application?


How can I install Ubuntu on Windows 10 laptop with two hard drives on separate drives?

I have a brand new Windows 10 laptop that has two drives, a 512 SSD and a 1 TB hard drive. I would like to use the entire 1 TB drive to install Ubuntu on. I am new to Linux (just re-purposed an old Windows laptop to be all Linux two weeks ago and love it, but it is limiting because it is a 32-bit system.) I really need a 64-bit Linux machine for graduate school, but need Windows for work. I am afraid to make a mistake and risk loosing all the Windows installations I need for work. Is there a foolproof (yes I'm a Linux nube) step-by-step process? Thank you.


There are quite a lot info in    But I'd like to know exactly how many votes of which type question/answer need to leave queue.  For example(if I understand it correctly) for suggested edit post need one of:   3 Approve's 3 Reject's  Improve ♦ Approve  ♦ Reject


Own equation environment for - R syntax formulas

I'd like to be able to write down formulas in R syntax as equations, i.e. I'd like to do something like this:  \begin{requation} time ~ (poly(I(1/nprocs), 2) + poly(ndoms, 2) + poly(nDOF, 2))^3 \end{requation}    while the equation would be numbered together with ordinary equations and its content would be the simple text with \texttt{}. So, I need no math-mode inside the environment.  Do you know, how to do it?    EDIT  I've tried something like this  \newenvironment{requation} {% \VerbatimEnvironment \begin{Verbatim} } { \end{Verbatim} \refstepcounter{equation}\hfill(\theequation)}   The only problem is, that in this case there is a newline after \end{Verbatim} which I don't want - is there any possibility to get rid of it?


Just wondering if anyone can point me in the right direction please, it may not be possible - but just thought I'd ask incase.  I currently have a marketing website for a school campus, within that site we would like to create a Custom Post type Blog which is only accessible to users who enter a username/password to access it - that I can do. But my question is, if documents or images are then uploaded to that Custom Post Type, how would I make sure that they are also private and can't get listed in Google or accessed by anyone who doesn't have login credentials?  Thanks!


In Gravity, when they get back to the ISS, she was barely holding onto him, but they were both stopped.  Why, then, did he have to let go or otherwise he'd pull her with him?  As far as I could tell, their momentum, at least in relation to the ISS, had been stopped.


Was Mount Doom exclusively the only place the One Ring could be destroyed?

I was recently reading some Lord of the Rings/Stargate SG-1 crossover fanfiction. It is a guilty pleasure, I admit :) In this story, it was suggested by Col. O'Neill to destroy the Ring using a nuclear device. Truth be told I stopped reading at this point, as it was getting to be a little much even for me.  Obviously, this is not canonical in either universe, but it made me wonder: When Elrond said that "only in the fires of Mt. Doom may it be unmade," was he speaking literally? Or was this merely the only known active volcano in Middle Earth? In other words, was whatever magic that protected the One Ring from damage location-based or did it just make it very resistant to destructive force, and Mt. Doom just happened to be hot enough to do this? I know there is (understandably) little information about such technicalities of how magic works in Middle Earth, but I'll accept any reasonable conjecture/consensus as an answer.


I've imported a Lego model into Blender. How do I group the parts together so I can transform them as a single unit? I don't want the individual parts to be selectable using the mouse. Thanks.  [edit]  I found the answer here:    So this is a duplicate.


$$ \lim_{x\to o} \frac{(1+x)^{\frac1x}-e+\frac{ex}{2}}{ex^2} $$   (can this be duplicate? I think not) I tried it using many methods  $1.$ Solve this conventionally taking $1^\infty$ form in no luck  $2.$ Did this, expand $ {(1+x)^{\frac1x}}$ using binomial theorem got $\frac13$ then grouped coefficients of $x^0$ and it cancelled with $e$ then took coefficient of $x$ cancelled with $\frac{ex}{2}$ and so on   very messy right ? at last I got $\frac13$ but that's not the expected answer!  I must have went wrong somewhere can anyone help me with this.