When I run sudo apt update It is returning $ sudo apt update Hit:1 http://th.archive.ubuntu.com/ubuntu focal InRelease                                                                                Hit:2 http://th.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                           Hit:3 http://th.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                         Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]                                                                   Hit:5 https://download.docker.com/linux/ubuntu focal InRelease                                                                              Hit:6 https://deb.nodesource.com/node_15.x focal InRelease                                                                      Hit:7 https://linux.teamviewer.com/deb stable InRelease                         Fetched 109 kB in 2s (52.1 kB/s)                          sh: 1: /usr/lib/cnf-update-db: not found Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi' E: Sub-process returned an error code


what controls the outbound ring tone on LG Optimus F7 all i get is tones instead of ring tone

When i make a call all i here is a tone every few seconds just like its ringing but tones instead and the call goes thru. I can not find any setting that changes the out going ring tone.


Why don't electromagnetic waves need a medium to propagate?  How does light get such a magnificent velocity?


$$y_n=\rho^ny_0+(1+\rho+\rho^2+\cdots+\rho^{n-1})b.$$   If $\rho \not=1$, we can write this solution in the more compact form $$y_n=\rho^ny_0+\frac{1-\rho^n}{1-\rho}b.$$   This is from Elem. Diff. Eq. - Boyce, DiPrima.  How was the more compact form  derived?  In my calculus text: $1+p+p^2+\dotsb+p^{n-1}=\frac1{1-p}$. So where did Boyce/DiPrima get that numerator from?


Raw or orthogonal polynomial regression?

I want to regress a variable $y$ onto $x,x^2,\ldots,x^5$. Should I do this using raw or orthogonal polynomials? I looked at the question on the site that deals with these, but I don't really understand what's the difference between using them. Why can't I just do a "normal" regression to get the coefficients $\beta_i$ of $y=\sum_{i=0}^5 \beta_i x^i$ (along with p-values and all the other nice stuff) and instead have to worry whether using raw or orthogonal polynomials? This choice seems to me to be outside the scope of what I want to do. In the stat book I'm currently reading (ISLR by Tibshirani et al) these things weren't mentioned. Actually, they were downplayed in a way. The reason is, AFAIK, that in the lm() function in R, using y ~ poly(x, 2) amounts to using orthogonal polynomials and using y ~ x + I(x^2) amounts to using raw ones. But on pp. 116 the authors say that we use the first option because the latter is "cumbersome" which leaves no indication that these commands actually do two completely different things (and have different outputs as a consequence). (third question) Why would the authors of ISLR confuse their readers like that?


Could you recommend some stochastic calculus literature that has a lot of examples? I am particularly interested if there are good books with stochastic differential equations explained on real problems, for instance, some kind of a seminar-like problems-with-solutions set.


I usually am able to render successfully to the c:\tmp folder, but when I came into work today, I rendered out the image on my work laptop, and everything seems to work, but I'm not getting an output to the tmp directory.  Does anyone know how to make this work?


I am using an usb drive configured to install ubuntu on my laptop. The laptop is Acer Aspire E5 with Intel Celeron N2940, 4gb ram and 500 gb hdd, currently with windows 10. The usb installer was made with pendrivelinux with the fat32 system, in order to install Ubuntu 14.04.3 LTS. I have also disabled secure booting, but it seems the installer in stuck on this image:    The dots are not turning on/off like at the start, and the cooler starts running for 5 seconds every half a minute. Yes I'm sure I downloaded the iso properly, as this is the 3rd time I've redownloaded it and put it on the usb drive. Please give me any solution, I'm willing to try what you propose and post results. Thanks in advance.  Edit for steps:   turn on pc holding f12 to bring up the boot menu obviously select the usb hdd I get 4 choices: try ubuntu without installing, installing ubuntu, oem install and checking for defects. by simply selecting install ubuntu and pressing enter, 5 dots appear and flash in order. After one minute, they stop. No language select, no nothing. restart and go back to 3: I entered command editing and replaced the quiet splash with nomodeset, then f10 to boot. big list of operations and initialisations etc. At one point it stops:  [57.963662] dw_dmac INTL9C60:00: invalid resource.    Same thing, stuck with cooler starting to work from time to time.    edit2: the computer didn't even want to boot the usb installer with the 32 bit (i386), the bios did not detect it. I did try twice. Both the original image and the steps are made with the amd64 version.  edit3: I looked up the problem and kept searching on the internet, when I stumbled on someone suggesting I use ACPI=off. I gave it a go and I did not get any more errors, although most laptop features got turned off, including the touch pad. Then I got the following error:


How can I hide my top menu bar on Mac OS X?

I need to temporarily (5 min) hide my top menu bar. Is there a glitch, or something that will let me do that?


Is every group the unit group of some ring?

Let the functor $F\colon\bf Ring\rightarrow\bf Grp$ send the ring $A$ to its group of units $A^\times,$ and the ring homomorphism $f\colon A\rightarrow B$ to the group homomorphism $f^\times\colon A^\times\rightarrow B^\times:a\mapsto f(a)$. I was curious about this functor, and in particular, whether it is essentially surjective. That is, for any group $G$ (not just finite,) is there a ring $A$ such that $G\cong A^\times$? If not, what groups $G$ satisfies this? A similar question was asked in  but what can be said for infinite groups, or groups in general? Calling groups that satisfy this condition R-groups, I have proved that any finitely generated abelian group is an R-group. I have no idea what to do from now, but I  have a conjecture that the unit group of the group ring $\mathbb F_2[G]$ is isomorphic to $G.$ If this is true, certainly, all groups are R-groups, and the functor $F$ is essentially surjective, but I am having trouble proving it. Can anyone help me?


What happens to a series after its author dies?

As most of us know by now  passed away. However, the series he worked on such as  is yet to announce its discontinuation and thus .  This however made me wonder, what will happen to a series when the author passes away?  Will the franchise pick the series up with another mangaka instead? Silently let it linger on 'publishing' as memento? Discontinue it after a XXX amount of time? Or does this differ from publisher to publisher? Or maybe even mangaka to mangaka?  In the case of HOTD it already was on an extended hiatus, and the same thing could just happen to , the author of , as he is in quite bad health as well. But , the author of , could also be next. In which case supposedly nobody knows the ending besides Oda himself and the diseased .


Prove that $S_4 \cong V_4 \rtimes_\phi S_3$ for any isomorphism $\phi: S_3 \to \text{Aut}(V_4)$

Note that $\text{Aut}(V_4) \cong S_3$. I know how to prove that $S_4$ isomorphic to some semidirect product of $V_4$ and $S_3$. I know if it works for an isomphorism it works for any isomorphism. However, I'm having trouble seeing that the $\phi$ must be an isomorphism of $\phi: S_3 \to \text{Aut}(V_4)$ (i.e. the kernel is trivial). Is there a better way to check this without doing each case (kernel cannot be 3-cycles, or all of $S_3$)?


how to set text in mouseover array leaflet

I have problem to display text when mouseover certain point. This is my code:       for(var e=0;e<xmlStation.getElementsByTagName("station").length;e++) {              var lat=xmlStation.getElementsByTagName("station")[e].getAttribute("lat");         var lon=xmlStation.getElementsByTagName("station")[e].getAttribute("lon");          // Posiziona l'icona dell'evento nel punto di coordinate          // Legge le varie proprietà dell'evento         var stat=xmlStation.getElementsByTagName("station")[e].getAttribute("code");         var Network=xmlStation.getElementsByTagName("station")[e].getAttribute("netid");         var center=xmlStation.getElementsByTagName("station")[e].getAttribute("source");         var loc=xmlStation.getElementsByTagName("station")[e].getAttribute("name");         var image = L.icon({           iconUrl: imagename,           iconSize: [magvis, magvis],           iconAnchor: [(magvis)/2, (magvis)/2]         });         var markerPos = new L.LatLng(lat,lon);         var LMarker = new L.marker(markerPos,{icon:image}).bindPopup(info,{maxWidth: "auto"}).on('mouseover', function (e) {           Popup = L.popup()           .setLatLng(markerPos)           .setContent('Centro di acquisizione = '+center+'
'+'Network = '+Network+'
'+'Codice Stazione = '+stat+'
'+'Località = '+loc)           .openOn(mymap);         }).addTo(mymap)         ArrayStation.push(LMarker);       }       for(var e=0;e<xmlStation.getElementsByTagName("station").length;e++) {             mymap.removeLayer(ArrayM[e]);           }         makeshake=true;      });  When I try to execute, it set the image in right position, but on event on mouseover it repeat  only the last element. Why do it happen?


Ubuntu server desktop environment, minimal install

Brand new to Linux less than a week ago and have to set up a small remote company file server. Went from full ver dsktop env GUI which worked fine from boot to dsktop env GUI in minimal config after fresh reinstall Ubuntu Server 16.04.3 LTS.  sudo apt-get install --no-install-recommends ubuntu-desktop   Can't figure out how to start GUI now after 3 hours of searching.  Screen stops at  [ok] Reached target Graphical Interface. [ok] Started Stop ureadahead data collection 45s after completed startup.          Starting Update UTMP about System Runlevel Changes... [ok] Started Update UTMP about System Runlevel Changes...      Starting Terminate Plymouth Boot Screen... [ok] Stopped target Graphical Interface. [ok] Started Terminate Plymouth Boot Screen. [ok]  Started X.org diagnosis failsafe. [ok]  Reached target Graphical failsafe fallback. [ok]  Started Daily apt download activities.   I can get to terminal from this point with Ctrl+Alt+F1 but can't toggle into GUI. Just wanted the GUI to set up the storage drive before setting up Samba. Any help would be appreciated.  Thanks.


query with top and order by - convert from MsSql to Oracle

I need to convert this query from MsSql syntax to Oracle syntax: select top 1 (convert(varchar, UPDATED_DATE, 23)) as date from DA_CATEGORY order by date desc  How do I do this? I need the data from both DB types to be the same string / value.


How to change the date Format in android

I have date in this format 2015-06-23T00:05:00+00:00 in string and Now I want to convert it in 2015-06-23 format and save that format in string.


Background Images in Blender Will not show

I'm unable to display images as background images in Blender.  I've tried it as a jpeg and a png.  I have opacity set to 1. I've tried scaling the size from 1-1000. I've tried looking at every view available. Nothing seems to work.


Show that no set $S$ is equinumerous with $P(S)$.

Looking for a proof check. I've written out the argument as it reads most easily to my own eyes.  Let $S$ be a set and suppose by contradiction that $\exists f:S \to P(S)$ with f surjective. Define $B = \{x \in A: x \notin f(n)\}$. $f$ surjective $\implies B = f(x_0)$ for some $x_0$. $x \in B \iff x \notin f(x)$ but $B = f(n_0)$ so $n_0 \in f(n_0) \iff n_0 \notin f(n_0)$ which is a contradiction. Therefore $\nexists f$.


What does the spectrum of the adjacency matrix of a graph tell you?

I am trying to search for an answer to the following question and I cannot find a straightforward answer.  What does the spectrum of the adjacency matrix (set of eigenvalues and their multiplicities) of a graph tell you about the structure of a graph?  Thank you!


Showing OSM source acknowledgment on the map in QGIS?

I am using OpenStreetMap as a base layer via XYZ tiles in QGIS 3.01.  I can't seem to find a way of having source acknowledgement appear on the lower right corner of the map.  Can somebody point me in the right direction?


I'm designing a website for a client that has some irregular trading hours. Some days they remain open until 2am, others they close at 10pm. They want these hours displayed on their landing page, so visitors can see what time they open & close at a glance. The trouble is I have to work with an API that returns integers only. Based on these integers and the current time, I can display a currently open or currently closed flag accordingly. As it stands currently, this isn't possible. I can't use custom text anywhere, only integers (24 hour time). I'm having some difficulty working out how to display the time. Currently the client displays their hours like this;  Mon 8am - 2am Tue 8am - 2am Wed 8am - 10pm Thu 8am - 2am Fri 8am - 10pm  However I don't think this is correct, and looks quite confusing (what is 8am - 2am?) shouldn't it be;  Mon 8am - 12am & 12am - 2am Tue 8am - 12am & 12am - 2am Wed 8am - 10pm Thu 8am - 12am & 12am - 2am Fri 8am - 10pm  Admittedly, this also looks quite confusing! Any ideas how I can achieve this in the most user friendly way possible, without using custom text?


Test lync presence without having lync installed

I've created a content search web part that use lync presence. Is there a way to test lync presence ( away, offline, online.. ) on specific users without having lync installed in the environment?


More and more often on the Security SE website, I get the same question to review in the "Low Quality" queue, and also the "First Posts" queue?  As a result I often end up first recommending deletion/closure, and then flagging the question as low quality. Shouldn't flagging disqualify me from recommending deletion and vice versa?


Definition of map genericity in topology

In many articles about topology, Reeb space etc. I came accross the term generic map, or generic smooth map but I haven't found any definition of such "genericity"... could you help me ?  Example of use from  :     We study the local and global structure of this space for generic, piecewise linear mappings on a combinatorial manifold.


I'm refactoring my ASP.net application from ASP.net 3.5 to 4.0. Also I'm changing the URLs to user friendly URLs /product.aspx?id=100 to /product-name/100.  All my pages are indexed by search engines and the site has already been online for 6 years. I'm planning to do 301 redirect from the old pages to the new one.  I want to make sure I won't lose the rankings and traffic.  Any suggestion how to do it properly?


What are "hyperthreading" and "virtual cores"?

I'm new in this computer terms. So anyone can explain to me what "virtual cores" and "hyperthreading" are at greatest detail a layman can understand?  People told me that virtual cores are imaginary cores acting like a physical core. If that is so, then can I make my AMD v105 processor single core a dual core processor?   Is it also possible to hyperthread my CPU? Are these functions built in?


Do real numbers include all kinds of numbers as long as they are on the number line?

Non-computables, hyperreals, surreal, and  even more obscure numbers exist between even just, e.g., 0 and 1. Does that mean they are all real numbers? Is a number real as long as it is on the number line, even how obscure, specific, unreal tiny it is?  If not, what is and isn't a real number? And does "all numbers on the number line" have a name?


Recommended Books on Advanced Statistical Inference

Can anyone suggest a nice book on advanced classical statistical inference? Thanks.


Multiplying values in Excel 2013 (Same cell)

If for example I have a value in cell A1, lets say 2  What I want to do is multiply that cell by 0.75 but in the same cell  I don't want to have to put a formula in B1 such as =(A1*0.75), because I already have a value in B1 and I don't want to have to insert a new column.  if I highlight cell A1 and put the formula =(A1*1.333) into it the value becomes 0.00  Can what I'm asking be done? or would I need to create a macro?  Any help would be appreciated.  Thanks


Windows Server restart / shutdown history

How can I easily see a history of every time my Windows Server has restarted or shutdown and the reason why, including user-initiated, system-initiated, and system crashed?   The Windows Event Log is an obvious answer but what is the complete list of events that I should view?  I found these posts that partially answer my question:    includes several answers that partially address the full restart history  includes an additional event id  includes some of the same event ids   but those don't cover every scenario AFAIK and the info is hard to understand because it is spread across multiple answers.  I have several versions of Windows Server so a solution that works for at least versions 2008, 2008 R2, 2012, and 2012 R2 would be ideal.


Why is the magnitude of the gradient equal to the maximum rate of change at that point?

I understand the concept of the gradient being a vector of the partials of f with respect to each variable, so essentially the gradient gives you a direction in the input field to travel in order to get the maximum increase in the function f. What I don't understand is why the magnitude of that gradient is the actual maximum rate of change of f - it feels right that it should be but I can't quite join the dots and see a proper reason for it.


How can I make A* finish faster when the destination is impassable?

I am making a simple tile-based 2D game, which uses the A* ("A star") pathfinding algorithm. I've got all working right, but I have a  performance problem with the search. Simply put, when I click an impassable tile, the algorithm apparently goes through the entire map to find a route to the impassable tile—even if I'm standing next to it.  How can I circumvent this? I guess I could reduce the pathfinding to the screen area, but maybe I am missing something obvious here?


Cannot understant why ISP speed is slow thru wireless

I have a 100mbps internet connection. ISP's modem is in bridged mode, behind a TP-Link router connected to computers.  Running speedtest on a wired PC, I get almost the full 100Mbps download speed but on my laptop, the speed is ~50mbps.  Router wifi is configured to 802.11 bgn mixed, 40 mhz and, the OS wifi status window says wifi speed is 150mbps.  Why cannot I get the full 100mbps download speed on wireless?


I think   and  may reveal a bug in the bounty system.  The timeline summary as I see it is:   Question asked Mar 17 Answer added Mar 18 Question edited (extended) and bounty added Mar 20  Answer edited and accepted Mar 21 Bounty ends "with no winning answer" Mar 28   This was the only answer to the question.  From      If the bounty starter accepted an answer during the bounty period, that answer is awarded the bounty.   This appears to be the case here, so I'd expect the bounty to be awarded.  Is this a bug in the bounty system?  I'm not too fussed about the actual bounty here (I'd answered the question before the bounty was offered anyway), it's just that it'd be good to either fix the bug or improve the documentation I guess.


Finding the Dimension of a Matrix Polynomial: $W$ = { $p(B)$ : $p$ is a polynomial with real coefficients}

Let $W = \{ p(B) : p \text{ is a polynomial with real coefficients}\}$, where $$B= \begin{pmatrix} 0 & 1 & 0\\  0 & 0 & 1\\  1 & 0 & 0 \end{pmatrix}$$  Which of the following possibilities presents the tightest bounds on the dimension $d$ of the vector space $W$?     $4 ≤ d ≤ 6$    $6 ≤ d ≤ 9$    $3 ≤ d ≤ 8$    $3 ≤ d ≤ 4$


I am trying to understand the source code of the web application: . I tried to run it on my own machine (Mac OS 10.10) and it is run on the Apache. However, I keep getting the error 403 (Forbidden), yet I can't find out the reason.   The application requires a proxy file. I added two lines to let the application know where is the proxy:   function init(){  initMap();  /* Here are the two lines code I added */  esriConfig.defaults.io.proxyUrl = "proxy/"  esriConfig.defaults.io.alwaysUseProxy = false; } //show map on load  dojo.addOnLoad(init);   The error message is:   (init.js:157)  GET http://localhost/WMSMultiDimensionalEsriViewer/proxy/?http://sampleserver6.…Dimensional_Sample/MapServer/WMSServer?request=GetCapabilities&service=WMS 403  (Forbidden)   The screenshot is here:    Can anyone please point out the issue?


Can I travel to Russia and China with a passport whose cover is fading?

My passport's cover's text is fading: the name of the country is still readable but the coat of arms has almost disappeared.  The rest of the passport is fairly okay--you can see I bring it around quite a lot, but it's not wet or broken and the personal information page is completely legible.  I have visa-free access to both Russia and China, so I wonder if they will be extra strict on me because of this. Noteworthy, I reside in Germany. Also, I will be entering by train to both countries.  Any (bad?) experiences?


Should 'using' directives be inside or outside the namespace?

I have been running  over some C# code, and it keeps reporting that my using directives should be inside the namespace.  Is there a technical reason for putting the using directives inside instead of outside the namespace?


How to enable run menu history in Windows 10?

Whatever I type into "Run" in Windows 10, for example "regedit" or "gpedit.msc", my Windows 10 never saves this history. I hate to type these things again and again. Is there a way to enable run menu history in Windows 10?


What are some philosophical implications of relativity?

what are the implications of relativity? does it imply for example that there is no center to spacetime?  ie despite that the universe started from one point, there is no real center, every frame of reference can be considered as the center point vis a vis the laws of physics such as the speed of light.


I am curious about the semantics of the MIME types application/javascript versus text/javascript.    Obviously, one is supposed to be executed, and the other is supposed to be just text.   I see application/javascript when looking at headers of an external .js load.  HTTP/1.1 200 OK Date: Mon, 13 Jan 2014 18:32:58 GMT Server: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 Content-Type: application/javascript Content-Length: 856 keep-alive: timeout=5, max=59 Via: 1.1 (jetty) Accept-Ranges: bytes   If this application/javascript will execute the javascript, why don't we use  <script type="application/javascript">   // some js code. </script>   And vice-versa, why is an external js load not text/javascript?


Which is it: "1½ years old" or "1½ year old"?

1½ is not yet 2 or more, so which do we properly say: "1½ years old" or "1½ year old"?


Can I choose which damage type my Sneak Attack does if my weapon does multiple types?

Sneak Attack has the same type , this is easy, unless there are multiple damage types.  A Flame Tongue does slashing (or piercing) damage, and fire. Can I chose the Sneak Attack damage in this case to be fire too?


When I move an object, why isn't it moving smoothly?

When I move an object, I can only move from one place to another, not smoothly.  Why? What can I do to make it smooth? When I try moving a torso, I can only move it from a spot to another, not to anywhere I want.


Warn of edit privileges missing before editing starts

Would it be possible to warn the user he lacks edit privileges before he spends ten minutes improving a question just to see a nice "I can't let you do that, Dave" when he tries to submit?


Why is the laboratory frame energy always greater than the center of mass frame energy for collisions?

I looked through lots of sources to answer the question, 'Why is lab frame energy (total energy) always greater than the center of mass frame energy?' Many of them provided lots of mathematical answers. Could someone explain this in terms of physics or simple concepts or math invovled?  Difference from  below  In addition to the previous questions, some aspects remain a bit confusing to me. (I decided to leave the previous question as it is, since the existing answers answered the original questions) To highlight my confusion, I am very confused by why the total energy for the lab frame is greater if the lab frame and center of mass frame describe the same event but differ by the frame of reference (the center of the two particles vs. one of the particles). Especially they are under the same assumptions (e.g conservation of momentum and elastic collisions). Is this because the vectors cancel for the center of frame energy when the masses collide?    Due to the conservation of energy, the total energy in the center of mass frame, $E$ is the following:  $$E=(\frac{1}{2}m_1v_1^2)+(\frac{1}{2}m_2v_2^2)=(\frac{1}{2}m_1v_1'^2)+(\frac{1}{2}m_2v_2'^2)\tag{1}$$  where $m_1$ is one of the masses, $m_2$ is the other mass, $v_1$ and $v_2$ are initial velocities and $v'_1$ and $v'_2$ are final velocities.  Similarly, the total energy in the lab frame is $ε$ is   $$ε=ε_1'+ ε_2'$$(where $ε_1'$ is the energy of one of the masses in the final state and $ε_2'$ is the other mass in the final state)  $$ε_1'=\frac{1}{2}m_1V_1'$$and$$ε_2'=\frac{1}{2}m_2V'_2\tag{2}$$  where $V_1'$ and $V_2'$ are the final velocities.  From here, how do we end up with $ε=a \times E$? (showing that $ε$ is greater than $E$?)  What do we know about the relationship between Eq1 and Eq2 to determine that ε is greater than E?


Why is the bokeh shaped like the aperture? What is the physical explanation to this?


Getting the BibTeX logo, analogously to \LaTeX

I can't find the analogue of the \LaTeX command that produces the BibTeX logo:


What is the philosophical ground for distinguishing logic and mathematics?

I was wondering why the field of mathematics and that of logic are perceived as two distinct fields. Although could be pleased with the intuition that logic is rather meta-mathematics, still would like to know: were there any philosophers who may be said to have created this distinction? What is the philosophical background for distinguishing mathematics and logic?


How should I secure an unused wire in my breaker panel?

I accidentally pulled 6-4 wiring to a machine that only needs 240 and no neutral. What to do with the white wire?  I read  that at the machine, I just cap the white wire.  When I go to connect the wires in the main breaker panel, do I still connect the white wire to the neutral bus, or do I cap it in the panel as well?


Turning off figures in latex completely (without placeholders)

Is there an easy method to compile a LaTeX document ignoring contents of \begin{figure} ... \end{figure} blocks altogether?   I am looking for an equivalent for draft and demo options (as in \documentclass[demo]{article} or \usepackage[draft]{graphics}) that will ignore figure environment completely. Specifically, don't want to see any placeholders nor figure captions, just continuous text.   Is there a way to do the same thing for table environments?


/Ticket.java:7: error: non-static variable this cannot be referenced from a static context this.availableTickets=availableTickets; ^ 1 error

Why running this code gives an error as a non-static variable this cannot be referenced from a static context  this.availableTickets=availableTickets; public class Ticket {          private static int availableTickets=0;          public static void setAvailableTickets(int availableTickets){         if(availableTickets>0)             this.availableTickets=availableTickets;     }          public static int getAvailableTickets(){         return availableTickets;     } }


I want to use xdg-open to open irc:// links, how can I make the required parameter?


I recently upgraded my workstation from XP SP3 to Vista Business, and during the upgrade Windows moved my old C:\Windows directory to C:\Windows.old.  I got all of the stuff I needed out of that folder, but there are six "undeletable" files there so I cannot remove it.  They are:  Windows.old\Program1\Adobe\Reader 9.0\Resource\CMap\Identity-H Windows.old\Program1\Adobe\Reader 9.0\Resource\CMap\Identity-V Windows.old\Program1\Common Files\Adobe\Acrobat\ActiveX\AcroIEHelper.dll Windows.old\Program1\Common Files\Adobe\Acrobat\ActiveX\AcroIEHelperShim.dll Windows.old\Program1\Common Files\Adobe\Acrobat\ActiveX\AcroPDF.dll Windows.old\Program1\Common Files\Adobe\Acrobat\ActiveX\pdfshell.dll   Whenever I try to delete the files either through explorer or a command line, I get a permission denied error.  I have tried to grant myself full permission on the files, but again, permission denied.  I don't even have acrobat installed on my Vista machine, and I uninstalled Adobe updater.  However, I still can't manage to get rid of these files.  How do I nuke them for good?  Edit: I was able to take ownership of the files, but I still can't delete them.  Renaming them did not work, as I was denied permission to do that as well.  I'll try booting up in safe mode and getting rid of them there.  Edit II: Booting up into safe mode did not allow me to delete the files.  Bummer.


If a topology contains all infinite subsets, then it is the discrete topology

I am solving question $8$ of exercises in section 1.1. of chapter 1 in "Topology without tears". The question reads as follows.     Let $X$ be an infinite set and $\tau$ be a topology on $X$. If every infinite subset of $X$ is in $\tau$, prove that $\tau$ is the discrete topology   My idea was to show that every singleton set is in the topology and thereby the topology is discrete.  Choose an infinite set $A$ from $X$ such that $A^c$ is also infinite. $A$ and $A^c$ belong to $\tau$ since they are infinite sets. Now consider any $x \in X$. Note that $A \cup \{x\}$ and $A^c \cup \{x\}$ belong to $\tau$ since they are infinite sets. Hence, their intersection which is nothing but $\{x\} \in \tau$ for every $x \in X$.  The problem I have is I don't know how to prove the first sentence in the previous paragraph. These are my line of thoughts to prove them.   If $X$ is a countably infinite set, then I can list the elements are let the odd numbered elements fall into $A$. This guarantees $A$ and $A^c$ are both infinite. If $X$ is uncountable, then I can choose a countably infinite subset and call it $A$.   Are the above arguments rigorous? I am not especially happy with my second argument of choosing a countably infinite subset from an uncountable set since I do not give an explicit procedure of constructing the set $A$.  Also, is there any other simpler way of answering the original question?


Why is there a mismatch between size reported by LVM and the size reported by df -h?

I'm new to LVM and have been very confused by this:  I am transfering a large file to a partition that I thought had about 1.5 terabytes of space on it.  Near the end of the transfer, rsync exits with an error claiming that the partition is full.  I investigate and find the following:  $ sudo lvm lvs   LV        VG     Attr   LSize   Origin Snap%  Move Log Copy%  Convert   home      system -wi-ao  97.66G                                         log       system -wi-ao  48.81G                                         log.audit system -wi-ao   9.75G                                         root      system -wi-ao 341.59G                                         swap      system -wi-ao   4.88G                                         temp      system -wi-ao  97.66G                                         var       system -wi-ao   1.46T     This seems to imply that /var (the partition that I'm transfering to, has the amount of storage I expect.  However, then I see:  $ sudo df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/system-root                       331G  1.3G  313G   1% / /dev/mapper/system-temp                        95G  188M   90G   1% /tmp /dev/mapper/system-var                        95G   90G     0 100% /var /dev/mapper/system-home                        95G  188M   90G   1% /home /dev/mapper/system-log                        48G  264M   45G   1% /var/log /dev/mapper/system-log.audit                       9.5G  340M  8.7G   4% /var/log/audit /dev/sda1              99M   25M   70M  26% /boot tmpfs                 8.0G     0  8.0G   0% /dev/shm   I'm guessing this has something to do with the volume being resized at some point.  While I have reliable backups, I'd rather not interrupt services for the time it will take to get the backup and restore.  Thus, is there anyway to make the filesystem seen by the OS match the space available according to lvm without losing data?


How to enqueue stylesheet after rtl.css?

When you use rtl language by default wordpress enqueue rtl.css file at the end of all stylesheets. what I need is how to enqueue a stylesheet after rtl.css stylesheet so the result should be like the following?   <link rel="stylesheet" href="http://example.com/wp-content/themes/mytheme/rtl.css" type="text/css" media="screen" /> <link rel="stylesheet" href="http://example.com/wp-content/themes/mytheme/responsive-rtl.css" type="text/css" media="screen" />   Thanks


Is it possible to write a .bat-file that changes the names of all the files in a folder? For example: if I have a bunch of jpegs in a folder that have random names:  File1.jpg ScreendumpA2.jpg Test13.jpg   And I would like to change them to something like this:  Picture001.jpg Picture002.jpg Picture003.jpg   Any help would be greatly appreciated.


How do I protect my Google/Gmail account?

I have seen lots of horror stories of people who have lost control of their Google account, especially Gmail.   How can I prevent the same thing from happening to me? What steps can I take to protect my account before I lose control of it?


Can someone give a hint or a solution for showing that a scheme has Krull dimension $d$ if and only if there is an affine open cover of the scheme such that the Krull dimension of each affine scheme is at most $d$, with equality for at least one affine scheme in the cover?


GET is getting Invoked instead of DELETE

I am using REST service that is being invoked from bootstrap form submission which is being opened from hyperlink click event.REST is containing GET,POST,DELETE methods but for one of my requirement i want DELETE to be invoked but GET is being Called..Here is my form..

         <form action="~/GetStudent" class="form-horizontal" role="form" method="delete" id="frmDelete">
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
Confirm Delete

                  <input type="hidden" name="id" id="id" />

                     <button type="submit" class="btn btn-success"> DELETE</button>                     <button type="button" class="btn btn-danger" data-dismiss="modal"> CANCEL</button>

         </form>

   and here is how to perform click operation..   $('#frm .glyphicon-trash').on('click', function () {         var table = $('#tbl').DataTable();         var data = table.row(this.closest("tr")).data();         $("#id").val(data[3]);     });   Please help me to get it done.Thanks..


If $S = \{1/n \mid n ∈ ℕ\}$, what is $\inf(S)$?   I believe the answer is $0$, but I'm not really sure how to prove it...does it involve using epsilon?


Command to transpose (swap rows and columns of) a text file

Is there currently a generic command that will "pivot" input.  e.g.  #labeled.file name: bob title: code monkey  name: joe title: pointy haired   is converted to:  name title bob  code monkey joe  pointy haired   and vice-versa


I need to set a constant value as true or false for the particular scenario not sure correct working or not const test = data.findIndex(d => d.Fname === '' && d.Lname === '') < 0 ? false : true;  if fname and Lname both are blank then i want to set test as false not sure what is happening here.


I have just noticed that we have had 25 reopen votes in the review queue all of a sudden. I was doing reviews, it was zero when it got bumped all. I am wondering why this may have happened. See the screenshot below.  This is similar to my  an the one referred inside that, where the root causes ware a bug that had been fixed and a workflow. I am wondering if that bug is recurring or it is due to something else?  Thank you in advance.


I am trying to figure out the normalisation of $k[x,y]/(y^2-x^2(x-1))$, for an algebraically closed field $k$.    I can show that it is not normal and I have the information that the normalisation is $k[t]$, where $t=\frac{y}{x}$. I can't figure out how to prove that this is the normalisation i.e. that the fraction fields of $k[x,y]/(y^2-x^2(x-1))$ and $k[t]$ are the same, that $k[t]$ is integrally closed and that $k[t]$ is an integral extension of $k[x,y]/(y^2-x^2(x-1))$.   Also, how does one get to the idea of $t=\frac{y}{x}$? Algebraically if possible, since this is from a commutative algebra class, not algebraic geometry.


So I am working on something based on a tutorial . I am trying to finish my project and render it, but it only renders the main object (image 2), which is the lightsaber. It wont render the laser or the ground. Although I can see this in the render preview (image 1) What can/do I have to do to change this?  image 1 (render preview)   image 2 (complete render)


Why was Padmé made to clean an astromech?

Reading  (the Amidala stand-in) I remembered that I always wondered why she ordered the actual queen to scrub R2-D2. There were enough actual servants who could have done it, so why Padmé? If that wasn't enough, after giving the actual queen (Padmé) the order to go away, she tells Panaka to continue with the discussion. How does that make sense?  The significant piece of dialogue:     AMIDALA : Thank you, Artoo Detoo. You have proven to be very loyal...Padme!    ...    AMIDALA : (Cont'd) Clean this droid up the best you can. It deserves our gratitude...(to Panaka) Continue, Captain.   Note that this question is two-fold:   Why was Padmé chosen in the first place? Why would an important meeting with the ship's captain be continued without her?


Is the following: "The people of USA has..." correct?

I know that the word "people" can be singular to refer to a specific unit, be they nationality, ethnic, or tribe. With that being said, is it correct if I write in my essay:     The people of USA has   I've consulted dictionaries and all the websites pertaining to English grammar, but not even one gives me a clearer idea on this usage.


In software development, and I imagine in many other fields, we often make up temporary nicknames for new projects or features. These are not meant to be the real names for the end product and are often funny, playful, or sarcastic in nature. These are also not intended to be "codenames" that hide the nature of the project or feature. Is there a word for such nicknames?


I saw on Coursera machine learning classes that is possible to normalize data in two ways:  data = (data - mean) / max(data) - min(data)   or you can use an Octave function called std(), it does the following:  data = (data - mean) / std(data)   Which normalization is better to normalize a matrix containing house size(20 m² to 1000 m²), number of rooms(2 to 20) and the house's prices(10000 to 15000000)? And why its is better? I'm using linear regression to predict a house price, with size and number of rooms as parameters. Although, then a try to plot it using plot function in Octave, but it gives an error saying that the values are too high. So, if I normalize my data using both approaches I can plot it. So, which is better and I? When I should use std() or the other approach?


I just installed Virtualbox, downloaded genymotion-2.7.2-linux_x64.bin and tried chmod +x and chmod 777 on it before trying ./genymotion-2.7.2-linux_x64.bin within the folder. I get permission denied error as given below  bash: ./genymotion-2.7.2-linux_x64.bin: Permission denied   I even tried sudo before ./genymotion-2.7.2-linux_x64  To test my luck, used sudo bash and ran ./genymotion-2.7.2-linux_x64 as root. Still, no luck.  The Genymotion website says Ubuntu 15.10 (Wily Werewolf) or above (64bit) . I however have 14.04.  I did try other guides. But nothing was referring to 2.7.2 of Genymotion with 64 bit 14.04  I have VirtualBox installed already.


A file is modified by a script using an input file-     141,141_1,BAR,HONDA,ps2_0,unassigned,ps3_0,Unassigned,ps4_0,Unassigned,ps5_0,Unassigned,ps6_0,Unassigned,ps7_3,TILL WILL,.....   Input file-     141,ps7,TILL WILL   Now I need to search whether to column ps7_3 is updated with the correct value.  So from the input file, I separated the columns-  while read -r line; do sub1=$(echo $line|cut -f 1 -d ','); sub2=$(echo $line|cut -f 2 -d ','); sub3=$(echo $line|cut -f 3 -d ','); sub4=$(echo $sub2'.*,'$sub3|sed -e "s/\(.*\)\r/'\1'/"); echo $sub1; echo $sub2; echo $sub3; echo $sub4; grep $sub4 modded_file.csv.dat; done<input.csv   The output being-  141 ps7 TILL WILL 'ps7.*,TILL WILL' grep: WILL': No such file or directory   But when I run     grep 'ps7.*,TILL WILL' modded_file.csv.dat, it works. How can I grep a variable as shown above, in a file?


Please explain wasted space on an exFAT formatted external hard drive

I recently bought a 750 GB 2.5" hard drive and put it in an external enclosure.  It has , but I use Windows 7, so I assumed I would be safe.   I decided to try exFAT, because I was enticed by the reduced overhead For "Allocation unit size" I selected "Default allocation size" Tried with "Quick Format" un-selected first, but it was taking too long, so I stopped and started over with "Quick Format" selected After drive was formatted, looking at the format options again shows that the "Allocation unit size" is 256 KB   The drive works fine, but I had a question about the difference between "Size" and "Size on disk."  On my 120 GB NTFS formatted internal hard drive, the difference is only 0.16%.  However, on my much larger, exFAT formatted external drive, the difference is 17.38%.  At that rate, the most I will fit on this 750 GB drive is 637 GB (with 0 free space).  What format options should I use to maximize usable disk space?  What impact will my current settings have on performance?  What impact will your recommended settings have on performance?  Format settings    Internal hard drive    External hard drive (with big space difference!)


Is the galaxy depicted at the end of Empire Strikes Back a real galaxy?

I was reading , and it occurred to me that this galaxy below looks familiar:   I can't tell from the image whether this is an artistic creation or an actual picture of a galaxy taken by NASA or some other space agency. (Considering the date, it might be the former) but I'm sure I have seen a Hubble image or something somewhere online that looks like this galaxy.  Is this picture real or at least based on a real astrophysical image captured by a telescope somewhere?  If so, what is the "real world" name for the galaxy being depicted? If not, is there a similar galaxy that inspired this artistic version?  What's the closest thing that is really out there that matches this image?


Why do we use multiple epochs and why does it not lead to over fitting

I have found many answers to the question of what an epoch is, but none to this:  Why do we use multiple epochs when training a neural net? How does this not lead to overfitting?  From my understanding 2 epochs means we training with each data point using SGD at least twice.   Why do we not do this when training regression models?


CDF of absolute value of difference in random variables

Let $X$ and $Y$ be independent random variables, uniformly distributed in the interval $[0,1]$. Find the CDF and the PDF of $|X - Y|$?  Attempt Let $Z = |X - Y|$, so for $z \geq 0$, the CDF $F_{Z}(z) = \mathbf{P}(Z \leq z) = \mathbf{P}(|X - Y| \leq z) = \mathbf{P}(-z \leq X - Y \leq z)$, which is where the algebra becomes confusing. Since they are independent, the joint pdf of $X$ & $Y$ is simply 1, as long as $(X,Y)$ belong to the unit square. The solution suggests a plot the event of interest as a subset of the unit square and find its area. Any hints?


Regex: Expression selecting more than expected

I am using the following regex   '/\@(.*)\((.*)\)/'   And I am trying to get @ONE(TWO) one and two from the expression. Which works as long as it's the only time that it can be found before an end of line (I think)   I am quite green with regex and I really cannot understand what I am doing wrong.   What I need is to be able to get all the ONE/TWO couples. Can you please help me.   I am working with PHP and the following function   $parsed_string = preg_replace_callback(     // Placeholder for not previously created article     // Pattern example: @George Ioannidis(person)                  '/\@(.*)\((.*)\)/',      function ($matches) {         return $this->parsePlaceholders( $matches );     },     $string );   The results I am getting from


QGIS Atlas Feature for multiple polygons with same attribute

I have a shapefile of city blocks in a given city. Each polygon represents an individual lot, but the attribute table includes a column called "sector", that denotes the zone of the city that the lots are in. There are multiple lots per sector, shown in different colors in picture below:    I would like to automate the generation of a map of the city blocks for each sector. It appears that the Atlas feature will do what I want, but from what I gather the Atlas feature will create a map for each polygon. How do I have the Atlas produce a map for all polygons that share the same attribute together, instead of individually?


Fitting an empirical pdf with a mixture of distributions

I am interested in finding the mixture of distributions (Beta in my case) which best fits what is effectively a empirical pdf.  The data is actually instrument output and due to the nature of the technique individual observations are not recorded, but instead the count of observations at a particular value is returned.  Most approaches for fitting mixtures to data begin with the actual sample - is there a more appropriate starting point when the empirical pdf is the known?    Below I have included some plots of the data. To be upfront, the x axis is time, but is better understood as a measure of a chemical property that can be expressed continuously. Components have discrete values in x, but elute as distributions due to to various non-ideal effects in the experiment.  I am trying to recover the individual components, but more realistically to separate the well resolved components and the noise depicted as a fluctuating baseline in figure 3.  I am open to criticism regarding the approach as well, but no effective tools exist in my field to achieve this and after evaluating many other attempts I think this approach may be at least functional if not statistically valid.


I wrote some luacode in my main.tex and I'm a adding several other files due to \input{code.tex} I already asked this question  and it works on a standalone environment but not in my case. I can't figure out why. There is no problem in plotting a function due to tikz with declare function = {test(\x)=\x*\x;}  but it is neither drawing anything nor using the correct samples on the axis when I use declare function = {nbin(\t) = \directlua{tex.sprint(nbin(\t))};}  Here are parts of the files: main.tex: \documentclass[14pt]{book}   \usepackage[german]{babel}   \usepackage{graphicx} \usepackage{float}  \usepackage{hyperref}   \emergencystretch=0em   \usepackage{marginnote} \usepackage{amsmath} \usepackage{multicol} \usepackage{amsfonts}  \usepackage{amssymb} \usepackage{stmaryrd} \usepackage{amstext} \usepackage{siunitx}  \usepackage{tikz} \usetikzlibrary{trees} \usepackage[utf8]{inputenc}  \usepackage[T1]{fontenc}  \usepackage{amsthm} \usepackage{amssymb} \usepackage{mathtools} \usepackage{enumerate} \usepackage{dsfont} \usepackage{calrsfs} \usepackage{calligra} \usepackage{verbatim} \usepackage{mathpazo}  \usepackage{mathptmx} \usepackage[autostyle=true]{csquotes}  \usepackage{currvita} \usetikzlibrary{matrix} \usetikzlibrary{calc} \usetikzlibrary{positioning,shapes} \usepackage{pgfplots}     \pgfplotsset{compat=newest} \usepackage{delarray} \usepackage{pifont} \usepackage{polynom} \usepackage{stmaryrd} \usepackage{varwidth} \usepackage{fancyhdr}  \pagestyle{fancy}     \usepackage{pdfpages} \usepackage{pgf} \usetikzlibrary{tikzmark}  \usetikzlibrary{arrows} \usetikzlibrary{intersections} \usepackage{extarrows}  \usepackage{cancel} \usepackage{calc}   \usepackage{caption}  \captionsetup{     font={ sc, bf, footnotesize},     skip=0pt,   justification=centering, }     \usetikzlibrary{decorations.pathreplacing} \tikzstyle{abstract}=[rectangle, draw=black, rounded corners, text centered, anchor=north, text=black, text width=2.7 cm] \tikzstyle{comment}=[rectangle, draw=black, rounded corners, fill=green,  text centered, anchor=north, text=white, text width=3cm] \tikzstyle{myarrow}=[->, >=open triangle 90, thick] \tikzstyle{line}=[-, thick]  \usepackage{luacode} \begin{luacode*} function factorial(n)     if (n == 0) then             return 1     else         return n*factorial(n-1)     end end  function binom(n,k)     return factorial(n) / (factorial(n-k) * factorial(k)) end  function nbin(t)     local res = 0     for k = 0, math.floor(t), 1 do         res = res + (binom(k+2,2) * 1/8 * (1/2)^k)     end     return res end \end{luacode*}   \begin{document} \setcounter{secnumdepth}{4} \tableofcontents  \input{code.tex}\fontsize{12pt}{16pt}\selectfont \setlength{\parindent}{0cm}  \setlength{\parskip}{3mm plus1mm minus1mm} \sloppy \end{document}  And here is the part of code.tex \begin{center} \begin{tikzpicture}[  declare function={nbin(\t) = \directlua{tex.sprint(nbin(\t))};}   ]   \begin{axis}[     use fpu=false,     height=8 cm,     width = 8 cm,     samples at={0,1,...,40},     ]     \addplot[no markers]{nbin(x)};   \end{axis} \end{tikzpicture} \end{center}  It doesn't give any errors, just a clear Diagram with both axis going from 0 to 1 in 0.2 steps.


Why is the MacTeX distribution so large? Is there anything smaller for OS X?

I would like to know how to install LaTeX on Mac 10.6 or higher.  But the MacTeX is some 1.28 GB file! Is there a smaller distribution I could install?  What exactly is TeX Live?


Please consider the following code:  Base b; if (something)     b = DerivedA(); else     b = DerivedB();   It's well known that in such a case, 'slicing' occurs: In C++ we can't assign a variable of a base type an object of the derived type; the object would be 'sliced' off anything that isn't defined in the base type. (If we want to do such a thing, we have to use pointers or references).  I want to understand the actual reason for this. I.e., the reason why a Base variable can't hold a Derived object without slicing it.  My assumption is that the reason for this is that a Base object and a Derived object might not be of the same size, thus we can't make guarantees on being able to store an entire Derived object in a Base variable. A Base might take up 4 bytes, while a Derived is 7 bytes. So we settle to always slicing the derived object to fit the size of the base type.  We are able to do this with pointers, because they all occupy the same amount of memory.  Is this assumption correct? If not, what is the actual reason for slicing?


Meaning of the buffers/cache line in the output of free

Why does my server show              total      used      free   shared buffers    cached     Mem: 12286456  11715372    571084        0   81912   6545228 -/+ buffers/cache:  5088232   7198224    Swap: 24571408     54528  24516880   I have no idea on calculating the memory in linux. I think it says that 5088232 is used where as 7198224 is free, meaning it is actually consuming 5GB of RAM?


The value for the useBean class attribute [begineerbooks.com.Details] is invalid.] with root cause

i start a learning JSP from a few days and then i face a problem at useBrean when i run my prog the console show this problem .i saw many solution and i tried all but any solution did not solve that prob . so, i requested to everyone please give me solution as soon as possible. SEVERE: Servlet.service() for servlet [jsp] in context with path [/Bean_Example] threw exception [/userDetails.jsp (line: [10], column: [0]) The value for the useBean class attribute [ begineerbooks.com.Details] is invalid.] with root cause org.apache.jasper.JasperException: /userDetails.jsp (line: [10], column: [0]) The value for the useBean class attribute [ begineerbooks.com.Details] is invalid. package begineerbooks.com;  public class Details {           private String name,password;     private int age;     public String getName() {         return name;     }     public void setName(String name) {         this.name = name;     }     public String getPassword() {         return password;     }     public void setPassword(String password) {         this.password = password;     }     public int getAge() {         return age;     }     public void setAge(int age) {         this.age = age;     } }   and then <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title>   <form action="userDetails.jsp"> Name : <input type= "text" name = "name">
 Password: <input type= "password" name = "password">
 Age: <input type = "text" name = "age">
 <input type = "submit" value = "Submit">  </form>    and <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title>   <jsp:useBean id="userinfo" class = " begineerbooks.com.Details"></jsp:useBean> <jsp:setProperty property="*" name="userinfo"/>
your enry sid here
 <jsp:getProperty property="name" name="userinfo"/> <jsp:getProperty property="password" name="userinfo"/> <jsp:getProperty property="age" name="userinfo"/>


Abstract Integration in Elementary Probability Theory

In measure theoretic probability I often see these two notations for the expectation of a random variable expressed as an abstract integral.  $$ \int_\Omega X(\omega) \mathbb{dP(\omega)} = \int_\Omega X(\omega) \mathbb{P(d\omega)} $$  Is each case trying to express a different view of the abstract integral? What is an intuitive way to interpret $\mathbb{dP(\omega))}$ and $\mathbb{P(d\omega)}$?


Are these three commands \bigl( , \big( and \bigr( interchangeable?

I am looking for the visual differences between \big(, \bigl(, and \bigr( in math mode?


Most efficient way to check for DBNull and then assign to a variable?

This question comes up occasionally, but I haven't seen a satisfactory answer.  A typical pattern is (row is a DataRow):   if (row["value"] != DBNull.Value)  {       someObject.Member = row["value"];  }   My first question is which is more efficient (I've flipped the condition):    row["value"] == DBNull.Value; // Or   row["value"] is DBNull; // Or   row["value"].GetType() == typeof(DBNull) // Or... any suggestions?    indicates that .GetType() should be faster, but maybe the compiler knows a few tricks I don't?  Second question, is it worth caching the value of row["value"] or does the compiler optimize the indexer away anyway?  For example:    object valueHolder;   if (DBNull.Value == (valueHolder = row["value"])) {}   Notes:   row["value"] exists. I don't know the column index of the column (hence the column name lookup). I'm asking specifically about checking for DBNull and then assignment (not about premature optimization, etc.).   I benchmarked a few scenarios (time in seconds, 10,000,000 trials):  row["value"] == DBNull.Value: 00:00:01.5478995 row["value"] is DBNull: 00:00:01.6306578 row["value"].GetType() == typeof(DBNull): 00:00:02.0138757   Object.ReferenceEquals has the same performance as "=="  The most interesting result? If you mismatch the name of the column by case (for example, "Value" instead of "value", it takes roughly ten times longer (for a string):  row["Value"] == DBNull.Value: 00:00:12.2792374   The moral of the story seems to be that if you can't look up a column by its index, then ensure that the column name you feed to the indexer matches the DataColumn's name exactly.  Caching the value also appears to be nearly twice as fast:  No Caching: 00:00:03.0996622 With Caching: 00:00:01.5659920   So the most efficient method seems to be:   object temp;  string variable;  if (DBNull.Value != (temp = row["value"]))  {       variable = temp.ToString();  }


How prove this $\lim_{n\to \infty}\sin{n^m}$ divergent.

show that $$\lim_{n\to \infty}\sin{(n^m)}$$  divergent,where $m\in N^{+}$  I have kown $$\lim_{n\to\infty}\sin{n^2}$$  to be divergent and dense in $[-1,1]$. This is very  famous problem,the problem is first is post $AMM$( The American Mathematical Monthly,1970-1975) problem,and after some years  $AMM$ post $\sin{(n^{14})}$ in $[-1,1]$ was dense? and this is open problem.so I Guess  $$\sin{(n^m)}$$ is dense in $[-1,1]$.


Gradient steepest direction and normal to surface?

From this , I now understand the gradient to be the directional derivative that returns the steepest slope at a point. However, reading my textbooks, they all say that the gradient is normal to the tangent plane. In the above SE question, the gradient sounds like it should be parallel to a direction in the $xy$ plane, not actually up on the surface.   My question is therefore do I have a misunderstanding of the tangent plane, gradient or directional derivative?   In addition, I question how the gradient always passes through the origin or the $xy$ plane? If for instance in the graphic, the gradient had been another direction (say horizontal), then it wouldn't pass through the origin! In addition, the gradient of other points in the graphic would satisfy this example. Many thanks!


What Junk in Fallout 4 isn't really junk?

Some items are labeled junk and have a list of constituent materials. For example a baseball is made of leather and cork. But you need an actual baseball to make a baseball grenade.   Does anyone have a list of junk items used in recipes before they are broken down?


Transfer function of two RC circuits connected together

I need to find the transfer function of two RC circuits connected together.  This is the schematic:   Here is how I tried solving it, using maple, the two equations for nodal tensions are found at (1) as the solve({eq1, eq2}) parameters:   eq1 is the sum of currents at node A, eq2 is the sum of currents at node B.  Well my problem is that I get a result at (3) that is not the answer from the solutions booklet (which is at (4)).  I am quite rusty into solving circuits, could anyone take the time to explain me how to get to the correct answer? I must find the transfer function \$ G(s) = Y_{2}(s)/U_{1}(s) \$. \$ u_{1}(t) \$ is a voltage excitation, and \$ u_{2}(t) \$ is the same voltage as \$ V_{C_{1}}(t) \$.  Thanks!  P.S. If anyone could tell me what I did wrong in nodal analysis it would be great.


How to insert pipe symbol | in TeX (LaTeX)?  I have tried this sample with pdflatex tmp.tex  \documentclass{extarticle} \begin{document} \textpipe \end{document}   And it give undefined control sequence error  This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) restricted \write18 enabled. entering extended mode (./tmp.tex LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, loaded. (/usr/share/texmf-texlive/tex/latex/extsizes/extarticle.cls Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class (/usr/share/texmf-texlive/tex/latex/base/size10.clo) (/usr/share/texmf-texlive/tex/latex/base/exscale.sty)) No file tmp.aux. ! Undefined control sequence. l.3 \textpipe


How I can delete the line at top of page , and apply this work to all pages of my document

\documentclass[12pt]{thesis}  \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[C]{\thepage}  \begin{document}  My text.  \end{document}


Hardware enablement stack install is giving dependency issues

I'm trying to install the hardware enablement stack onto 12.04 but I'm running into the following dependency issue:  The following packages have unmet dependencies:  libgl1-mesa-glx-lts-trusty: Depends: libglapi-mesa-lts-trusty (= 10.1.3-0ubuntu0.1~precise1) but 10.1.3-0ubuntu0.1~precise1 is to be installed                             Depends: libx11-6 (>= 2:1.4.99.1) but 2:1.4.99.1-0ubuntu2.2 is to be installed                             Depends: libxdamage1 (>= 1:1.1) but 1:1.1.3-2build1 is to be installed xserver-xorg-lts-trusty: Depends: xserver-xorg-core-lts-trusty (>= 2:1.11) but 2:1.15.1-0ubuntu2~precise1 is to be installed   How can I circumvent this and get the HWE to install?


Find all $n$ such that $2^n+1$ and $2^n-1$ are primes

Find all $n\in \mathbb N$ such that $2^n+1$ and $2^n-1$ are both primes .  My Attempt: let $p=2^n+1$ and $q=2^n-1$ I will start with a claim. claim: $n=2\implies p=5, q=3$ is the only solution, because otherwise $2^n+1$ or $2^n-1$ would be divisible by $5$ or $3$. if $3\mid 2^n+1\iff 2^n+1\equiv 0 \pmod 3 \implies 2^{n-1}\equiv 1 \pmod 3$. But i don't know how to prove this claim.


Explain Lenz Law with Conservation of Energy

My question is: If the bar magnet is moved towards a coil connected to a galvanometer and instead of a opposing magnetic pole a attractive pole i.e. south of coil and north of magnet is created due to induced emf in coil then how is Conservation of energy violated/ perpetual motion body created? Isn't it similar of having two bar magnets with attractive poles ?


Can somebody tell me why the counting measure (so, if $S=P(X)$, then $\mu(A)$=infinity if $A$ isn't finite and $\mu(A)=$#$A$ if $A$ is finite) is a measure? (The second property of a measure isn't clear for me).


How to migrate from Ubuntu 19.04 to 20.10?

I'm trying to migrate a Ubuntu 19.04 install to the last Ubuntu version. The problem is the migration tool refuses to update to the next version: sudo do-release-upgrade  Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Get:1 Upgrade tool signature [1,554 B]                                                                                Get:2 Upgrade tool [1,336 kB]                                                                                Fetched 1,338 kB in 0s (0 B/s)                                                                                authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'  extracting 'focal.tar.gz'  Reading cache  Checking package manager  Can not upgrade   An upgrade from 'disco' to 'focal' is not supported with this tool.   How can I migrate instead of a fresh install where I would have to reconfigure everything? Thanks in advance for your kind help


How do I disable the camera shutter sound when taking a photo with my iPhone 6S?

Even after I disabled the ringer and muted the phone, the shutter sound can still be heard on my iPhone 6S. Why?  I tried to fix it in Settings, and followed the instruction, but the camera still makes shutter sound.  What can I do to turn the sound off?


Is there some way to add more light to the 3D scene during modeling?  Not to the final render, but just make the object more visible.  I followed few tutorials and I do exact steps but somehow their model during modeling phase is with more light even if no light in the scene is present.    To better explain myself - I'd like to make modeled object (without material and other stuff) to be more lighten up  Here is how I see object during modeling:   Here is the same object but I moved my position in viewport:     During tutorial (space corridor from blender guru) is his object far more visible during modeling from different angles. For me is my object far more darker - as it is visible on picture 1.


I am new to electronics, and I don't understand the theory of a Short Circuit. Why does a Short Circuit happen?


If $0\le a,b,c\le 1$, then $\frac a{1+bc}+\frac b{1+ac}+\frac c{1+ab}\le 2$

If $a,b,c$ are real numbers such that $0\le a,b,c\le 1$, then $$\frac a{1+bc}+\frac b{1+ac}+\frac c{1+ab}\le 2.$$  I did the following: Take $f(x)=\frac {x^2}{x+p},\ (p=abc)$ which is convex for $0\le x\le 1$. Therefore $$\begin{align}\frac {f(a)+f(b)+f(c)}3\le f(\frac {a+b+c}3)\Rightarrow\frac {a^2}{a+abc}+\frac {b^2}{b+abc}+\frac {c^2}{c+abc}\le \frac {(a+b+c)^2}{(a+b+c)+3abc}.\end{align}$$ How do I prove that the RHS is less than or equal to 2?


What am I doing wrong with the shell script? Noob

I created a new document, opened it with gedit and the script is very simple and it works in terminal, basically something like this:  #!/bin/sh sudo blah blah blah   But when I save it on the document, put on the execution tick in the properties and double click the file then gedit simply opens it again so what is there I should do to make the file work as a shell script to launch the command, I searched, but nothing answers my question because everywhere it says (or so I believe) that having the first line #!/bin/sh turns the document into a shell script.


Why doesn't my Wi-Fi adapter show up as wlan0 in 16.04?

I just installed Ubuntu 16.04 on a separate HDD, and I noticed two oddities:   Whereas on 14.04 (on my main HDD) my USB Wi-Fi dongle shows up as wlan0, on 16.04 it shows up as wlx112233445566. (Real MAC redacted) Also, using the hw ether parameter to change the MAC address doesn't work on 16.04.   Here's the relevant output from lsusb:  Bus 008 Device 002: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter   Can anyone shed some light on what's going on here?


how to add new row to such array   var items = new[] {                          new { Text = "report A", Value = "A" },                                                  new { Text = "report E", Value = "E" }                     };


Some Ubuntu 18.04 pre-installed apps don't launch

Ever since moving from Windows to Ubuntu the experience has been pleasant. I don't miss windows, at all. Ubuntu 18.04 was my first choice.    However some pre-installed apps like Calculator, Characters, System Monitor and  System Logs do not start at all and I don't get an error. I usually delete them and install the same app but with a higher rating (stars) in the software centre. Has anyone experienced this and what could be the cause?     I unfortunately do not have logs. But the problem can be replicated by following these steps:     Downloading the official ISO from ubuntu.com     Using mksub to create a persistent live USB      Booting from said USB and attempting to open the apps mentioned above.    Edit: 23 Oct 2019  I used these commands to install mksub.  sudo add-apt-repository universe  sudo add-apt-repository ppa:mkusb/ppa  sudo apt-get update  sudo apt-get install mkusb mkusb-nox usb-pack-efi    I did not use a terminal to create the live usb with persistence. I used guidus. This was done from an ubuntu live disk created using Unetbootin on windows.


Will Ubuntu run on this Dell Precision 3510

Does anybody have any idea how well Ubuntu will run on a Dell Precision 3510? If at all?  Full Spec:     Precision M3510     Processor: Intel® Core™ i5-6300HQ Processor (6M Cache, up to 3.20 GHz)     Windows 10 Pro (64bit)  8 GB (2x4GB) 2133MHz DDR4 Memory Non ECC  500 GB 2.5inch SATA Hard Drive (7200 RPM)  No Optical Device  Intel 8260 Dual band 2x2 802.11ac Wi-Fi + Bluetooth 4.1  No WWAN Card Included Non Touch WWAN HD/FHD LCD Backcover  Non-Touch with Camera and Microphone  Primary 4-cell 62W/HR Battery  15.6 Inch FHD (1920x1080) Non-Touch Anti-Glare LCD


How to localize label using algorithm and algorithmic packages

I am writing a paper in Italian and I need to include pseudo code in my latex document so I am currently using the algorithm and algorithmic packages. At the top of every algorithm the label Algorithm 1 is shown, but I'd like for it to be in Italian instead. I have previously included:  \usepackage[italian]{babel} \usepackage[utf8]{inputenc}    with no change whatsoever, is there any way to localize it?  \documentclass[a4paper,12pt]{article} \usepackage{algorithm} \usepackage{algorithmic} \usepackage[italian]{babel} \usepackage[utf8]{inputenc} \title{ASD} \author{haunted85} \date{Ottobre 2012} \begin{document} \maketitle \section{} \begin{algorithm} \caption{Questo è un algoritmo.} \begin{algorithmic}[1] \STATE int Count(int $N$) \STATE $sum = 0$ \FOR{$i \leq N$} \FOR{$j = i \leq N$} \STATE $sum = sum + 1$ \ENDFOR \ENDFOR \RETURN $sum$ \end{algorithmic} \end{algorithm} \end{document}


There is a combinatorics problem that need some Number Theory background: How many numbers there are such that is divisible by 30 and have exactly 30 divisors? I need some idea how to solve this problem.


Shortcut method to find the front side bus and memory bus speed of your computer

I can easily find out the RAM, Processing Speed of my Windows computer by clicking the Properties section of Computer.   Is there any shortcut method similar to the above to find the front side bus speed , memory bus speed , back side bus speed of my computer beside checking out the model number of your computer's motherboard and search for the model number on the Internet .  I will not mind using a third party utility tool also.


Duplicate contents based on differnt url on same website is that bad for ranking

I have blog website and has hundreds of blog items and blog can be accessed via different URL, it is mentioned that duplicate contents on website affects google ranking, defining single url as canonical url in code can solve this problem or we should about such scenario.  in below mentioned example you can see that i can access same blog via 3 different url,   Example URL   www.example.com/blog/11/title-of-blog www.example.com/blog/2018/11/title-of-blog www.example.com/archive/year/11/title-of-blog   Based on above example its same blog accessible from three different url,    How will it affect my google ranking   And defining first url as canonical in code will solve this problem or we should avoid using multiple url for same page all together   What is the best practice that we should follow if we have multiple url for same page


Write equation such that align top of number

How to write equation such that align top of number as picture below?  I try to type a code as follows. \documentclass[a4paper,oneside,11pt]{article} \usepackage[left=2.5cm,right=2.5cm,top=4cm,bottom=2.7cm]{geometry} \usepackage{amsmath} \usepackage{newtxtext,newtxmath} \begin{document}     \begin{enumerate}         \item          $\begin{aligned}             \nu_{\diamond A}(0)&=\nu_A(0)=1         \end{aligned}$         \item $\begin{aligned}             \mu_{\diamond A}(x+y)&=1-\nu_A(x+y)             \leq 1-T(\nu_{A}(x),\nu_{A}(y))             = C(1-\nu_{A}(x),1-\nu_{A}(y))\\             &= C(\mu_{\diamond A}(x),\mu_{\diamond A}(y))         \end{aligned}$     \end{enumerate} \end{document}  It gives me  I don't know how to do write equation such that the equation is align top of number. So, how to make it?


At the beginning of DS9 Season 6, under what justification did the Dominion occupy DS9?

At the beginning of DS9 Season 6, the Dominion (including the Jem Ha'dar and the Cardassians) took DS9. At this time Bajor was neutral and in a non-aggression treaty with the Dominion.   How was this justified? Given Kira's and Odo's (reluctant) initial acceptance of this occupation and willingness to collaborate with it, it seemed that this occupation was legitimate. How could it be? Shouldn't Bajor control the station? As a neutral power, doesn't giving access to an important base violate the neutrality? At best, the Dominion could only be a guest in the station, but it looks like they are running the station.


How can a Win32 process get the pid of its parent?

I'm currently passing the pid on the command line to the child, but is there a way to do this in the Win32 API?  Alternatively, can someone alleviate my fear that the pid I'm passing might belong to another process after some time if the parent has died?


Do I use an apostrophe if I'm referring to several medical IVs?

First sentence (with apostrophe):     The IV's continued to drip as she thrashed on the bed.   OR  Second sentence (no apostrophe):     The IVs continued to drip as she thrashed on the bed.   Which one of these sentences is correct? Why would you or why wouldn't you use an apostrophe in this case?


Fit mixture of distributions to your time-series data in R

I have time-series data containing 1440 observations and the plot of the data is   I want to fit the Gaussian Mixture Models (GMM) to the above plot, and for the same I am using Mclust function of  package. Finally, I want a fit somewhat like this:   On using Mclust function, I do get following statistics     mclus_data <- Mclust(givendataseries)    > summary(mclus_data) ---------------------------------------------------- Gaussian finite mixture model fitted by EM algorithm  ----------------------------------------------------  Mclust E (univariate, equal variance) model with 8 components:   log.likelihood    n df      BIC      ICL        9525.438 1440 16 18934.52 18183.67  Clustering table:    1    2    3    4    5    6    7    8  1262    0    0    0    0   13  114   51    In the above statistic, I can not understand following:   Significance of log.likelihood, BIC and ICL. I can understand what each of them is, but what their magnitude/value refers to? It shows there are 8 clusters, but why cluster no. 2,3,4,5 has 0 values? What does this mean? From the plot it is clear that there must be two Guassians, but why Mclust function shows there are 8 Guassians?   Update: Actually, I want to do model based clustering of time series data. But currently  I want to fit the distribution to my raw data, as shown in Figure 1 on page no. 3 of  paper. For your quick reference, mentioned figure in said paper is


How good an experience vs. How good of an experience

Which one of these sentences is considered to be more correct?   1) You cannot imagine how good an experience that has been.  or  2) You cannot imagine how good of an experience that has been.


I connect a DC motor to a flywheel with a given moment of inertia. I then supply that motor with a constant voltage and current for an infinite time interval. What do I need to know about my motor to predict the top angular speed of my flywheel? How do I calculate the top angular speed of the flywheel?  EDIT:  I read  that an unloaded motor will reach a terminal angular velocity when the back EMF rises to the same value as the applied voltage. This concept makes sense to me, but where in a motor's specifications can I find the constants in the equation for back EMF? $$E_b = \omega \phi k_b$$ Moreover, can that calculation be used to find the terminal angular velocity of a loaded motor?


Is there a way to exclude other particle systems from the effects of a Wind effect?

I have a scene with a number of particle systems. I'd like to have a separate wind effect for my main scene and another for an extra: an emitter + wind-effect to blow leaves into my scene. I can't find any way to exclude, so here I am. At the very worst, I can just render the main scene and then render the wind effect and composite it, but I figured I'd check first.


Eeek! Homepage view user details no longer float to the right

, the user details of the user who made the last activity used to float nicely to the right:  However, now they don't:  Can this please be fixed?


If time is like space, why entropy always increases with time?

If time is like space, why entropy always increases with time  I should not be able to distinguish whether I am going forwards or backwards in time.   As entropy always increase with time. I can distinguish past from future in a four dimensional space-time.  Edit:  It looks like, it is an unresolved problem  There are some solutions  but nothing generally acceptable


continuity of a function when restricted to closed sets

Suppose $X = A \cup B$, where $A$ and $B$ are closed subspaces of $X$. Let $f: X \to Y$. Suppose  $$ f|_A : A \to Y $$ $$ f|_B : B \to Y $$  are continuous. Then can we conclude that $f$ must be continuous?  Any help would be greatly appreciated. thanks in advance.


trying to make a python for loop to run all .py files in a folder

Currently, the script works if the .py files are on the desktop but I can't get it to work in the 'code' folder. Every time I try and run it with no .py files on the desktop it gives me the error "python3: can't open file '/home/antonf/Desktop/1.py': [Errno 2] No such file or directory" import os  for files in os.listdir(r'/home/antonf/Desktop/code/'):     os.system('python3 {}'.format(files))  I tried to add a line that would open to the 'code' folder but it also didn't work. Like this. import os  for files in os.listdir(r'/home/antonf/Desktop/code/'):     os.system('cd /home/antonf/Desktop/code/')     os.system('python3 {}'.format(files))


I am trying to use an image as a file type button in my application, but on click of image the function is executing but button  document.getElementById("myFile").click(); is not executing. Whats wrong with my code?  HTML:
              <input type="file" id="myFile" style="display:none" />
   Script:   function loadFile()         {              alert("test");             document.getElementById("myFile").click();         }


Is the cls keyword equivalent to the class name?

Are the following methods always equivalent within a class? In other words, within MyClass can I interchangeably use cls in a class method and MyClass in a static method? class MyClass:      @classmethod     def my_class_method(cls):         cls.attribute = "a"      @staticmethod     def my_non_class_method():         MyClass.attribute = "b"


Select a html element that will be created after ajax job

I'm tying to add custom right click context menu with jQuery on (.message) element what will be available after foreach loop.  In my index html file i have div by id (show_case) chat.php    foreach ($messages as $key => $value) { ?>

<?php echo $value['username']; ?>
 say:
 <?php echo $value['message']; ?>

 <?php }     }   chat.js used jQuery/ajax  chat.fetchMessages = function () {      var data = {method: "fetch"}     $.ajax({         url: 'ajax/chat.php',         type: 'POST',         data: data,         success: function (data) {             $('#show_case').html(data);         }      }); }   Now I want to select div with class message in foreach loop to handle my context menu options menu.js  $('document').ready(function() {     $(".message").on("contextmenu", function (e) {          e.preventDefault();         var menu = $(".menu");         menu.hide();         //let get xposiion;         var xpos = e.pageX;         var ypos = e.pageY;          menu.css({             top: ypos,             left: xpos         });                 menu.show(200);   I can't select it but it doesn't work. What should I do?


I noticed a small visual bug. You have the same page in two tabs, you accept an answer in one, you go to the other, someone posts an answer and you accept it. You go to the first tab, you click on the "you have recieved a new answer", and then you find that it has the marked as solved mark but the other answer still has it as well. I hope I've been clear enough.  EDIT: This is apparently a duplicate of , but that said question is marked as status-norepro so it wasn't fixed, I'm confirming that that problem still exists to this day, 5 years later.


Does the polarity of this crystal matter?

I am using TXC 7B 16.0 mghz crystal for my design. I just received photo proofs from my PCB assembly house and it appears they soldered this crystal 180.0 degrees reversed.     Edit: the real


Did Yoda definitely know who the other hope was?

When Yoda said "there is another," I always figured it had to do with Darth Vader. The ending makes much more sense that way.   The counter-argument that I keep seeing is that Yoda was specifically referring to Leia. I don't think that this is necessarily true.   To me it seems like this: Yoda just didn't know who the other hope was. He felt a really strong force, and felt that it had some good in it. It doesn't mean he knew whom it belonged to. He was a Jedi master, not a prophet. Even if it were powerful enough to belong to a Skywalker, we can't really blame Yoda for not considering Vader a candidate. Seems to me that when he said "there is another," he meant exactly that, and nothing more: there is another hope.  Again: I don't think Yoda necessarily knew it was Vader.  But I don't think he was sure about it being Leia either.  Ben believes Yoda meant Leia, but there is a couple of reasons to think that he and Yoda differed on that.  In response to "That boy is our last hope," Yoda's cryptic words are "No. There is another."  It is an odd thing to say to Ben, who was well aware that Padme had two children.  Yoda would have just said "His sister there always is."  Ben's belief that Yoda meant Leia is mistaken, but understandable: Vader was quite a bad guy, and Yoda had reservations about Anakin from the get-go.  It seems to me that the viewer is being intentionally misled in order to make Vader's change of heart that much more impactful.  The plot itself also suggests that Vader was the real other last hope.  Leia was very helpful, but her help was a bit more general, not reflecting a "last hope" role.  In addition, her help had very little to do with her being a Skywalker.  She could have done all the stuff she did being a Dolan, Smith, or Schwartzbraum.  Her being Luke's sister benefited Han Solo, but that's about it.  However, Darth Vader very much played the role of "another last hope."  When Luke was beaten and the need for "another" became real, it was Vader's decision to turn from the dark side that made the difference; he very much delivered on his role as "another."  And he did it precisely because he was Luke's father.  The last hope did end up resting on a Skywalker - not because of his powers, but because of his love for his son.  It makes a lot more sense than Leia's rather unfulfilled "last hope" role.


Sometimes you ask a question on Stack Overflow, or Server Fault, and I'm sure it will happen on Super User, that lends itself to multiple correct responses, like a list. Is there anything to handle such a thing? The situation I am thinking about is when the response would end up being a list and multiple people would add input, but there is more than one correct answer.   Is the proper thing to do for this type of question just not to award anyone a correct answer or award the correct answer the best answer? What happens if you award the correct answer and someone comes along latter with a better answer?  Example: This is oversimplified to make the point but hopefully you get the idea.  Q: What is a good place to find information on programming?  A1: Stack Overflow (stackoverflow.com)  A2: MSDN (msdn.microsoft.com)  A3: Channel 9 (channel9.msdn.com)  Now obviously this question has a best answer, but the others are good too. I kind of had a hard time thinking of this example, but in the past this has bothered me. Maybe it really doesn't occur often enough to be an issue.


I have been following  about using \NewDocuentCommand with lstlisting and the accepted answer is nice except it is too big and it doesn't quite work for me.   I came up with this example to test xparse:    \documentclass{article} \usepackage{xparse} \usepackage{listings}  \ExplSyntaxOn \NewDocumentCommand{\code}{m +v}{     \begin{lstlisting}[style=#1,numbers=none,xleftmargin=0.35cm,framesep=0mm]         #2     \end{lstlisting} } \ExplSyntaxOff  \begin{document}  \code{C}{ int x = 200; unsigned int y = 0; }  \end{document}   Like stated in the  I first used m as a normal parameter and then +v as a multiline verbatim parameter, but it fails. It looks like I am still missing something...


Is it safe to cook pork chops that thawed on counter overnight?

Is it safe to cook pork that thawed on the counter overnight?


When answering this question, please note if the solution is:   For Windows and/or Mac OS X users The price of the solution If you have successfully—and actually—used the solution   How can I export SMS text messages from my iPhone?


Hello I write in es6 module to set in all elements (.product-category__item) the same height but I can't get any height :/  var measureElements = document.querySelectorAll('.product-category__item'); for(let item of measureElements) {     console.log(item.style.height)  // return nothing }


Proving that the Intersection of any Collection of Compact Sets is Compact

I was trying to do this problem this way:  Let $\mathcal{B}=\{B_i\}$ be a collection of compact sets. By Heine-Borel, each of the $B_i$'s are closed and bounded. We already know that the intersection of a collection of closed sets is once again closed, so $\cap \mathcal{B}$ is closed.  If I can prove $\cap\mathcal{B}$ is bounded as well, I can use Heine-Borel to say it is compact. So I was not sure how to show it was bounded, but a friend showed me his way of doing it. He did it the following way:  Let $b,a\in\mathbb{R}$ be an upper and lower bound for $B_1$, respectively. Since $\cap\mathcal{B}\subset B_1, a$ is a lower bound for $\cap \mathcal{B}$ and $b$ is an upper bound for $\cap\mathcal{B}$. Therefore, $\cap\mathcal{B}$ is bounded and then by Heine-Borel, it is compact.  My question is on the paragraph right above. I don't understand why what he did means that $a$ and $b$ are lower and upper bounds for $\cap\mathcal{B}.$ Can anyone explain why this is? Thanks.


Does JQuery only recognize hard-coded elements?

So have some divs on my webpage that I'd like to have some functionality with once clicked, but these divs aren't hard coded into the HTML, they are rendered using javascript as their appearance depends on what is in a database on the backend.  I set a function on click of these divs but absolutely nothing happens. I can't hard code these into the HTML as I need their appearance to be dependent on the database contents.  Here is my code to render the divs:  $.ajax({     method: "GET",     url: "../server-scripts/getTickets.php",     success: function(result) {         var safe = JSON.parse(result);         var tickets = safe["tickets"]         for(i = 0; i < tickets.length; i++) {             var stage = tickets[i]["stage"];             var name = tickets[i]["name"];             var field = "#"+stage;             $(field).append("
"+name+"
");         }     } });   And here is the code which is supposed to happen when you click on one of the divs:  $(".deployed-ticket").click(function() {     alert("Select a column to move the ticket"); });   I look at the developer console in my browser and absolutely nothing, the backend works just fine (tested) and this code for other, hard-coded elements works just fine.  Do I need to use different code in order to manipulate div elements rendered through javascript?   Thanks a lot! Much appreciated


Bounty grace period - no answers - award it to who exactly?

The bounty I offered on  is now in its grace period and the information box tells me:     you must award this bounty as soon as possible   But there are no answers - what do I do?


Passing value of a string in an array to a method in java?

thank you for taking the time to read this. Sorry if my question is dumb, I tried searching but couldn't quite figure out why I'm having this problem. I was trying to test some code for another application, but I'm having issues. Perhaps I just don't understand arrays properly.  I have a method named halfStepUp in a class named Transpose that, for testing purposes, should return "c#" if given "c" and "d#" if given "d". This is the code:  public class Transpose{     public static String halfStepUp(String note){         String n = null;         if (note == "c") n = "c#";         if (note == "d") n = "d"#;         return n;     }    }   I have the following code in my main method:  String [] scale = new String[2]; scale[0] = "c"; scale[1] = "d";  System.out.println(Transpose.halfStepUp(scale[0]));   This prints "null." What am I doing wrong?  I know the method works because if I use  System.out.println(Transpose.halfStepUp("c"));   It works fine. The solution is probably embarrassingly easy but I couldn't find a good way to word it when searching for help. Thanks again for reading, and any answers are greatly appreciated!


One way time dilation is derived is as follows. A light source inside a train sends photons vertically to a mirror on the ceiling of the train. Observer A is inside the train and observer B is outside. The train is moving with speed $v$. B sees the photons hit the mirror with an angle greater than 0 with respect to a vertical line to the floor, as the light reflects its path forms a non-zero angle which is what i don't understand, why does B see the light travel in a different trajectory than the one A sees?


The exercise I'm doing describes the random variable $X$ as the following  | Number of cars |  0  |  1 |  2 |  3 |  4+ |  | % of families  |  15 | 45 | 25 | 13 |  2  |   Then it asks me to evaluate $E[X]$. But if there could be cases with 4+ cars, wouldn't that make it impossible to calculate the expectancy?


My change password interface is not working on java eclipse web application

I've created this change password interface, but for some reason it doesn't seem to be updating the password in the database, which means something is wrong with my code. Could someone please take a look, thanks! The problem is not comparing strings, as I have corrected that and it is still not working, so can I please have this question reopened, thanks :)  ChangePassword.html  <!DOCTYPE html>      <meta charset = "UTF-8">  <title>Change Password</title>        <form action ="NewPassword" method = post>
Change Password
     Enter Old Password:
     <input type = "password" name = "oldpassword" size = "20">

     Enter New Password:
     <input type = "password" name = "newpassword" size = "20">

     Confirm New Password
     <input type = "password" name = "confirmpassword" size = "20">

     <input type = "submit" value = "Update Password">

     </form>.      NewPassword.java  import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*;  public class NewPassword extends HttpServlet {      protected void doPost(HttpServletRequest request, HttpServletResponse response)             throws ServletException, IOException {                  response.setContentType("text/html;charset=UTF-8");                 PrintWriter out = response.getWriter();                  String oldpassword = request.getParameter("oldpassword");                  String newpassword = request.getParameter("newpassword");                  String confirmpassword = request.getParameter("confirmpassword");                   HttpSession session = request.getSession(false);                 String employeeid = "";                   if(session != null) {                      employeeid = (String)session.getAttribute("employeeid");                  }                  boolean st = false;                  try {                      Class.forName("com.mysql.jdbc.Driver").newInstance();                      Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/payroll_system", "root", "");                      PreparedStatement ps = con.prepareStatement("SELECT pwd FROM payroll_system.employee_login WHERE employeeID = ?");                     ps.setString(1, employeeid);                     ResultSet rs = ps.executeQuery();                      st = rs.next();                      if(st) {                           String currentpassword = rs.getString("pwd");                          if((currentpassword.equals(oldpassword)) && newpassword.equals(confirmpassword)) {                              PreparedStatement pd = con.prepareStatement("UPDATE payroll_system.employee_login SET pwd = ? where employeeID = ?" );                              pd.setString(1, newpassword);                             pd.setString(2, employeeid);                             ResultSet rd = pd.executeQuery();                              st = rd.next();                              if(st) {                                  out.println("successfully updated password");                             }                         }                       }                 }catch(Exception e)                  {                      e.printStackTrace();                  }                out.close();        }    }


Something is wrong with "Link object data" in Blender 2.81

When I try to copy object data from one mesh object to multiple objects, the rest of the objects disappear, and the object data is only copied to one object. I don't know what I'm doing wrong. Any help would be appreciated.  Problem below (.gif):


$\left \| x+y \right \|^2+\left \| x-y \right \|^2=2\left \| x \right \|^2+2\left \| y \right \|^2$

In a space with inner product show that $\|x+y\|^2+\| x-y\|^2=2\left \| x \right \|^2+2\left \| y \right \|^2$ after a lot of tries I ended up with : $\begin{Bmatrix} \langle x,x\rangle +\langle -y,x\rangle=\langle x-y,x\rangle \\  \langle -y,-y\rangle+\langle -y,x\rangle=\langle -y,x-y\rangle\\  \langle x,x\rangle+\langle y,x\rangle=\langle x+y,x\rangle\\  \langle y,y\rangle+\langle y,x\rangle=\langle x+y,y\rangle \end{Bmatrix}$ If we add them all I think we get what we want, if we consider the fact that $\langle -y,-y\rangle=\langle y,y\rangle$ is this correct? Does this equation have a geometric meaning? I think the inner product measures the angle and the length (not sure about that) but I can't warp my head around what this exactly says.


Where to find the checksums of Ubuntu ISO images?

I just downloaded the ubuntu-10.10-desktop-i386.iso, and am having a hard time burning it, so I'd like to check that the file is intact, but I cannot find the md5sum of the file.    Is there a URL or official FTP mirror which includes the md5sum of the Ubuntu disk images?


Why am I able to execute a file which has just read permission?

I am able to execute a file which has just read permission:   nkrish@maddev2:~$ ls -l NewFile.sh  -r--r--r-- 1 nkrish nkrish 14 2016-01-14 12:01 NewFile.sh  sh NewFile.sh .. File gets run...    Shouldn't file permissions' be r-x in order for this to execute?  Currently user's permission is readonly (r--).  Why is this?


The media is gushing about the snap package for Visual Studio Code, and how wonderful it is (apparently has a plug in that cures gout ;-). So I thought I'd give it a whirl. I dutifully typed:  $ sudo snap install --classic vscode error: cannot install "vscode": snap not found   Where the articles all too early? Has vscode not yet landed in snap?


my phone keeps reminding me of low space... any way to move apps and data to sd card?

My phone doesn't ask me to install to internal or external memory when installing an app. It automatically install to internal memory.. my phone keeps reminding me of low space and I can't install any other app cause my phone is low on space..... is there any way to move all apps and data to SD card? Any help......


Why does $\vert z\vert = z^5 $ have 6 solutions in $\mathbb{C}$  I tried to solve it with the polar method and I only found 5 solutions.  $$  z_{(n+1)} = e^{\left(\frac{2\cdot\pi}{5} +\frac{2\cdot\pi\cdot n}{5} \right)} \quad with\quad n=0,1,2,3,4 $$  There must be something special with the $\vert z\vert$ , but I can't find what.


As a child I had solid rubber inner tubes in my bike. They were a pain to get on but after I never had a flat again!  Now I've recently started biking again and have had two flats in two days, each resulting in a three-mile walk back home. I've been searching for solid rubber tubes for a few hours now, but have only found them at wal*mart, and they don't have the correct size? (700x38c)  Why have they disappeared? I thought they were a fantastic product . . .