What's the most efficient Minecraft mining strategy?

When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approach to mining.  What is the optimal mining strategy that yields the most rare minerals while minimizing blocks removed and time spent digging and traveling?  Edit: The existing answers are great for mining, but no one has addressed travel time to and from the mine which is usually ~60 blocks downward and incredibly tedious. Solutions?


it can be demonstrated by elementary means that the curves $y=\cos x$ and $y=x$ meet exactly once, at a value $x=\alpha$ satisfying: $$\cos \alpha = \alpha$$ it is also evident (empirically) that simple reiterated pressing of the cosine button on a calculator produces a sequence that seems to converge at a steady, modest pace, from any initial real value to $0.73908\dots$.   however for some time I have fiddled about ineffectually attempting to prove this convergence. this is interesting from a psychological point of view -  because I believed the problem was just beyond my reach, I failed to spot a fairly simple proof-idea, which requires no more than high-school calculus and trigonometry.   or at least that is my present thought! the following proof-idea seems OK, though i haven't dotted every i and crossed every t, and since I know myself to be error-prone, I would appreciate it if someone more experienced could check the argument, and remedy any deficiencies - or at worst detect some fundamental flaw I haven't noticed.  I am uncertain how to finish off, and also about how to properly manage the role of $\delta$ - in fact the convergence, though not rapid, seems very robust with regard to initial values.  thank you   firstly, since we know the number $\alpha$ exists, this simplifies the demonstration. it suffices to show that:  $$\exists \delta,\lambda \in (0,1) .  \forall x \in \mathbb{R}.|x-\alpha| \lt \delta \rightarrow  |\cos x - \alpha| \lt \lambda |x-\alpha|$$  set $\beta=\sin \alpha = \sqrt{1-\alpha^2}$ and let $x=\alpha +\epsilon$. then: $$ |x-\alpha| = |\epsilon| $$ and $$\cos x = \cos \alpha \cos \epsilon - \sin \alpha \sin \epsilon = \alpha (1+O(\epsilon^2)) - \beta(\epsilon + O(\epsilon^3)) $$so: $$ |\cos x - \alpha| = \beta |\epsilon|+O(\epsilon^2)= (\beta +O(\epsilon))|\epsilon| $$ giving $$ |\cos x - \alpha| = (\beta +O(\epsilon))|x-\alpha| $$


chisq.test in R doesn't produce same answer as by-hand

I have the following set of observed versus expected values:  > chisq.test(matrix(c(35,11,44209,44233), nrow=2))      [,1]  [,2] [1,]   35 44209 [2,]   11 44233   Where [1,1] = expected yes, [1,2] = expected no, [2,1] = observed yes, [2,2] observed no.  When I run this, I get...      Pearson's Chi-squared test with Yates' continuity correction  data:  matrix(c(35, 11, 44209, 44233), nrow = 2) X-squared = 11.506, df = 1, p-value = 0.0006937   So, the $\chi^2 =11.506$.  However, when I hash it out by hand, I get  > (11-35)^2/35 + (44233-44209)^2/(44209) [1] 16.47017   ...which is considerably larger.  What is the cause of this difference?  Is this the Yates continuity correction in action?  Am I entering the data incorrectly somehow?  I see  in that it does both contingency table tests /and/ goodness-of-fit tests, but this looked like the right syntax for contingency function?


Updating localstorage arrays in Javascript?

I'm having hard time on this localstorage array. Hope you can help me .  here is my code..  var bank = document.getElementById('name_bank').value;  function AddBank(bank){    var data = JSON.parse(localStorage.bank);      if(!$.inArray( bank, data )){     data[]=bank;   }    localStorage.setItem("bank", JSON.stringify(data));  }   and i have a error Uncaught SyntaxError: Unexpected token ]


How to testfor player holding a a certain amount of specified item

Is there anyway that I can testfor a player holding 1 stick and run a command through a clock? If the player is not holding 1 stick (meaning if the player holding 2 or more sticks) the clock will not be activated.  Is there anything wrong with this command?  /testfor @p {SelectedItem:{id:minecraft:stick,Count:1,Damage:0}}   If possible, I want to testfor a stick named "Wand".


Why don't mammals have more than 4 limbs?

Arthropods have 6 or more limbs and arthropods with 6 limbs appear to move faster than arthropods with 8 limbs so I wonder whether this might have something to do with fast and efficient locomotion. But, this is just a guess. I wonder what the official explanation is, if it exists.


If I scroll from an answer back to the question the questions text isn't visible any more:    After scrolling it again the text appears partially:    Sometimes the answer will appear with a very small font:    Source code doesn't appear in full width neither:    and when I scroll, the grey background covers the source code completely:    This makes the app totally unusable.  Galaxy S2, Android 4.0.3. App version 1.0.51


Why is order of electron orbital filling not completely sequential?

Orbitals fill in the following order, 1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, etc.  Its a nice pattern that many elements follow, but there are exceptions to.  For example:  V:  1s2 ... 4s2 3d3 Cr: 1s2 ... 4s1 3d5  And not: (which would seem to be breaking pattern)  Cr: 1s2 ... 4s2 3d4  This can also be seen on other elements, where a higher shell 'steals' from one below it in a seemingly random order.  Is there a reason behind this, and if so,  even if complex, what pattern is there to it?  I am new to the world of the very small, new to chemistry.  Any help is greatly appreciated.


Why does the amount of energy transferred depend on distance rather than time?

The change in energy of an object can be determined by the work equation, where work is the change in energy:  $$ W = F \cdot d $$  I conceptualize the transfer of energy as simply a series of small "packets" of energy being transferred at every Planck length. These small "packets" of energy add up to the total energy transferred (i.e. work). I'm not sure if this conceptualization is correct, so correct me if I am wrong.  However, it makes me wonder why the amount of energy transferred is dependent on distance and not time.  $$ m_1 = 10~kg \\ m_2 = 20~kg \\ W_1 = (10~N)\cdot(5~m) = 50~J \\ W_2 = (10~N)\cdot(5~m) = 50~J \\ W_1 = W_2 \\ t_1 \neq t_2 $$  If I apply a constant force on an object, why isn't the energy transferred at a constant rate with respect to time? The energy transfer rate varies dependent on how long it takes to cover the set distance.  In other words: why is the energy transferred consistent per unit of distance, and not per unit of time?


Let $I = \int_{1}^{2}\int_{1}^{2}\int_{1}^{2}\int_{1}^{2} \frac{x_1 + x_2 + x_3 - x_4}{x_1 + x_2 + x_3 + x_4} dx_1 dx_2 dx_3 dx_4 $ Then $I$ equals $ (a)\ \frac{1}{2} \\   (b)\ \frac{1}{3} \\   (c)\ \frac{1}{4} \\   (d)\ 1 $ I've tried to solve this and I also could do the whole integration down to the last variable but the process is tremendously lengthy and I have a term $log7$ remaining in my solution. I don't know where I've made a calculative mistake but I just want some hint to solve this problem in a easier and a compact way. Also I've thought about change of variable transformations but couldn't think of any suitable one.


Question: Find the image of (1,1,1) by T  $$T(x,y,z) = (y,6y,x+y+z)$$   I found the standard matrix to be:   \begin{bmatrix}0&1&0\\0&6&0\\1&1&1\end{bmatrix}  I'm confused on how to approach this question.   In order to find the image is it possible to inverse the values of it's standard matrix?  Would I able to use the identity matrix of 3 and inverse the values of that to find the image?    Any help will be greatly appreciated.


I've recently asked a question:   regarding working with chapters in tex. I have since learned that I must use documentclass report for the purposes of my document. However, now all of my Theorems, Corollaries, Remarks, and so forth are numbered "0.number.number" (with the first 0 never changing). I would like, at the very least, to understand how to make the first number denote the number of the chapter.  The current code I have is this:  \newtheorem{thm}{Theorem}[section] \newtheorem{rmk}[thm]{Remark} \newtheorem{qst}[thm]{Question} \newtheorem{prp}[thm]{Proposition} \newtheorem{hyp}[thm]{Hypotheses} \newtheorem{crl}[thm]{Corollary} \newtheorem{cnj}[thm]{Conjecture} \newtheorem{lem}[thm]{Lemma} \newtheorem{dff}[thm]{Definition} \newtheorem{clm}[thm]{Claim} \newtheorem{ntt}[thm]{Notation} \numberwithin{equation}{section}


Metropolis-Hastings acceptance ratio for truncated proposal

I have a proposal distribution for one parameter theta_guess  theta_guess = guessleft(theta_accept(1,r-1), 0.01,0)   which is a left truncated normal (and thus non-symmetric) with inputs and output given by:  [guess]=guessleft(mu,sigma,a)   where mu is the mean, sigma is the std. deviation and a is the lower bound. Moreover, theta_accept(1,r-1) is last period's accepted theta because r is the iteration counter and theta_accept is a 1 x R vector (where R is the number of iterations to run in the M-H loop).   I want to create a correction factor for the acceptance ratio. I am not sure however how to do it. I've tried:  c=truncated_normal_a(theta_guess,theta_accept(1,r-1), 0.01,0)/...   truncated_normal_a(theta_accept(1,r-1),theta_guess, 0.01,0)   which is of course one. My problem is that I have two parameters, mu and sigma. sigma is fixed, but mu is not in the proposal since it depends on the last period's accepted parameter. So I have no idea what to put in mu's place when creating my correction factor.


Conflict between amsthm, cref, and hyperref

I cannot determine why this does not compile unless I remove amsthm which I normally include, though I don't exactly know why.  \documentclass{article} \usepackage{amsthm} \usepackage{mathtools, thmtools}  \usepackage[capitalize]{cleveref}   \declaretheorem[style=plain,numberwithin=section,name=Theorem]{theorem} \declaretheorem[style=plain,sibling=theorem,name=Lemma]{lemma} \usepackage{hyperref}  \begin{document}  \begin{theorem} This is a test. \end{theorem}  \begin{lemma} This is a test. \end{lemma}  \end{document}


How can I stop the table from moving to a different page?

I have a long table in this format that starts in the middle of the first page. But when I populate the table, it moves to the second page instead of continuing from the first page. How can I do it?  \begin{tabular}{p{0.4\linewidth}p{0.6\linewidth}} %    \toprule     \multicolumn{1}{l}{\textbf{Requirements}} &             \multicolumn{1}{l}{\textbf{My Qualifications}} \\  %    \midrule Education & 4 years experience.\\  Modeling & Have modeled.\\  %    \bottomrule \end{tabular}


Why do lower f-stop numbers mean larger apertures?

I thought this would have been asked before but it seems not.  I don't understand how f-stops are numbered. From what I read, the lower the f-stop number, the larger the aperture. That is, f/2 is larger than f/22.  This seems odd to me. The maximum aperture width is (at least theoretically) infinite, while the minimum is 0 (i.e. the lens is completely closed and not letting in any light).   The way the numbering system is set up, it allows for infinitely tiny apertures but a limit on how large they can be (i.e. I guess the largest is f/0)  Can someone clarify why the aperture is numbered in this way?


Is redirecting homepage to a page with keyword it's targeting helps in SEO?

My site is fairly new, e.g. example.com. I need to optimize the home page(example.com) for a keyword, e.g. healthy-food.   Does redirecting home page to example.com/healthy-food, would help in terms of SEO, since URL contains keyword the page is targeting for.  The issue with adding extra redirection is that it adds additional latency of 300ms while accessing the homepage, which I would like to avoid.  I do not want to put same content on example.com and example.com/healthy-food, since it will flag duplicate content.   Please advise.


How to compute the bounding box of multiple layers in lat/long?

I am writing an application to performance test all kinds of map services, primarily AGS 9.x, AGS 10, and WMS 1.x.  Part of the application involves generating random bounding boxes for individual requests, within the service's full extent. This part is working fine for geographic and projected coordinate systems when the service's full extent is known (e.g. through an AGS service's fullExtent property).  My problem is with WMS: each layer in a GetCapabilities response can define its bounding area in >= 1 CRSs. Some parts of the application need to know if a service's CRS is geographic or projected, so in order to remove ambiguity in WMS I am always using the layer's LatLonBoundingBox which is always defined and in EPSG:4326. I then have to calculate a full service bounding box based on all layers that go into an individual request (which are randomised). This is where it gets tricky.  I am getting lost because for each lat / lon bounding box the LLx (lower left longitude) could be a larger or smaller number than the URx (upper right longitude), depending on which meridians it spans. Every time I start drawing square or circular diagrams I think I have an approach figured out, and then find a case that ruins it and my brain turns to mush.  I am going to keep thrashing at it until it works, and if I get a solution post it here, but I'm sure there has to be an accepted and fully tested approach which would make my life easier. I just can't find it right now.


How to create LV(Logical Volume) after ubuntu is installed?

everyone. I need to create LV for xen guest. There is only one disk of 70G. While installing, I use the default process and not the LVM. Do I need to reinstall Ubuntu to create the LV? Is there some better method? Thanks a lot.  root@vswitch-BlackfordESB2:/home/vswitch# vgdisplay   No volume groups found root@vswitch-BlackfordESB2:/home/vswitch# vgcreate vm /dev/sda1   No physical volume label read from /dev/sda1   Can't open /dev/sda1 exclusively.  Mounted filesystem?   Unable to add physical volume '/dev/sda1' to volume group 'vm'. root@vswitch-BlackfordESB2:/home/vswitch# pvdisplay  root@vswitch-BlackfordESB2:/home/vswitch# df -h Filesystem            Size  Used Avail Use% Mounted on /dev/sda1              60G  4.2G   53G   8% / udev                  3.6G  4.0K  3.6G   1% /dev tmpfs                 1.5G  1.1M  1.5G   1% /run none                  5.0M     0  5.0M   0% /run/lock none                  3.6G     0  3.6G   0% /run/shm


What's the most efficient way to raise the happiness values in my settlement?

My settlement has 5 people right now and my happiness value for the people seem to be dropping ever so often.  I'd like to know what's the most efficient way to raise the happiness values in my settlement? Do I need specific furniture? Or do I just need enough of the other resources (food, power, water) to keep them happy?  Is this kinda like Fallout Shelter, where keeping dwellers happy meant keeping all their resources kept as high as possible? Or is something else affecting their happiness values?


Why does C++ require breaks in switch statements?

When writing switch statements in C++, it seems necessary to include a break after every case. Otherwise, the code will continue to run into the next case.  For example:  int x = 1; switch (x) {     case 0:         std::cout << "x is 0." << std::endl;     case 1:         std::cout << "x is 1." << std::endl;     case 2:         std::cout << "x is 2." << std::endl;     default:         std::cout << "x is neither 0, 1 nor 2." << std::endl; }   Will return:  >> x is 1. >> x is 2.   However:  int x = 1; switch (x) {     case 0:         std::cout << "x is 0." << std::endl;         break;     case 1:         std::cout << "x is 1." << std::endl;         break;     case 2:         std::cout << "x is 2." << std::endl;         break;     default:         std::cout << "x is neither 0, 1 nor 2." << std::endl;         break; }   Will return:  >> x is 1.   My question is: If it is necessary to include the break for every case, then why does C++ require it to be explicitly written at all? Why not just break the switch statement after every case by default in C++? Are there any examples when this behaviour may not in fact be desired?


The last sentence of my last chapter ends on page 118. Just after the last line I used   \clearpage \renewcommand{\bibname}{References} \addcontentsline{toc}{chapter}{References}   to get the ‘References’ on page 119. This was fine. In ‘toc’ also, it shows that the ‘References’ is on page 119. But when I click on ‘References’ in ‘toc’, it ended up on page 118 (I am using 'hyperef' package). How can I get this correctly. I also have a title page in my document (‘book’ class). The numbering starts from first page of ‘toc’ which is just after ‘titlepage’.


How many elements are there in $\mathbb{Z}[i]/I$ where $I= \langle 2+2i \rangle$

Problem  How many elements are there in $\mathbb{Z}[i]/I$ where $I= \langle2+2i\rangle$  $2+2i + I =I$ . So $2+2i$ is equivalent to $0$ . So $2+2i=0$ which implies $i=-1$ which inturn implies $2=0$.  How to move after that?


Why am I unable to upgrade to 20.04 from 18.04?

I'm running Ubuntu 18.04 on a Toshiba Satellite C55-A and trying to upgrade to 20.04. Software Updater first gives a "Failed to download repository information" message but I continue on.  My internet connection is fine.  Then I get a notice that third party sources are disabled.  Then I get 404 errors. I've also tried the upgrade via the terminal and get the same results. Please help. This is an edit. Thanks for the suggestion @Matthew.  This would have done it. It turns out that the mirror I'd been using for years was not able to handle the upgrade.  This old mirror had at one time been the optimal one for me but something changed along the way. Hope this info helps somebody and Thank You to you good folks.


how to reassign single cell value in 2D python array

I'm trying to change the value of one cell in a 2D python array:  [[0, 1, 2], [0, 1, 2], [0, 1, 2]]   which I generated from  m=3*[[0]*3] for y in xrange(0,3):     for x in xrange(0,3):         m[y][x]=x   I want to replace m[0][0] with 5 so that it looks like  [[5, 1, 2], [0, 1, 2], [0, 1, 2]]   but instead it is  [[5, 1, 2], [5, 1, 2], [5, 1, 2]]   when i use   m[0][0]=5   what's going on?


I'm trying to submit form that were created through jquery, but I can't get submit event from this form. Here is my code,   $('#get_test').click(function(){     $.post('ajax-request.php',{            act: 'start_test'     },function(data){          var jstring = $.parseJSON(data);         for(var i = 0 ; i < 5 ; i++){             if (i == 0) {                 $('#test').append('

');                 $('.nav.nav-pills').append('
' + (i + 1) + '
');                 $('#test').append('<form name="quiz_form" id="quiz_form" method="POST">');                 $('#test form').append('

');                 $('.tab-content').append('
'+'
Russian word: ' + jstring[i].russian_word + '

');                 $('#home').append('<input type="text" name="in_word'+i+'" placeholder=" Input translation" />');             } else {                 $('.nav.nav-pills').append('
' + (i + 1) + '
');                 $('.tab-content').append('
'+'
Russian word: ' + jstring[i].russian_word + '

');                 $('#menu' + i).append('<input type="text" name="in_word' + i + '" placeholder=" Input translation" />');                  if (i == 4) {                     $('#test form').append('<input type="button" name="check_button" value="Check" id="check_quiz"/>');                 }             }         }     }); });   $('#quiz_form').submit(function() {     alert('sdsdsdsd'); });


Is there a way to use a windows app in Ubuntu 14.04?  Our company's new Expense Report app does not have a Linux version as before. Our choices are now either windows or mac.


How can I force bind particular process in Windows to use specific network interface and to route all its traffic via this interface?

I need to allow users inside my lan to use BitTorrent clients, but I need to route all BitTorrent (and only BitTorrent) traffic via Bulletproof VPN. In other words, I need to prevent advertising my router's WAN address as a BitTorrent peer address.  Well, I can establish VPN connection on every Windows PC (via Bulletproof VPN) and it seems I can bind every BitTorrent client to the VPN interface using , but how can I instruct Windows to use different gateway for the VPN interface/address? Is there something like PBR in Linux?  Edit: Maybe I'm wrong, but basic routing is the same in Windows and Linux – it is destination-based. All IP packets regardless of source address will be routed to the same gateway. But If I want to send packets to the same destination using different gateways, I need some kind of policy-based routing (in this case – source-based routing)


In (American) movies I have often heard people say     You OK?   You ready?   instead of      Are you OK?   Are you ready?   I doubt this is proper English. Or is it? Is it colloquial only? Is it only American "slang"?


When did Data speed time up really fast?

There was a Star Trek episode where the ship was being attacked with a laser directed at the warp core.  The ship had no defense against the laser and was going to get destroyed.  Data somehow did something to create a time bubble around the ship so inside the bubble time was sped up really fast.  This would give the Enterprise crew time to figure out how to avoid exploding before the the beam outside would come into the bubble.  The episode ended where the crew was old, and they lived out there entire life on the ship with no answer.  And finally the beam came into the bubble of time and the ship exploded.  What episode of The Next Generation am I thinking of?


Email to case (Thread id not generating )

While sending an email using email template, the thread Id is not displaying and I'm just getting body as {!case.Thread_Id} . And also I have checked the Insert thread id in the Subject and body in Email-to-case service. And my apex code looks like below.Thanks in Advance.. public static PageReference sendingEmail(List<Case> listOfNewValues) {     Messaging.SingleEmailMessage sEmail = new Messaging.SingleEmailMessage();     EmailTemplate emailTemplate = [Select Id,Subject,Description,HtmlValue,DeveloperName,Body from EmailTemplate where name = 'Abhishek template'];             //System.debug('email template'+ emailTemplate);     for(Case caseToEmail: listOfNewValues) {                     String[] sendingTo = new String[]{caseToEmail.Contact_Email__c};             sEmail.setToAddresses(sendingTo);         sEmail.setSubject(emailTemplate.Subject);                    //sEmail.plaintextbody= emailTemplate.Body;         sEmail.setHtmlBody(emailTemplate.HtmlValue);         System.debug('Emailtem'+getThreadId(caseToEmail.Id));                     System.debug('Htmlvalue'+emailTemplate.HtmlValue);         sEmail.setTargetObjectId(UserInfo.getUserId());         sEmail.setTemplateId(emailTemplate.Id);         sEmail.setWhatId(caseToEmail.Id);                                 sEmail.setBccSender(false);          sEmail.setSaveAsActivity(false);     }     try {         Messaging.SendEmailResult[] results =Messaging.sendEmail(new Messaging.SingleEmailMessage[] {sEmail});         System.debug('results'+ results[0].success);         if(results[0].success) {             List<EmailMessage> listOfEmails = new List<EmailMessage>();             EmailMessage ee = new EmailMessage();                             for(Case caseValues : listOfNewValues) {                                         listOfEmails.add(new EmailMessage(ParentId=caseValues.Id,EmailTemplateId = emailTemplate.Id,Subject=emailTemplate.Subject,                                                    TextBody=emailTemplate.Body,ToAddress=caseValues.Contact_Email__c, FromAddress=UserInfo.getUserEmail()));                                    }              insert listOfEmails;         }              }     catch(Exception e) {         System.debug('Exception'+ e.getMessage());     }     return null; }


List all extension-only files and folders

I'd like to list all files and folders that only have an extension, like .bashrc, .cache/, and so forth. This seems like it should be straightforward. When I try ls .*, I don't get the expected result:  jacob@jacob-Precision-Tower-3620:/home/jacob$ ls .* .bash_history  .bash_logout  .bashrc  .ICEauthority  .profile  .: Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  ..: jacob  lost+found  .cache: event-sound-cache.tdb.d35b7efbc4794c7998a81437c01c41ec.x86_64-pc-linux-gnu  evolution  fontconfig  gnome-getting-started-docs  gnome-software  gstreamer-1.0  ibus  logrotate  media-art  thumbnails  totem  tracker  update-manager-core  upstart  yelp  .config: dconf  evolution  gnome-session  goa-1.0  gtk-3.0  ibus  libaccounts-glib  nautilus  parcellite  pulse  totem  update-notifier  upstart  user-dirs.dirs  user-dirs.locale  yelp  .gconf:  .gnupg: private-keys-v1.d  S.gpg-agent  .local: share  .nano:  .nv: GLCache```


Hi! , Is it possible for me to install Ubuntu Server 16, 18 or 20 on a Dell Optiplex 980 with an i5 and 16 Gb RAM and will it work?

I have a Dell Optiplex-980 with an Intel-i5 CPU and 16 gb ram, is there any chance that I could install Ubuntu Server 16, 18 or 20 on it? Will it Work?


Alexa ranked dropped by a million since last week

I have a website on that ranks pretty good on Alexa, but last week it dropped by 1 millon in rank!  Questions:   Why the sudden drop? How do I improve my Alexa rank?


network.service Failed to start LSB: Bring up/down networking - Centos 7

I am experiencing an issue on Centos7 when attempting to start the network service. I receive the below error message.  Failed to start LSB: Bring up/down networking   The issue arised when I realised it wasn't taking my static IP address from the /etc/sysconfig/network-scripts/ifcfg-eth0 file (found below).  DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.0.16 NETMASK=255.255.255.0 HWADDR=B8:27:EB:C3:1E:EC NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet   On reboot, the device would load with IP address of 192.168.0.7, clearly not that static IP address assigned, and not sure how it is getting information of a DHCP server (which I do have, my router)  I attempted to disable the NetworkManager, as this might have been causing havoc with the network service by issuing the below command.  systemctl stop NetworkManager   and then enable network  systemctl start network   again the same error came up, I then killed the dhclient process, and attempted to start network service once more and again got the same error.  Losing patience, since I did have connectivity to the internet at the time on the server through the DHCP IP, performed a "yum remove Network Manager" and tried a reboot, again to no avail. I'm not sure if that was a good idea or not, but hey it wasn't working anyway.  I seem to have exhausted suggestions I could find on the internet. Wondering if anybody else has any idea what might be going on.   edit: one more note, this is not a VM or related to Virtualisation in any way. This is simply a RaspberryPI 3  Many thanks.  Edit: Log entries:  Jan 01 00:00:06 <hostname> systemd[1]: Starting LSB: Bring up/down networking...  Jan 01 00:00:06 <hostname> systemd[1]: network.service: control process exited, code=exited status=6  Jan 01 00:00:06 <hostname> systemd[1]: Failed to start LSB: Bring up/down networking  Jan 01 00:00:06 <hostname> systemd[1]: Unit network.service entered failed state  Jan 01 00:00:06 <hostname> systemd[1]: network.service failed


Does a value for $\sqrt{x+\sqrt{x+\sqrt{x+...}}}$ actually exist?

I have seen questions of this type being solved as follows : $\sqrt{x+\sqrt{x+\sqrt{x+...}}}$'s value does not change if we add an $x$ to the expression and square root it. Let the value of this expression be $y$. So $$\sqrt{x+y} = y \implies x+y = y^2 \implies y^2-y-x=0$$ Using the quadratic formula, we obtain the value of $y$ as : $$\dfrac{-(-1)\pm\sqrt{(-1)^2-4(1)(-x)}}{2(1)} = \dfrac{1\pm\sqrt{1+4x}}{2} = \sqrt{x+\sqrt{x+\sqrt{x+...}}}$$ This has been used to solve $\sqrt{6+\sqrt{6+\sqrt{6+...}}}$ in my Mathematics textbook. Now, this method would work perfectly, assuming that a value for $\sqrt{x+\sqrt{x+\sqrt{x+...}}}$ exists. If a value for this expression does not exist, this would be similar to Numberphile's popular $\displaystyle\sum_{n=1}^\infty n = \dfrac{-1}{12}$ which is doubtlessly wrong. So, does a value for $\sqrt{x+\sqrt{x+\sqrt{x+...}}}$ exist? Why/why not? Thanks!


Objective: Check for presence of backup .tgz file containing today's date; output 1 for OK, 0 for no file.  I'm a sucker for one liners :)  For example in PHP (and pretty much similar in Javascript), in various scenarios I like to do something like  <?php echo (date("d")==1)?"Monday":"Not Monday"; ?>   Is there similar syntax in Bash? I know how to check for presence of a regular file using -f FILENAME, I only want the command to print 1 or 0 :)


Does 1,517 shared cM indicate half-siblings?

My husband has a close family match of 1,517cM  across 61 segments and his niece shares 906 cM across 40 segments.   Is there a chance this is a half brother to my husband and half uncle to his niece?  Because of age we have ruled out the other possibilities. Because of high connection with his niece also is why we are considering a half brother situation.   What gets confusing is that this match shares a last name as my husband. Wondering if possible while father was serving in WWII he fathered a child he may or may not have known about and mother listed father on birth certificate giving him same last name.


Convex inequality with the function $f(x)=x\log x$

Let $u(t):=t\log t$. This function is convex on $[0,+\infty)$ and $u(0)=0$. How can I prove that$$u(t+h)-u(t)\geq u(h)\quad\forall t,h\in[0,+\infty)?$$ Since $u(0)=0$ using convexity we know that $u(st)\leq s\,u(t)$, where $s\in[0,1]$ but i get confused with the inequalities.


How to verify in Javascript Object Model if a List Exists

How can I verify if the list I'm trying to retrieve in Javascript really exists?  My code is:  function Search() {  var context = SP.ClientContext.get_current(); this.site = context.get_site(); this.web = context.get_web(); context.load(this.site); context.load(this.web); context.executeQueryAsync(     Function.createDelegate(this, this.onQuerySucceededSearch),     Function.createDelegate(this, this.onQueryFailedSearch) ); }  function onQuerySucceededSearch() { var Cliente = document.getElementById("Ribbon.TabCliente.Ricerca.CercaCliente").value; var Ufficio = document.getElementById("Ribbon.TabCliente.Ricerca.CercaUfficio").value; var Commessa = document.getElementById("Ribbon.TabCliente.Ricerca.CercaCommessa").value;  var listaEsiste = web.get_lists().getByTitle(Cliente);  alert(Cliente + Ufficio + Commessa);  if ((Cliente != undefined) && (listaEsiste != undefined)) {     var doveAndare = "myurl" + Cliente + "/" + Cliente;     if (Ufficio != undefined) {         doveAndare += '?&amp;FilterField10=SvDUfficio&amp;FilterValue10=' + Ufficio;     }     this.location = doveAndare; } else {     var doveAndare = "myurl?"     if (Cliente != undefined) {         doveAndare += "?&amp;Cliente:" + Cliente;     }     if (Ufficio != undefined) {         doveAndare += "Ufficio:" + Ufficio;     }     if (Commessa != undefined) {         doveAndare += "Commessa:" + Commessa;     }     this.location = doveAndare; } }   function onQueryFailedSearch(sender, args) { this.statusID = SP.UI.Status.addStatus("Search:",     "Fallimento: " + args.get_message() + " Close.", true); SP.UI.Status.setStatusPriColor(this.statusID, "red"); }   myList is always != null, even if the list doesn't exist!  Another question... I have the web object, how could I get the url?


If $I+J=R$, where $R$ is a commutative rng, prove that $IJ=I\cap J$.

So I basically have to prove what is on the title.      Given $R$ a commutative rng (a ring that might not contain a $1$), with the property that $I+J=R$, (where $I$ and $J$ are ideals) we have to prove that $IJ=I\cap J$.   One inclusion is easy. If $x\in IJ$, then $x=\sum a_ib_i$ where $a_i\in I$ and $b_i\in J$. Thus for any fixed $i$, we have that since $a_i\in I$, we have that $a_ib_i\in I$, and the same argument shows that $a_ib_i\in J$, thus $\sum a_ib_i\in I$ and $\sum a_ib_i\in J$, this means that $x=\sum a_ib_i\in I\cap J$, and thus $IJ\subset I\cap J$.   I am having troubles proving the other inclusion. Any comments?  Thanks


Possible Duplicate:           I know the title sounds stupid, but this is one question that has left me stumped for quite some time. I hope to get an answer in this forum. If the answer is "I am the fourth son of my father", what should be the question?  In general, how do you ask questions with ordinal numbers?


*Why* are eigenvectors the principal components in Principal Component Analysis?

I am confused as to why eigenvalues are the principal components. What is the intuition behind finding the eigenvectors of the covariance matrix for PCA?


How to find the most common name in passwd file

My /etc/passwd has a list of users in a format that looks like this:   username:password:uid:gid:firstname.lastname, somenumber:/...   Goal : I want to see only the first names and than sort them having the most common name appear first, 2nd most common appear 2nd etc....  I saw some  as to how to do the 2nd part, although they are relevant to working with a text file and not to reading from a map.  In regards to the first part, I really don't know how to approach this. I know that there are some solutions but don't really know how to do them.


Prove $1 + \cos 2C - \cos 2A - \cos 2B = 4\sin A\sin B\cos C$ for $A$, $B$, $C$ the angles of a triangle

Given that $A$,$B$ and $C$ are angles of a triangle, show that $$1 + \cos 2C - \cos 2A - \cos 2B = 4\sin A\sin B\cos C$$


How to reply a question like this: "We are not doing this, correct?"

My first reply to my boss for this question was " Yes, you are correct. We are not doing this" .  Can I also reply this way, "No, we are not doing this." ?   Are these two replies both correct? If so, which one feels more like a native speaker?


How could I create a sand dune animation?

I've been working on creating a whole bunch of nature animations and one that I've been trying to create is the "windy desert". Is there any way that I could simulate this in blender.  To be more clear, what I'm trying to create is something like the very start of this film on a sand dune   I don't care about my render times, I have plenty, I just want to know your ideas on how I could go about doing this.  Thanks :D  More Ref:


Why is pruning not needed for random forest trees?

Breiman says that the trees are grown with out pruning. Why? I mean to say that there must be a solid reason why the trees in random forest are not pruned. On the other hand it is considered very important to prune a single decision tree to avoid over fitting. Is there some literature available to read for this reason? Of course the trees may not be correlated but there still will be a possibility of over fitting.


What are our options when no appointments are available at Schengen visa center?

I am trying to get a Schengen visa for my trip to Italy in September at the Italian Consulate in Miami. Unfortunately, there are no appointments for next three months!   Is there any hope at all of getting a visa in this time frame? I still have nearly 7 weeks before my trip, but we are already talking about cancellations etc., because of no visa appointments. Any strategies that would work?  There is a waiting list for the Italian Consulate Miami, but I am not sure how reliable it is going to be.


First of all im sorry if this thread is duplicated with another one, but i didnt find a solution for the problem.  So i bought new laptop (Lenovo Y520) and setup dual boot Win10 with Ubuntu 16.04 and wireless doesnt work for the ubuntu (LAN works).  ifconfig  enp4s0    Link encap:Ethernet  HWaddr c8:5b:76:da:32:ba         inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0       inet6 addr: fe80::62bc:4b27:ec0f:1d9c/64 Scope:Link       UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1       RX packets:18584 errors:0 dropped:0 overruns:0 frame:0       TX packets:12706 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:1000        RX bytes:20071392 (20.0 MB)  TX bytes:1500456 (1.5 MB)  lo        Link encap:Local Loopback         inet addr:127.0.0.1  Mask:255.0.0.0       inet6 addr: ::1/128 Scope:Host       UP LOOPBACK RUNNING  MTU:65536  Metric:1       RX packets:1849 errors:0 dropped:0 overruns:0 frame:0       TX packets:1849 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:1        RX bytes:200236 (200.2 KB)  TX bytes:200236 (200.2 KB)   .  iwconfig  wlp3s0    IEEE 802.11  ESSID:off/any         Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm          Retry short limit:7   RTS thr:off   Fragment thr:off       Power Management:on  enp4s0    no wireless extensions.  lo        no wireless extensions.   I ran some commands which found in another threads.  sudo lshw -class network   *-network                   description: Wireless interface    product: Intel Corporation    vendor: Intel Corporation    physical id: 0    bus info: pci@0000:03:00.0    logical name: wlp3s0    version: 78    serial: 00:28:f8:69:15:13    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=iwlwifi driverversion=4.8.14-040814-generic firmware=22.361476.0 latency=0 link=no multicast=yes wireless=IEEE 802.11    resources: irq:332 memory:a4200000-a4201fff *-network    description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:04:00.0    logical name: enp4s0    version: 10    serial: c8:5b:76:da:32:ba    size: 100Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168g-3_0.0.1 04/23/13 ip=192.168.0.102 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s    resources: irq:322 ioport:4000(size=256) memory:a4104000-a4104fff memory:a4100000-a4103fff   .  rfkill list  0: ideapad_wlan: Wireless LAN Soft blocked: no Hard blocked: yes 1: ideapad_bluetooth: Bluetooth Soft blocked: yes Hard blocked: yes 2: hci0: Bluetooth Soft blocked: yes Hard blocked: no 3: phy0: Wireless LAN Soft blocked: no Hard blocked: no   .  lspci -nnk | grep 0280 -A2  03:00.0 Network controller [0280]: Intel Corporation Device [8086:24fd] (rev 78) Subsystem: Intel Corporation Device [8086:1010] Kernel driver in use: iwlwifi   Things that i've tested and didnt worked.  * sudo rfkill unblock wifi * Additional Drivers -> Not showing wifi driver * restart network-manager service * http://askubuntu.com/a/859263


Difference between $\mathbb C$ and $\mathbb R^2$

What are the basic differences between $\mathbb C$ and $\mathbb R^2$?  The points in these two sets are written as ordered pairs, I mean the structure looks similar to me. So what is the reason to denote these two sets differently?


How I draw graphics of dominoes falling?

How I draw graphics of dominoes falling, without moviment, static draw?


16.04 Ubuntu Software starts partially, closes after a couple of seconds

Ever since 16.04 there has been nothing but issues with the new software center. First, it couldn't install anything of its life dependent on it requiring a separate package installer to be used.  Now,  suddenly, out of the blue, ubuntu-software will not open; it loads somewhat, then force closes within a few seconds after opening. I wish these things would all be working properly before releasing a LTS. It's a little embarrassing, really. Never had these issues with 14.04.   Anyway, here's what the terminal spits out when launching from there. Help?   shantelle@G505:~$ ubuntu-software  (ubuntu-software:15531): Gs-WARNING **: Failed to create permission org.freedesktop.packagekit.trigger-offline-update: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered  (ubuntu-software:15531): Gs-WARNING **: Failed to create permission org.freedesktop.packagekit.trigger-offline-update: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered  (ubuntu-software:15531): Gs-WARNING **: Failed to create permission org.freedesktop.packagekit.trigger-offline-update: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered  (ubuntu-software:15531): Gs-WARNING **: Failed to create permission org.freedesktop.packagekit.trigger-offline-update: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered  (ubuntu-software:15531): Gs-WARNING **: Failed to create permission org.freedesktop.packagekit.trigger-offline-update: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered  (ubuntu-software:15531): GLib-CRITICAL **: g_dir_read_name: assertion 'dir != NULL' failed  (ubuntu-software:15531): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed  (ubuntu-software:15531): Gdk-CRITICAL **: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed  (ubuntu-software:15531): Gtk-WARNING **: Error loading image 'file:///usr/share/gnome-software/featured-transmission.png': Error opening file: Too many open files  (ubuntu-software:15531): GLib-ERROR **: Creating pipes for GWakeup: Too many open files  Trace/breakpoint trap (core dumped)


How to change cell color based on today's date in Excel 2010

How do I Change cell color in Excel 2010 for upcoming or past dates based on 90 days from today. I would be great if I could use 2 color scale but one color will be fine.


If $E$ has measure zero and $f$ is $C^1$, then $f(E)$ also has measure zero

I was reading a proof that submanifolds $M^d \subset \mathbb R^n$ with $d<n$ has measure zero. In the proof they use the fact: Let $f:U\longrightarrow\mathbb{R}^n$ $\mathcal{C}^1$ where $U$ is an open susbet of $\mathbb{R}^n$, then if $E$ is a borelian of null measure, then $f(E)$ is of null measure too. If I have this result, I know how to conclude. Can you help me showing this lemma? Thank you! Let $B$ be a closed ball of $U$ and $E$ a borelian of null measure, then since $f$ is $\mathcal{C}^1$, there exists a $K>0$, such that $f$ is $K$-lipschitz continuous (by compacity of $B$ and by mean value inequality). We conclude that the image by $f$ of a cube $C$ of measure $\delta>0$ is a set of measure at most $K^n\delta$. For all $\varepsilon>0$, we can cover $E\cap B$ by an union of cube $C$ such that $\lambda_n(C)\leq\varepsilon$. I don't understand this one since we don't think we have compacity of $E\cap B$... I just understood that we can obtain a $f(C)$ arbitrarily small if we take a cube $C$ arbitrarily small.


How can I finish off a three gang switch with one switch missing?

I removed one switch from a three gang switchbox. I simply don't need it. All the wires to that switch have been trimmed and taped off and the same at the opposite end of those wires.   Now, what can I do to finish off the outside of that switch? The simple solution would be to plaster over the vacant third of the box and put a double gang cover on the outside. Am I breaking any codes if I do that? If so what's a decent alternative?  This is in Canada.


Running Kubuntu 18.04.  I created a bootable USB using KDE Partition Manager and a Ubuntu Gnome ISO file.   It contains boot, casper, etc. folders.  But when I reboot with this USB drive attached, it is not shown as a boot option.   How do I boot using this drive?


I want to attempt to use Support Vector Machines (SVMs) on my dataset. Before I attempt the problem though, I was warned that SVMs dont perform well on extremely unbalanced data. In my case, I can have as much as 95-98% 0's and 2-5% 1's.   I tried to find resources which talked about using SVMs on sparse/unbalanced data, but all I could find was 'sparseSVMs' (which use a small amount of support vectors).  I was hoping someone could briefly explain:   How well SVM would be expected to do with such a dataset   Which, if any, modifications must be done to the SVM algorithm What resources/papers discuss this


I want to use unicode character 2259 "estimates" in my document, but cannot find it in the symbols-a4 list or via .  It looks exactly like this: ≙  The closest I get is \triangleq: ≜, but it has a different meaning.


Rotate table with caption on the same page

I want to rotate a table because it is too wide. I'm forced to use \documentclass[11pt,a4paper]{article}, so changing that is not a solution.  Many packages rotate the whole page, but I just wan't to rotate the table.  I have a design sample of a table, that I must use. In my tex code that is my first table.   The second snippet is how I can rotate a table. Yet I'm missing a required caption on the table.   The third snippet is what I actually want, but I'm getting a LaTeX Error: Not in outer par mode . I found a similar question  but the answer provided a solution with sidewaystable and that is just plain ugly in my case, because then the rotated table occupies a whole page on its own.  \documentclass[11pt,a4paper]{article} \usepackage[graphicx]{realboxes} \usepackage{verbatim} \begin{document} \begin{table}[htb] \begin{center} \begin{tabular}{|l|c|c|c|c|c||c|c|c|c|c||c|c|c|c|c|} \hline \bf Some text & \rotatebox{90}{column 1  } &  \rotatebox{90}{column 2} & \rotatebox{90}{column 3  } & \rotatebox{90}{column 4 } & \rotatebox{90}{column 5 }  & \rotatebox{90}{column 6  } &  \rotatebox{90}{column 7} & \rotatebox{90}{column 8 } & \rotatebox{90}{column 9 } & \rotatebox{90}{column 10 } & \rotatebox{90}{column 11 } &  \rotatebox{90}{column 12} & \rotatebox{90}{column 13 } & \rotatebox{90}{column 14  } & \rotatebox{90}{column 15 }\\ \hline \hline first row lorem ipsum & 692 & 535 & 85 & 48 & 24 & 692 & 535 & 85 & 48 & 24 & 2 & 3 & 3 & 4 & 5 \\ \hline \end{tabular} \end{center}  \caption{My caption lorem ipsum}\label{tab_aaa} \end{table}   %rotated \rotatebox{90}{ \begin{tabular}{|l|c|c|c|c|c||c|c|c|c|c||c|c|c|c|c|} \hline \bf Some text & \rotatebox{90}{column 1  } &  \rotatebox{90}{column 2} & \rotatebox{90}{column 3  } & \rotatebox{90}{column 4 } & \rotatebox{90}{column 5 }  & \rotatebox{90}{column 6  } &  \rotatebox{90}{column 7} & \rotatebox{90}{column 8 } & \rotatebox{90}{column 9 } & \rotatebox{90}{column 10 } & \rotatebox{90}{column 11 } &  \rotatebox{90}{column 12} & \rotatebox{90}{column 13 } & \rotatebox{90}{column 14  } & \rotatebox{90}{column 15 }\\ \hline \hline first row lorem ipsum & 692 & 535 & 85 & 48 & 24 & 692 & 535 & 85 & 48 & 24 & 2 & 3 & 3 & 4 & 5 \\ \hline \end{tabular} }  \begin{comment} %% what i want \rotatebox{90}{ \begin{table}[htb] \begin{center} \begin{tabular}{|l|c|c|c|c|c||c|c|c|c|c||c|c|c|c|c|} \hline \bf Some text & \rotatebox{90}{column 1  } &  \rotatebox{90}{column 2} & \rotatebox{90}{column 3  } & \rotatebox{90}{column 4 } & \rotatebox{90}{column 5 }  & \rotatebox{90}{column 6  } &  \rotatebox{90}{column 7} & \rotatebox{90}{column 8 } & \rotatebox{90}{column 9 } & \rotatebox{90}{column 10 } & \rotatebox{90}{column 11 } &  \rotatebox{90}{column 12} & \rotatebox{90}{column 13 } & \rotatebox{90}{column 14  } & \rotatebox{90}{column 15 }\\ \hline \hline first row lorem ipsum & 692 & 535 & 85 & 48 & 24 & 692 & 535 & 85 & 48 & 24 & 2 & 3 & 3 & 4 & 5 \\ \hline \end{tabular} \end{center}  \caption{My caption lorem ipsum}\label{tab_b} \end{table} } \end{comment} \end{document}   How can I add a caption to the second snippet?


I am under the impression that in western culture, it is quite common to conceive the Self as an illusion — probably as an import from eastern religions, and in particular from Buddhism, and in connection with the widespread practice of meditation.  That is, to see the Self as a collection of psychological dispositions, and so on, and in particular to conceive of reality as a continuum where nothing starts and nothing ends, and nothing exists separated — I think that in Buddhism it is called dependent arising.  People often speak about having had a spiritual experience in which they realized that everything is One and all distinctions are an illusion.  It seems to me that people are disposed to accept that without much issue.  But I also have the opposite impression about Free Will — that people have a lot more trouble letting go of that concept and of conceiving it as an illusion.  What is that which has Free Will, if the Self is an illusion?  What is that which merits praise or blame, or bears moral responsibility, if all arises dependently?  How can we let go of one (the Self) and not the other (Free Will)?  Have any philosophers discussed this last question?    Note — Naturally these questions dissolve within the framework of compatibilist Free Will, and therefore, to clarify, I am concerned with how this problem is dealt with within a layperson or libertarian view of Free Will.    Note #2 — I realize this is not a purely philosophical question. One might say that it is a scientific question. I'd say it is both. That a question cannot be solved a priori from one's couch does not mean that it is not philosophical. See for example Dennett's Consciousness Explained which is a 500 pages long scientifically informed influential philosophy book.


Let $(X,\|\cdot\|_{1})$ and $(X,\|\cdot\|_{2})$ be complete normed vector spaces and $\|x\|_{1}\le\|x\|_{2}$ $\forall x\in X$. I want to prove that $\exists M>0$ such that $\|x\|_{2}\le M\|x\|_{1}$.  We know that any Cauchy sequence $(x_{n})_{n\in\mathbb{N}}\subset X$ converges. And of course, $\frac{1}{M}\|x\|_{1}\le\|x\|_{1}\le M\|x\|_{1}$.  Does anyone have any hints on how I can proceed? I assume that I have to use this completeness property somehow.


QGIS How to label individual sides of polygon

Using native QGIS layer property definitions, I have successfully labelled each polygon in my layer with its area and perimeter.  Never satisfied, I now wish to label each side of each polygon with its length.  It would seem to be a common-enough requirement but I'm not getting good hits.


if (strstr($_SERVER['REQUEST_URI'],'index.php')) {     header('HTTP/1.0 404 Not Found'); }   Why wont this work? I get a blank page.


I was working on an analysis problem when this question arose in one my proofs. I think it may be either $-1$ or $1$, but it seems like there can only be an arbitrary way to assign this.  So is there an agreed upon method for determining $(-1)^x$ for irrational values of $x$?


So, I want to replace my graphics card. The graphics card I have is an Intel 3000, and the minimum requirement for the software I want to run is an Intel 4000. Is that possible on a laptop? Also, if this helps, I have an Intel Core i5 processor and 4GB of RAM. One more thing; I have an HP Elitebook 8460p, which is a business laptop.


Can I support Stack Exchange sites propely by only asking right questions?

Stack Exchange sites are about asking and answering. However,  I can't help by answering because most of the questions are about something I'm not good at. I mean, everywhere.  Though, I can help by asking questions which weren't asked before, related to the theme of the site where it's asked and either might be useful for someone in the future or provides useful and constructive answers.  Is it enough?


Descriptive word for someone who is ignorant

I'd really appreciate if someone could help me find a word to describe the following:  Someone who thinks they are versed in some subject but really only has a superficial grasp of it.  Thanks!


Do I need a transit visa to collect my luggage and check -in my next flight at Frankfurt International Airport?

I am from Oman, travelling from Vancouver, Canada, to Frankfurt. My final destination is Casablanca, Morocco. I have booked a separate ticket for the final destination. I need to collect my luggage in Frankfurt and check-in my next flight. Flight is after 9 hours from arrival in Frankfurt. I have a valid visa for Canada and my Schengen visa expired in April 2019.


How to define a timeout for unsused session on sshd?

I am using sshd on Ubuntu 16.4 LTE and I am trying to configure my sshd so that when a user is connected fo too much time not doing anything he'll get disconnect by the ssh server.


The limit of the logarithm is equal to the logarithm of the limit

my exercise is to proof the following: if $(x_n)_{n\in\mathbb N}$ is a positive sequence, and if $$\lim_{n\rightarrow+\infty} x_n =x,\,\, \mbox {where } x>0$$ then $$\lim_{n\rightarrow+\infty} \log x_n=\log x$$ I have no idea how that works and I would be happy if someone could help me.  EDIT: I am not allowed to use the information that the logarithm is a countinous function.


I've found lots of resources that say this is a real number if it's not rational, but what is a real number, really?  I mean what is the definition of a real number?  If nothing else, anyone know of a resource where I could find out myself?  Thanks!


I'm getting a java.lang.NullPointerException, Someone show me the way to resolve it

Exception in thread "main" java.lang.NullPointerException at Course.dropStudent(Course.java:95) at CourseTester.main(CourseTester.java:59)   I'm writing a Course class that works with a Student class(that i'm not allowed to modify) and have been provided a CourseTester class to ensure everything works properly. I've been making my way through it but i noticed that i'm now getting that error. It's happening when i try to compare a Student id from the CourseTester class to the student id's already in the array. The entire program is over 300 lines so i'll just try to copy in the parts where the problem is.   Fist part is from the Course class that i am writing  public boolean dropStudent(Student student) {      boolean dropped = false;      int targetIndex = 0;      Student[] newRoster = new Student[roster.length];       for (int count = 0; count < roster.length; count++) {          if (roster[count].getID() == (student.getID())) {//line95              targetIndex = count;              dropped = true;              }           }   Second part is  from the CourseTester that was provided.  // drop student not on roster or waitlist     studentToDrop = studentsInSchool[14]; // WW     dropped = course.dropStudent(studentToDrop);//line 59     System.out.println("For " + studentToDrop.getName() + ", drop method should return false (student      is not enrolled): \t" + dropped);        System.out.println("\nCourse should still contain AA, DD, EE, FF, and GG on the course roster (in      any order) and HH, JJ, KK, and MM on the waitlist (in that exact order).");     System.out.println("\n" + course + "\n");   Note, I have to use Arrays. The goal here is to find remove a student from the roster(drop from course). I need to do this by searching for his student ID number.


Can I transfer photos that are not in my iPhone's camera roll to my computer?

My iPhone was linked to my main computer and it has all my photos stored on it, but not in the camera roll. Since my husband blew the main computer up, my precious photos appear to be in limbo. It does not appear that I can import them anywhere. I could email all them one by one but that seems a little low tech. iTunes tells me that if I upgrade iOS I will lose my photos that are not in the camera roll. Also, the same would seem to be true if I deauthorize my main (now usless) PC. Any help would be greatly appreciated.


Simply, can I pass std::vector as a template argument. Following example list usage  tempate<typename container_t, typename value_t> struct container_types {   typedef container_t<value_t> value_container_t;   typedef container_t<pair<value_t> pair_container_t;  };   I wish to pass container_types to generate final two data types.  If this is not feasible, then how can I achieve the same.


Profile page says question viewed 2K times but it was actually 1501

displays 2K views for , but when I opened the question itself to check out how many views it has gotten I discovered it had only 1501 views.  What's up with that?


How to enable custom Shortcodes in Post Category Description?

I created a custom shortcode from my child theme's functions.php, And I want that shortcode to display in Post Category Description. But it's not working.   Do you guys have an idea on how to enable display of shortcodes in post category description?    Just correct me if I'm wrong.  Thanks!


Trigger click function of dynamic button

I programmed a jquery function which creates dynamically a button with an id ("#btn_sendStudentAnswer"):  $("#btn_getAnswers").one("click",function(){    $.ajax({type :"POST",           url: "DBCOMANSWERS.php",           dataType:"json",           data:{input:$("#input").val()},           success: function(result){ //Performs an async AJAX request               if(result){                   result.forEach(function(i,v){                       $("#output").append("
<input type='checkbox' id='" + i[1]+ "'>" + i[0] + "</input>"); //create checkboxes representative for the 3 answers                   })                   $("#output").append("
<button id='btn_sendStudentAnswer'>" + "Prüfen" + "</button>"); //create button to check if students answer is correct.               }           }   }); });   So far thats working fine. What I want is, to do some action when the created button(#btn_sendStudentAnswer) gets clicked. I programmed the click-event as followed:  $("#btn_sendStudentAnswer").click(function(){       debugger;      $.ajax({type:"POST",              url: "DBCOMCHECKANSWERS.php",              dataType:"json",              success: function(result){               //if answer were right/wrong mark them               }      }); });   But it never reaches the debugger;. The "Web-Developer-Tool" of Chrome doesn't show any error or something unusual. Is there a programming mistake I made or is another way of reacting on clicking on a dynamically created button needed?


find the sum if the following series converges:  $$1 + \frac{1}{3} - \frac{1}{2} + \frac{1}{5} + \frac{1}{7} - \frac{1}{4} + ...$$  my attempt:  The series can be grouped into difference of a series of odd terms and a series of even terms.. but how to find sum?


If URL contain "#", How do I get the full url of the page in C#?

I need to be able to get at the full URL of the page The page url is like this  http://localhost:12365/Dashboard.aspx#access_token=adfgafdg73e9c4ggg186fbfcf05e775a6f2gggd8&expires_in=3600&token_type=Bearer&state=zxv   In this URL, after # how to get the access_token value?


Is there a c++ equivalent of Java's  try {     ... } catch (Throwable t) {     ... }   I am trying to debug Java/jni code that calls native windows functions and the virtual machine keeps crashing.  The native code appears fine in unit testing and only seems to crash when called through jni.  A generic exception catching mechanism would prove extremely useful.


Access localstorage from an external script

I'm building an application which allows the users to embed widgets. These widgets can be any type of html/css code, for example a YouTube iframe, a Twitter embed timeline or pretty much anything else. I store user's login details in the Localstorage as a bearer token. I want to understand if a user could host a script which access the token and sends it somewhere. From what I understood if the scripts are loaded from an external domain they won't be able to access the localstorage, right? However if the user puts in the embed code something like this: <script> const str = window.localStorage.getItem('whatever')  </script>  They will be able to get it because it runs on my domain. Is there a way to disable localstorage for embed scripts? How everyone else does it? Thanks


Seemingly simple system of equations $x^{2} + y = 31$ and $x + y^{2} = 41$

I have the following system:  $x^{2} + y = 31$  $x + y^{2} = 41$  As I try to solve it via simple substitution, I get into 4-th power equations, which I can simplify to $(x-5)(x^{3}+5x^{2}-37x-184)$ (and I am not sure how to get the cubic here). Is there a simpler way to solve this? There are 4 pairs of answers, I have got one (5 and 6).


I want to prove the following statement:   If the unit sphere in a normed space contains a segment, then there exists two vectors $x,y$ such that $\Vert x + y \Vert = \Vert x \Vert + \Vert y \Vert$ with $x$ and $y$ linearly independent.   This is what I have done: Let $x$ and $y$ be the end point of the segment contained in the unit sphere. Then $\forall \lambda \in (0,1)$ I can write:   $$ \Vert \lambda x + (1-\lambda)y \Vert \leq 1 $$  From here I am struggling on getting the relationship on $x+y$. Any pointers?


I've seen the other posts and here and elsewhere, I've checked the youtubes, and every answer seems to be for the last gen consoles. But how do I remove the Armor Vest from my character in GTA 5 for the PS4?   I know it's only cosmetic but it's bothering me.  On the PS4 there is no "options" button, I don't see the "inventory", and the menu is different than before.   And is there a way to alter your appearance once you're in game after you've transferred the character from the old system?  Anyone?


Error of Undefined control sequence. \end{frame} appears

I am using coding below for slides, but an error of Undefined control sequence. \end{frame} appears and also \smashoperator[r] not works properly in slides, Need kind suggestions for this issue. \begin{frame}     \begin{propa}\label{proposition1}         Let $p(\cdot)\in \mathcal{P}(\mathbb{R}^{n}), q\in(0,\infty]$ and $\lambda\in(0,\infty]$. If $\alpha(\cdot)\in L^{\infty}(\mathbb{R}^{n})\cap \mathcal{P}^{log}_{0}(\mathbb{R}^{n})\cap \mathcal{P}^{log}_{\infty}(\mathbb{R}^{n})$. then         \begin{align*}         \norm{f}_{M\dot{K}^{\alpha(\cdot),q(\cdot)}_{p(\cdot),\lambda} (\mathbb{R}^n)} \approx \max          \biggl\{          &\sup_{\smash[b]{\substack{L\leqslant0,\\ L\in\mathbb{Z}}}}          2^{-L\lambda} \biggl(\,\smashoperator[r]{\sum_{k=-\infty}^{L}}         \,\norm{2^{k\alpha(0)}f\chi_{k}}^{q(0)}_{L^{p(\cdot)}} \biggr)^{\!\!1/q(0)},\\         &\sup_{\smash[b]{\substack{L>0,\\ L\in\mathbb{Z}}}}          \biggl[          2^{-L\lambda} \biggl(\,\smashoperator[r]{\sum_{k=-\infty}^{-1}}         \,\norm{2^{k\alpha(0)}f\chi_{k}}^{q(0)}_{L^{p(\cdot)}} \biggr)^{\!\!1/q(0)}\\         &\qquad +         2^{-L\lambda} \biggl(\sum_{k=0}^{L}         \,\norm{2^{k\alpha(\infty)}f\chi_{k}}^{q(\infty)}_{L^{p(\cdot)}} \biggr)^{\!\!1/q(\infty)}\,         \biggr]          \biggr\}.         \end{align*}     \end{propa} \end{frame}


Shorthand code for multiple "or" statements inside the if statement?

Is there a way to shorten the following  if (a === b || a === c || a === d)   down to something like  if (a === b || c || d)   The issue with the last section is it will test if a === b, or if c is true, or if d is true.


Do I need to sterilize my top-off water?

I just purchased my first kit and am about to brew it (tonight!).  The instructions provided indicate that after cooling the wort and tranfering it to the sanitized carboy I need to top it off with cold water.  It seems like this is just asking to introduce non-desirable organism to the beer. (or not quite yet, beer).  My questions:  1)  Should I boil the top-off water and cool it, before adding? 2)  If not, why?


Is there any way to set +x bit on script while creating?  For example I run:  vim -some_option_to_make_file_executable script.sh   and after saving I can run file without any additional movings.  ps. I can run chmod from vim or even from console itself, but this is a little annoying, cause vim suggests to reload file. Also it's annoying to type chmod command every time. pps. It would be great to make it depending on file extension (I don't need executable .txt :-) )


I have just started studying MRI physics and was reading F.Bloch’s paper on Nuclear Induction.  In page 463, it is mentioned,  To obtain this variation does not require the solution of the Schroedinger equation. It is enough to remember the general fact that the quantum-mechanical expectation value of any quantity follows in its time dependence exactly the classical equations of motion and that the magnetic and angular momenta of each nucleus are parallel to each other.   The parallelity between the magnetic moment $\mu$ and the angular momentum a for each nucleus implies $\mu = \gamma a$  Are the magnetic and angular momenta of the proton always parallel to each other? Why is this so?


Whenever I switch on Ubuntu I always see the following message.  (Initramfs): /dev/sda1 contains a file system with errors, check forced.   Inodes that were a part of a corrupted orphan linked lost found.   /dev/sda1 : UNEXPECTED INCONSISTENCY; RUN fsck manually.(I.e .,   without -a or -p options). fsck exited with status code 4. The root   filesystem on /dev/sda1 requires a manual fsck


Why does the first forward pass in a neural-network (NN) classification model computes to zero for all classes before final activation?

Suppose weights of NN are Gaussian spread initialization then forward pass for all the inputs will evaluate to zero which computes to 0.69 ($-\log_{e}0.5 \approx 0.69 $, since sigmoid (0) = 0.5) average loss at least in the first pass. For three classes it would be $1.0986$ ($-\log_{e}\frac{1}{3}$) and so on.   I understand when weights are zero-initialized, but why does this happen when weights are Normally distributed to start with?


Assign symbology to multiple layers in one operation?

Is it possible to assign the same symbol to multiple layers of the same geometry type within an ArcMap document in one operation?    For example, I was hoping to:   Select multiple layers in the TOC Click on the symbol "patch" or right-click an get to the "Symbol Selector". Apply the same symbol to all selected layers.   Obviously that doesn't work, or I wouldn't be asking.  I found an old 2003 posting that talks about .  Can this type of operation be done from the GUI in 10.x, or am I just out of luck?


Can each IPv6 address have its own gateway?

I have /64 subnet ipv6 addresses. My intent is to use them as different outgoing ip addresses for cURL.  When I add following line to "/etc/network/interfaces" it works like a charm but when the file increases like eth0:65000 the server breaks down and I can not connect it anymore from ssh.   auto eth0:1 iface eth0:1 inet6 static  address 2001:db8:5555:6666:0000:0000:0000:0000  netmask 64  gateway 2001:db8:5555:6666:0000:0000:0000:0000  autoconf 0  dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888 8.8.8.8  post-up ip -6 addr add 2001:db8:5555:6666:0000:0000:0000:0000/64 dev    Is there a way to use each of the ipv6 address as an outgoing ip address?  if it helps sysctl.conf file content   net.ipv6.conf.all.autoconf = 0 net.ipv6.conf.default.autoconf = 0 net.ipv6.conf.eth0.autoconf = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.eth0.accept_ra = 0 net.core.somaxconn = 4096   Thanks.


Are there any models that can handle out of sample features?

So I'm facing a regression problem where I have a categorical features (factor) where the levels are very commonly different between the training set and the test set.  I have multiple measurements per subject, where the context where the measurement was made changes constantly and is represented by the current_context variable. I would like to measure how the context affects the measurement on a per subject basis, and try to predict new values for the response, given the context and other, fixed, predictors.  Example:  Training:  subject_id current_context response 1 C15 55 1 D46 44 1 A416 99 ... 10^6 G426 44 10^6 G426 44  Test: subject_id current_context response 1 C15 65 1 D55 55 1 E416 101 ... 10^6 G426 44 10^6 E417 65   One solution for this would be that I could create different models (kind of like  in NLP) and fall back to simpler models until all the features are available. In the example I would have one model trained on all the features, and two more trained only on one feature at a time. But that's an engineering overhead I would like to avoid.  Another solution as suggested is to use hierarchical modeling. This is probably impossible in my case, as I would like to have the subject_id as a random effect, which could be in the millions and that doesn't scale AFAIK. Another problem I've noticed when trying that is that because the current_context can also have hundreds of thousands of values, it leads to computational issues as well (I get the error that linpack cannot create a matrix of adequate size)  So I was wondering if there are (regression) models that have this kind of robustness built in, i.e. are able to produce estimates for the dependent even if some of the features used during training are missing, or if new levels appear in factor.


While learning 3-Phase scalar control of ACIM using STM32F407 MCU I could not clearly understand the diffrence between the following terms: 1. SPWM 2. 6-step PWM 3. SVMPWM  How do they differ from each other? Do we get the same 3-phase sinusoidals from each of the above PWMs and they are 3 different ways to implement it OR Do they differ in the output that we get from them also? Someone told me that SPWM is used to generate Phase-voltages while the other 2 techniques are used to generate Line-voltages. Is this the only difference between them?


I am simply trying to use my DVI monitor with my laptop that only accepts VGA. I've been doing some research for an adapter from DVI female to VGA male and it seems that not only do I need an adapter, but I also need a converter, which costs around 100 dollars.  Is there another alternative? I have an LG monitor that uses DVI-D and currently has a DVI cable attached. Is it possible for me to find and use a cable that is DVI to VGA that would work with my laptop?  I have also read somewhere that sometimes the video card does the converting so people only need the adapters. I am currently using an NVIDIA Geforce GT 540M, so would just purchasing the adapter and not a converter be okay for my purpose?


Bag A contains 3 white and 2 red balls. Bag B contains 6 white and 3 red balls. One of the two bags will be chosen at random, and then two balls will be drawn from that bag at random without replacement. What is the probability that the two balls drawn will the be the same color? Express your answer as a common fraction.


Below I had tried to come up with a method to find the path to figure out the shortest path but every time I run the program I get a nullpointer exception at the findshortestPath1 at the int cols = myArray[rows].length I don't know how to solve this problem.  If you have other methods I can try to solve this, tha twill be greatly appreciated.  *******UPDATE******* Okay I updated that code with your suggestions, but I was still getting problems at   minCosts[0] = myArray[row][col]   and  findShortestPath(myArray, minCosts, row, col);   Code:  import java.util.Random;   public class Triangle{   public static void createTriangle(int numRows){       int rows=numRows;      int max =9, min =2;      int[][] myArray = new int[rows][];      Random random = new Random();  for (int i = 0; i < rows; i++) {  myArray[i]= new int[i+1];   //Below is used for organizing the triangle System.out.println(""); for(int p=rows-i; p>0;p--) System.out.print(" ");  for (int j = 0; j <=i; j++) {  //below puts the spacing between each column in the triangle System.out.print(" ");    myArray[i][j] = random.nextInt(max - min + 1) + min;  System.out.print(myArray[i][j]);     System.out.print(" ("+i+", "+j+") ");  }  }  }  public static int findShortestPath1(int numRows) {        int rows= numRows;      int[][] myArray = new int[rows][];       int numNodes = sumToN(rows);      int[] minCosts = new int[numNodes];       for(int row = 0; row<rows; row++) {          int cols = new int[rows].length;       for(int col = 0; col< cols; col++) {          findShortestPath(myArray, minCosts, row, col);      }      }       int row = rows;  int cols = new int[rows].length;  int min1 = -1;   for(int col = 0; col<cols; col++) {   int cost = minCosts[indexFromRowCol(rows,col)];    if(cost < min1 || min1 ==-1) {       min1 = cost;   }   }    return Math.max(0, min1);   }      private static int findShortestPath(int[][] myArray, int[] minCosts, int        row, int col) { if (row == 0) {     minCosts[0] = myArray[row][col];     return minCosts[0]; }  int minValue = -1;  if (col - 1 >= 0) {     minValue = minCosts[indexFromRowCol(row - 1, col - 1)]; }  if (col < myArray[row - 1].length) {     int cost = minCosts[indexFromRowCol(row - 1, col)];      if (minValue == -1) {         minValue = cost;     }      minValue = Math.min(minValue, cost); }  int minCost = myArray[row][col] + minValue; minCosts[indexFromRowCol(row, col)] = minCost;  return minCost; }  private static int sumToN(int n) { if (n < 0) {     return 0; } return n * (n + 1) / 2; }  private static int indexFromRowCol(int row, int col) { return sumToN(row) + col;    }    }


"Beamer-style" title page with logo, title, etc

I've put together a thesis title page but I want to turn it into a template à la Beamer. That is: I want to define variables for the title, author, supervisor, university logo and name and jury members--this last one optional!  Here's my MWE:  \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{fontenc} \usepackage{graphicx} \usepackage[osf]{mathpazo} \usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=1.8cm]{geometry} \begin{document} \begin{titlepage} \begin{center} \vfill { \includegraphics[scale=0.5]{logo.png}\par \fontsize{29}{25}\selectfont \textbf{The Poison Ivy University} \par     {         \fontsize{15}{13}\selectfont Doctoral Programme on Antidisestablishmentarianist Phisphology at the Institute of Useless Research and the Department of Occult Sciences     \par} \rule{\textwidth}{2pt} }  {\fontsize{22}{37}\selectfont% \textbf{Rather obnoxious, unnecessarily long and incomprehensible title on a very obscure and unimportant topic}} \vfill {     \fontsize{19}{19}\selectfont%     \textsc{thesis}\par }  {     \fontsize{14}{19}\selectfont     To obtain the futile degree of \par } {     \fontsize{16}{19}\selectfont     \textsc{doctor of phisphology} } \vfill {\fontsize{14}{19}\selectfont Submitted by:\par}  {     \fontsize{18}{16}\selectfont%     Bashed Grad Student\par } \vfill  {     \fontsize{16}{16}\selectfont%      Advisor:       Herr Prof. Dr. Hab. Merkwürdige Liebe \par}   {\fontsize{12}{14}\selectfont Department of Explosive Relaxation, PIU\par} \vfill  {     \fontsize{14}{25}\selectfont%     Members of the Jury:\par }      {     \fontsize{18}{25}\selectfont     Dr. Prost. Vogon Jeltz\par         {         \fontsize{12}{14}\selectfont Department of Transplutonian Literary Theory, PIU         \par         }     }      {     \fontsize{18}{25}\selectfont     Dr. Hab. Gent. Tristram Shandy\par     }     {     \fontsize{12}{14}\selectfont Department of Lifes and Opinions, PIU     \par     }  \vfill {\fontsize{14}{12}\selectfont {Arkham, Massachusetts, Brumaire \textsc{anno v}}} \end{center} \vfill \rule{\textwidth}{2pt} \end{titlepage} \end{document}   There are many questions that ask on formatting of a title page (e.g.  and ) but I think I've got that sorted out. What I want are variables for the contents of the title page; of course the code above requires a beginning and ending of a document, but in real-life I'd like just to input the "variables" on the preamble and use a \maketitle command or something simimlar to produce the output; that is, I want to be able to type in the preamble something like \institution, \advisor, \jurymember (this one is optional), \advisor, etc.  Any ideas?  PS. I include the logo.png file and a screencap of the output just for the sake of completeness.


Android app button not getting disabled/unclickable

The button is defined in the mainUI thread Here is the part of my code causing trouble-          button.setOnClickListener(new OnClickListener() {         public void onClick(View v){             new Thread(new Runnable() {                  public void run() {                     try {                         OutputStream outToServer = client.getOutputStream();                         DataOutputStream out = new DataOutputStream(outToServer);                         out.writeUTF("Hello from " + client.getLocalSocketAddress());                         final String msg = edi.getText().toString();                         out.writeUTF("Client: " + msg);                          runOnUiThread(new Runnable() {                             @Override                             public void run() {                                 tex.append(msg);                                 if (msg == "quit") {                                     button.setClickable(false);                                     tex.append("quitbutton");                                 }                                 tex.append("Client: " + msg + "\n");                                 edi.setText("");                             }                         });                      } catch (Exception e) {                         e.printStackTrace();                     }                 }}).start();         }     });   Rest of the code here is working perfectly fine. When I send in "quit" as string, the msg variable has it correctly. Problem seems not to be entering the if block at all, because if it did, it should have shown "quibutton" text in the textview, which it ain't.  I'd appreciate any kind of help, thanks :)  Edit- I didn't realize that I wasn't comparing the strings in the right way, not that I don't know how to. It probably got mixed up with C++ operator overloaded function in my head that I wanted to compare strings using == directly.


Google Compute Engine SSH - different username after switching to OS Login

I created a Compute Engine VM (Ubuntu 18.04), and when I log into it using the SSH button in the VM instances list I'm logged in as user username.  After a while, I realised I needed to be able to use another SSH client as well. As per  I enabled OS Login by adding a key-value pair in metadata, where key is enable-oslogin and value is TRUE.  I then tried to add my existing SSH key:  gcloud compute os-login ssh-keys add --key-file path/to/key.pub --ttl 0  which was successful except one major problem: it has added the key for user username_gmail_com and will only allow me to ssh to my VM as that user:  ssh username_gmail_com@myinstance  And it has also created that user on my VM. From the web interface, I'm logged in to the VM with that new user as well (/home/username_gmail_com). Of course, I can still access the original user's data (/home/username). When I disable OS Login the web interface logs me in as username again and SSH from another client is disabled.   Why is the username different when enabling OS Login? Can I change the username with OS Login enabled?   Edit  There has been an addition to the docs explaining exactly this question. Check here:  and on  all the way at the bottom under "Expected login behaviors".


TikZ doesn't find all intersections between plot and a line

Why doesn't TikZ find all intersections. They are obviously there …    \documentclass[border=10mm]{standalone}  \usepackage{tikz} \usetikzlibrary{intersections}  \begin{document} \begin{tikzpicture}[point/.style={fill=blue,minimum size=1mm,inner sep=0pt,circle}]     % Zoom (to prevent oveflow)     \def\yzoom{100}     % Plots     \foreach \T/\xmin/\a in {%         0.27/1.538/a,         0.28/1.590/b,         0.29/1.649/c     } {         \draw [thin,name path global/.expanded={kurve \a}]             plot [raw gnuplot] function {%                 set xrange [\xmin:10];                 set yrange [0:0.08*\yzoom];                 set samples 1000;                 f(x) = \yzoom*(\T/(x-1) - 1/(x**2));                 plot f(x);             };     }     % Lines     \foreach \p/\a in {%         %% T = 0.27         0.0231/a,         %% T = 0.28         0.02855/b,         %% T = 0.29         0.0338/c     }{         \draw [red,thin,name path global/.expanded={linie \a}]             (0,\p*\yzoom) -- (10,\p*\yzoom) node [fill=white,pos=0.1] {\a};     }     % Intersections points     \path [name intersections={of=kurve a and linie a,by={P1,P2,P3}}]         (P1) node [point] {} (P2) node [point] {} (P3) node [point] {};     \path [name intersections={of=kurve b and linie b,by={P1,P2,P3}}]         (P1) node [point] {} (P2) node [point] {} (P3) node [point] {};     \path [name intersections={of=kurve c and linie c,by={P1,P2,P3}}]         (P1) node [point] {} (P2) node [point] {} (P3) node [point] {}; \end{tikzpicture} \end{document}   There seems to be no problem with the names of the paths but TikZ is missing four intersection points.  Bonus question: Is it possible to solve the last part (adding blue points) with the second \foreach? I tried it but I get the error File ended while scanning use of \tikz@intersect@path@names@parse..


I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


How do I find defective RAM sectors and where? I have tried memtest, but where it does describe the sectors (if). And how to solve them exactly. First, i have tried this :  but i don t think it's working cause I have written the wrong adresses.  Next thing, i will attach the memtest scrs.    If I got them right(bad adresses from memtest), can you help me convert RAM to pages so I can block them properly in BCD?  Thank you.


In the below code,  is it more efficient (in terms of memory and time) to create a List<string> directly, rather than creating a string[] and calling ToList() on it before passing it to SomeMethod()?  If you create the string[] and call ToList(), would it create a List<string> object, as well as already having the string[]?  The reason I ask is that I have seen code where they are creating a string[] and calling ToList() before passing it as an argument to a method with a List<string> parameter, and I wasn't sure if there was any particular reason for that.  class Program     {         static void Main(string[] args)         {                         var array = new string[] { "str1", "str2" };             SomeMethod(array.ToList());             var list = new List<string> { "str1", "str2" };             SomeMethod(list);                                 }          static void SomeMethod(List<string> list)         {             //do stuff         }     }


Measuring a curve with Dirac delta function.

Formally, if I want to measure the length of a closed curve $f(x,y) = 0$, I presumed I could write:  $$ L = \int^\infty_{-\infty}\int^\infty_{-\infty} \delta( f(x,y) )\, dx\, dy, $$   but trying this out I don't think this works. What is wrong with this formula?  Edit: Am I missing a measure like a Jacobian or something? How can you prove this?


Question about baby rudin theorem 5.12 corollary

The corollary says if $ f $ is differentiable on $ [a,b] $ then $ f' $ cannot have any simple discontinuities on $[a,b] $.   I just don't how to prove it.  I think it should be proved on both two cases of simple discontinuities(first type and second type of simple discontinuities).  Thanks in advance.


How to wait for mapCanvas render before taking screenshot?

i am trying to iterate over a large list of features and making a screenshot of the selected feature. My problem is that it seems to be a delay between the refreshing of the canvas and the taking of the screenshot. In other words, the screenshot taken does not correspond to feature i but to feature i-1, sometimes i have several identical screenshots. Is it possible to explicitely wait until the rendering is done by the mapCanvas before calling the saveAsImage method?  This is globally the code that i am using to do this task.   for i in range(n):   layer.select(i)   iface.actionZoomToSelected().trigger()   qgis.utils.iface.mapCanvas().zoomScale(1000)   iface.mapCanvas().refresh()    imgname = '_'.join(['','object',str(i)])   imgname = ''.join([imgname,'.png'])   iface.mapCanvas().saveAsImage(imgname)


Is using "he" for a gender-neutral third-person correct?

I know there are different opinions on this issue. My question: Is using "he" for a general, gender-neutral third person still in common use for formal writing? By common use I mean, can I expect my paper not to be penalised because I use "he" as pronoun for "a student", etc.?   I think "he/she" is too clumsy and I am not comfortable with singular they.


clear example of sigma algebra generated by r.v

I can't understand how a sigma algebra generated by random variable. can you more explain and give me some examples. for example in coin toss we have a sample space and sigma algebra such that it's generated by sample space. I'd like to know what's different between sigma algebra generated by sample space and generated by random variable? I have to say I'm not math student so I need more explanation other peoples!!! Thanks a lot


Run Python script when a file has been added to a folder

Hi I am looking for some python script which runs automatically when a file has been added to a folder. is it really possible?. if yes can some one send some scrpts please.thanks in advance


90s military spaceship sci-fi pilot/movie

It could have been a pilot or a tv movie. I think it aired on broadcast tv mid to late 90s. The main plot point I remember (It has been a while so some may be a bit off):   Starts with Military Ball, Jr officer approaches Lady, who turns out to be his commanding officer. All hands on deck, heading to space battle far away. All humans (no aliens). Ship breaks down en-route to battle. Engineer goes inside giant horizontal cylinder engine cavity. One of the crew turns on the engine. Engineer gets fried. Space Trial! Vote by dropping black or white marble into a vase. One lady is not shy about which marble goes in the vase. All black marbles, saboteur dumped out the airlock. Engine fixed, head back to giant space battle.


I found this old desktop computer in our attic and it seems that its hardware is still in good condition. It is running a Windows XP and I wish to change its OS. I searched the web and found about Ubuntu OS. How can I install this free OS to that old PC? Can I install it through DVD/CD?


Are there any rules for downvoting an answer?! AFAIK, you can/should downvote   If the answer doesn't solve the OP's problem If the answer suggests the use of a incorrect method If the answer is totally baseless   Please have a look at  and  which were posted on SO. The initial answer which was posted, asked the OP to change the method which was used. Honestly, I do not know much about mysql but the docs for Statement suggested usage of executeUpdate() for insert, update and delete statement and so I downvoted the answer and posted a comment saying the same.  To this the OP started saying that his answer is correct and I should revoke the downvote, . Also, the OP acknowledged that the proposed solution . To this I asked the OP of the answer to explain why the change of method would solve the problem, but the answer poster did not do that and instead starting saying me that I have no right to .  I still haven't revoked my downvote though. Am I right in my stand? Was the answerer's claim right that I should revoke my downvote(which I certainly don't think so)?. Any suggestions on what can be done in such a cases?!


In LWC, is it possible to get a pick-list field's possible values?  I'm writing a component that is embded into a lightning record page. I need my component to be able to load the record from the page, get data from the fields and use that data to pre-populate my search form with default values.  I have this working with city/state and checkbox fields. Right now the city/state fields are built pull data from an aggregate query of contacts to find all possible state/city combinations (I know this is doomed to fail when the records reach over 50k contacts but Its good enough for now).  I have a pick-list field on my object called skill level, I need to be able to build a combo box that has all the possible values for skill level and set the default value to the value on the associated record.  I'd like to avoid hard-coding the available options if possible.  In LWC, is it possible to get a pick-list field's possible values?


Please how do I produce a table like this? Thanks.


What does it mean when someone writes a reunion/intersection symbol before a single set?

I don’t understand why it is a symbol before every set. I know that we can intersect or reunite two sets, A and B, but these examples make me confused.


Where can I find out when the next kernel version will be released for my distro version?

I checked the , , and  wiki pages but still cannot seem to find a complete answer to this.  When using an LTS release like 18.04, is there somewhere public that can be checked to determine what kernel versions are being tested and when they are anticipated to be released for it? I would like to use 4.19, for example, but would like to know how to check this for any anticipated kernel release.  I know I could potentially just install the 4.19 kernel myself but I would rather know when it (and future kernel releases) were in the release pipeline. Is there somewhere on Launchpad that I could check? Somewhere else? Where are the Ubuntu kernel package maintainers doing their work?


I have an Apple ID but it is not associated to App Store. I have tried to associate it, but it wont let me without a credit card. How to proceed?

I have got guidance on how to create a new Apple ID that wont use a credit card, but could not find a way to associate my existing Apple ID (with my main email) to App Store without inserting a credit card. I have tried the OS X App Store software, the OS X iTunes software, and logging into the Apple Site.


How do you prove that if side limits exist at a point, then the limit of the function exists at that point

How would you do an Epsilon-Delta proof for this theorem?  IF $\lim \limits_{x \to a^+}$  $f(x)$ = $\lim \limits_{x \to a^-}$ $f(x) = L$   THEN $\lim \limits_{x \to a}$  $f(x)$ = L


I have been trying to install Linux for a small project, however, I use Windows as my primary software on my computer. So, naturally, I searched up some tutorials, and have downloaded Linux/Ubuntu 16.04 as a distro. After unpacking this distro, and following the instructions to set up Ubuntu, I have encountered a small problem while doing so.  It appears that I have no folders whatsoever. Now, I can see all the folders in the Linux shell, I can see this: bin  boot  dev  etc  home  init  lib  lib64  media  mnt  opt  proc  root  run  sbin  snap  srv  sys  tmp  usr  var. But in my windows file explorer, I can't find a single file.  I have searched for these in my C: folder, but I can find no trace of them. I also need Linux to access another folder on my computer, but I don't know where to put it anymore. A screenshot is attached below.    As you can see, Linux shows there is, in fact, all the necessary files. But they aren't present in the Windows file explorer (And yes, I did scroll down).  Maybe I'm just being dumb, but I don't know what to do. Can I get some help?


Show/hide markers depending on zoom-level

I would like to show icons if the user zooms to level 7 or more and hide the markers when zoom level is 6 or lower. I've tried using the 'zoomend' property in my function like so:  var shelter1 = L.marker([55.1, 11.6], {icon: shelterIcon}).addTo(map);      map.on('zoomend', function() {         var currentZoom = map.getZoom();         if(currentZoom >= 7) {           shelter1.bindPopup("Shelter");         }         else {           shelter1.hide();         }     });   I know that hide() is not valid. But I need something similar. Couldn't find anything in the Leaflet documentation.


Why do we use 'the' for non specific nouns?

For example: Read the Bible. I'm not talking about a specific Bible. Also reading a bible would mean any bible. Which is not what I wanna say Why can't we just skip the article and say. "Read bible"


How to fix error my function is not define?

int main()  {     Pair<int, int> A = makePair (10, 20);     cout << A ;  return 0; }   it give me error here (makePair is not define) and i define it in header file  template<class T1, class T2> class Pair{ private:     T1 first;     T2 second; public:     Pair(T1, T2);     Pair() {};     Pair<T1, T2>  makePair(T1  a, T2  b);     void operator==(const Pair& other);     friend ostream& operator<<(ostream& out, const Pair<T1, T2>& A); };   and this is another file called pair.cpp that i used a template classes in it  template<class T1, class T2> Pair<T1, T2> makePair(T1   a, T2   b) {     return (Pair<T1, T2>(a, b)); }


Login failed for user 'domain\Administrator'. (Microsoft SQL Server, Error: 18456)

On my newly installed SQL Server 2014, I get the following error when trying to connect to the SQL Server:  2015-05-13 12:09:38.40 Logon   Error: 18456, Severity: 14, State: 5. 2015-05-13 12:09:38.40 Logon   Login failed for user 'INTRA\Administrator'. Reason: could not find a login matching the name provided. [CLIENT: <local machine>]   I reinstalled the sql server three times.  The user for which the login fails is the AD user with which I am logged into the server itself. When logging in via SSMS, I don't have to give any credentials (it is auto-filled), so this can't be a typo error.  How can I resolve this issue?  PS: I also had problems with the SSL cert which are already resolved, so the underlying problem may be bigger.


Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)

I am having trouble debugging an issue with a plugin that I'm writing. I want to do an Ajax request when a user changes the option on a select input. The thing is it was fully working as expected yesterday, then when I test the website today (no code changes were made at all since yesterday) I'm getting an:   domain.com/wp-admin/admin-ajax.php 400 (Bad Request)  message in my Chrome console. If I try in Internet Explorer/FireFox it doesn't give the error in console but the Ajax request is still not working.  The plugin I'm creating is on a DigitalOcean droplet which was made using their one click app for WordPress.  Here is the barebones code I'm using on the plugin for the ajax:  //This is in a class' constructor method add_action('wp_enqueue_scripts', array($this, 'plugin_prefix_scripts'));  //PLUGIN_URL is a constant created earlier in the plugin public function plugin_prefix_scripts() { wp_enqueue_script('plugin_prefix_scripts', PLUGIN_URL . 'scripts/frontend_script.js'); wp_localize_script('plugin_prefix_scripts', 'js_object',   array(     'ajax_url' => admin_url('admin-ajax.php')   ) );   }  frontend_script.js:  $('#plugin-prefix-option-one, #plugin-prefix-option-two').on('change', function() {     var data = {         'action': 'plugin_prefix_page_change',         'option_val': 'some_val',     }      $.post(js_object.ajax_url, data, function(response) {         console.log(response); });   Back in the class:  add_action('wp_ajax_plugin_prefix_page_change', array($this, 'plugin_prefix_page_change'));  public function plugin_prefix_page_change() {     $arr = array(1, 2, 3, 4, 5);      wp_send_json($arr);      //I've also tried wp_die() and no die call at all but same outcome     die(); }   I'm unsure how to debug this further. Any help is much appreciated.  Thanks


What is the fastest way to travel long distances in Minecraft?

In Minecraft, I have pretty much emptied the places around my home of resources and thus I need to travel a lot to other mines. I would like to know a fast way to do so. I have tried minecarts on rails (take up a lot of iron, and aren't really that fast), boats and more. I guess I should build some sort of construction.  What is the fastest mean of transport you can make in Minecraft (something which is still worth the effort to build, of course)?


Top bar customization with dconf-editor in Ubuntu 20.04 LTS

I've made Ubuntu dock transparent with dconf-editor by changing background-opacity value to 0 in the path /org/gnome/shell/extensions/dash-to-dock/. But I don't see a path to edit top bar transparency anywhere. How to edit top bar settings with dconf-editor? I've already tried the dynamic-top-bar extension, but didn't work, as I can't turn it on. Is top bar bound with the gnome-shell or the user theme?


Labelling equations as (r.1),(r.2),.. etc using \align

I have a number of reaction equations, I would like to label them as (r.1),(r.2),... etc, using \align.  So we would have:     equation 1      (r.1)      equation 2      (r.2)      equation 3      (r.3)      equation 4      (r.4)   I would very much appreciate any help.