Here’s an example of an equation I’m trying to align (I have lots throughout my 50-page NT paper):  $$\frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\ldots \hspace{9.5cm}$$   I want to be able to get rid of the hspace.  It’d be really frustrating if all LaTeX has is this hspace thingy plus manual trial-and-error adjustments. And no, I don’t want to default left-alignment for all equations across the document, no.  Here’s my settings:  \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{setspace} \usepackage{amssymb} \usepackage{indentfirst} \usepackage[superscript]{cite}   Here’s the codes that are creating the centered formatting:  \[\frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\ldots \]  \begin{flalign*} \frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\ldots  \end{flalign*}   I'm editing this question, so @egreg sees my code, which is not working to create equation numbering:  \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{nccmath} \usepackage{setspace} \usepackage{amssymb} \usepackage{indentfirst} \usepackage[superscript]{cite} \usepackage{geometry} \geometry{top=15mm,left=15mm}  \newenvironment{eqleft*}  {\begin{equation*}}  {\hspace{10000pt minus 1fil}\end{equation*} \ignorespacesafterend}  \begin{document} \begin{eqleft*} \frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\dotsb \end{eqleft*}  \begin{ceqn} \begin{align} \label{eq:eq:k_div_n_closed} A=\sum_{j=1}^{k}\tan{\frac{2\pi nj}{k}}  \end{align} \end{ceqn}\\ \indent The above summation can be rewritten as a closed-form as follows:  \end{document}   First issue   Second issue

In display math (employing $$...$$) content normally gets aligned centered. But, I need it to be left aligned. Any suggestions?  Example  $$f(x) = \frac{{{{\sin }^2}x{\mkern 1mu} \cos x}}{{\sin x + \cos x}} -          \frac{1}{4}\tan (\frac{\pi }{4} - x){\mkern 1mu} {\mkern 1mu}           \forall {\mkern 1mu} x \in R - \{ n\pi  - \frac{\pi }{4}\} ,n \in I$$


So even though I have the same objects, array.includes() does not work in Vue unfortunately. My guess is that behind the scenes Vue alters the object, thus includes() sees it as a different object.  export default {     props: ['sellitem'],     data(){         return {             sells: [ this.sellitem ]         };     },     watch: {         sellitem(value){             if( ! this.sells.includes(value)) this.sells.push(value);         }     }, }   Periodically the component gets new Prop values so I add them to the array sells. But of course when something is already in the array it should not be pushed inside.

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


I know that in this case (and all other similar cases) this would be the latter, but I am having a hard time finding any resources that explain why. What is the reasoning behind why we'd use document processing rather than documents processing, employee management rather than employees management, etc.?

I have a web application that displays the status of batch processing jobs on our computer cluster. To me, the title should read:     Job status   not     Jobs status   but I really don't know why and I'm not sure I'm right. Could you kindly explain?


I've been creating certificates this way for over a year:  export website="my_domain1111.com" sudo certbot certonly --standalone -d $website -d www.$website --email hello@$website   and it's always created one for $website  /etc/letsencrypt/live/my_domain1111.com   Today for some reason it created a one with "www" instead of a bare domain      export website="another_my_domain222.com" sudo certbot certonly --standalone -d $website -d www.$website --email hello@$website  # =>>> /etc/letsencrypt/live/www.another_my_domain222.com   Why? has there been any change recently in certbot?  I've tried changing the order of the "-d" params - the same effect:  sudo certbot certonly --standalone  -d www.$website -d $website --email hello@$website  /etc/letsencrypt/live/www.another_my_domain222.com # with "www"   Version - 0.25

This time when I used certbot it created a certificate for "www.$website" instead of $website. This is not what I need.  Here it is:    $ website="my_website123.com"   $ sudo certbot certonly --standalone -d $website -d www.$website --email admin@$website              Saving debug log to /var/log/letsencrypt/letsencrypt.log   Plugins selected: Authenticator standalone, Installer None   Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org   Cert not yet due for renewal    You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.   (ref: /etc/letsencrypt/renewal/www.my_website123.com.conf)    What would you like to do?   -------------------------------------------------------------------------------   1: Keep the existing certificate for now   2: Renew & replace the cert (limit ~5 per 7 days)   -------------------------------------------------------------------------------   Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2   Renewing an existing certificate   Performing the following challenges:   http-01 challenge for my_website123.com   http-01 challenge for www.my_website123.com   Waiting for verification...   Cleaning up challenges    IMPORTANT NOTES:    - Congratulations! Your certificate and chain have been saved at:      /etc/letsencrypt/live/www.my_website123.com/fullchain.pem      Your key file has been saved at:      /etc/letsencrypt/live/www.my_website123.com/privkey.pem      Your cert will expire on 2018-10-18. To obtain a new or tweaked      version of this certificate in the future, simply run certbot      again. To non-interactively renew *all* of your certificates, run      "certbot renew"    - If you like Certbot, please consider supporting our work by:       Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate      Donating to EFF:                    https://eff.org/donate-le   Why did it create one for "www" instead of the bare domain?   On all my own servers this exactly command has always created a cert. without "www" - this is what I need. I even tried yesterday on a different server -- without "wwww".  How can I make it create a cert. without "www"?


Is it possible to replace the audio of an existing video with a new track? I have some videos that I want to do some audio cleanup on. Can I replace the old audio with the new once I've cleaned it up?

I have an uploaded video and I want to cut sections of audio (strong language) or add beeps on top without reuploading the video.


I want to scale two layers up by the same amount, using Edit > Transform > Scale.  Can I link the layers so that scaling one of the layers also affects the other by exactly the same amount?

I have 50 or so layers (imported images as smart objects) that I would like to scale down, while they stay in place. Is there a way of doing this? I know After Effects has, is there a similar Scale property in photoshop?


I need to cast a string to a byte array in hex representation. For example: Value: 06000002 What I need is: 30 36 30 30 30 30 30 32  I tried to implicit convert all chars to byte as following: byte[] bytes = new byte[daten.Length]; for (int i = 0; i < daten.Length; i++) {     int value = Convert.ToInt32(daten[i]);          bytes[i] = (byte)daten[i]; }  However I always get this result: 48 54 48 48 48 48 48 50  I do not need the result as string! I need it as byte array! How do achive this?

How can you convert a byte array to a hexadecimal string, and vice versa?


I have a table of points that looks something like this:  year,   latitude, longitude 2018,   42.02,    -87.68 2018,   41.91,    -87.78 2018,   41.64,    -87.68 2017,   41.63,    -87.56 2017,   41.89,    -87.67 2017,   41.67,    -87.80   Which I used Import XY to import from CSV as a set of points.  Now I want to perform some operation on it, but looping over the year attribute.  So far I got something like this:  import arcpy imported_points = "imported_points.shp"  for yr in (2017, 2018):   new_file = "poly_" + yr + ".shp"   arcpy.SelectLayerByAttribute_management(imported_points ,                                            "NEW_SELECTION",                                           "[year] = " + yr)   # Some operation, using this as an example             arcpy.DirectionalDistribution_stats(imported_points , new_file, "2_STANDARD_DEVIATIONS", "#", "#")   However, when I try this I get the following error:  ExecuteError: Failed to execute. Parameters are not valid. The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer. Failed to execute (SelectLayerByAttribute).   What does this mean? What is the best way to do some operation like this?

I have a script that calculating vertices angles on Polyline layer and the selecting features in that layer at a specified angle. at the end of the script i'm using select by attribute and getting error 000840 the value is not raster layer, the value is not mosaic layer    SelectLayerByAttribute_management(my_shp_name, 'NEW_SELECTION', myquery)


My eventual goal is to use RemoteFX, which I understand is in RDP8. However, I may already have RDP8. How can I tell which version of Remote Desktop Protocol I'm using?

Does any know how to get the RDP version Windows is running with?


I am getting this dkpg error when I try:  sudo dpkg --configure -a   Unable to find a workaround.   Using Ubuntu 16.04

I am getting this error in Ubuntu 12.04 , while doing the below operation.     frank@august:~$ sudo apt-get install ttf-mscorefonts-installer [sudo] password for frank:  E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct    the problem.  frank@august:~$ sudo dpkg --configure -a dpkg: error: parsing file '/var/lib/dpkg/updates/0045' near line 0:  newline in field name `#padding' frank@august:~$    &  frank@august:~$ head /var/lib/dpkg/updates/0045 #padding #padding #padding #padding  frank@august:~$    I can't see where is the error , help me to solve this. Thank you.


Please don't mark as duplicate. I am asking specifically for the 4vektor formula to see at speed c in space, I will get 0 for the time dim.  I was reading this question:    specifically the #2 question   "If a body is at rest in the classical 3 dimension, it would travel through time at cc, but if traveling at cc in space, it would be resting in the "time" dimension.."  I understand the first part. But specifically my question is about this part:"but if traveling at cc in space, it would be resting in the "time" dimension"  And John Rennie's answer where he says   "As it happens, you are absolutely correct."  v⃗ =(c(dt/dτ),dx/dτ,dy/dτ,dz/dτ)  I understand that if I am at rest in space then I am still moving at speed c in time. The magnitude is always c. But I don't understand if I am moving at speed c in space, how can the four-velocity explain that I am at rest in time, so my time component c(dt/dτ) is 0?  Question:   How can you explain with the four-velocity that when something is moving at speed $c$ in space, then it is at rest in time?

I read with interest about Einstein's Theory of Relativity and his proposition about the speed of light being the universal speed limit.    So, if I were to travel in a spacecraft at (practically) the speed of light, would I freeze and stop moving?  Would the universe around me freeze and stop moving?  Who would the time stop for?


I suck at integrals. , it says that $$\int \mathrm{e}^{cx} \sin bx \,\mathrm{d}x = \frac{\mathrm{e}^{cx}}{b^2 + c^2}(c \sin bx - b \cos bx),$$ which is easy to check – but how could I have derived that?

Is there a general formula for finding the primitive of $$e^{ax}\sin(bx)?$$  I've done this manually with $a=9$ and $b=4$ using Euler's formulas. But it takes a bit of time. Is there a pattern here?


I have windows 8.1 . On my system I have configured some shortcut keys like CTRL+ALT+A will launch the Equra application. On my windows 8.1 when I press CTRL+ALT+A it starts the Equra app.  I also have configured it to run as maximized.It works fine on my system. But when I connected with one client to deploy this application on his windows 10 system. This shortcut key issue arrised.I have configured the shortcut key how I did on my pc but it did not work on his pc . I dont have windows 10 but next time in future when I will connect with him through anydesk I want to fix it. Why this shortcut key problem arrised on windows 10 pc and how to fix it. English is not my native language excuse me please : )


When writing comments, you can type certain "magic links" to link to common help pages. For example, if a new post is lacking a minimal, complete and verifiable example, I can just write  Please provide an [mvce].   And this will be replaced with the appropriate link. This is extremely convenient on Stack Overflow.  However, lots of the smaller sites have their own frequently used help pages. For example, on one of the sites I'm most active on, Programming Puzzles and Code-Golf, we have a meta post called  where users can post challenges to get constructive feedback on how to make their challenge better. If I want to point a user to the sandbox, I have to open a new tab, search for the sandbox, copy and paste the url, and enter the hotlink syntax. It would be a lot more convenient if I could just write:  You should try posting this challenge to the [sandbox].   And the same idea is applicable on all of the smaller sites. Now, there are a lot of links like this that could be useful. Each site probably has a better picture of useful links for that site than anyone else would.   I propose we add a method to customize this for each site. A moderator can add a shortcut to a list of site-specific shortcuts like this:  [sandbox] = http://meta.codegolf.stackexchange.com/questions/2140/sandbox-for-proposed-challenges/ [unicorns] = http://meta.stackexchange.com/questions/37328/my-god-its-full-of-unicorns [addiction] = http://meta.stackexchange.com/questions/11652/how-addicted-to-stack-overflow-are-you   And then if someone types one of the magic links on that particular site, it would hyperlink to the specified page.

I would like site specific magic links. Currently you can write [so] in a comment, and it links like this: . I would like to be able to have site specific ones, so for example: English Language & Usage  [dictionary] would go to http://dictionary.com and shows as   Ubuntu  [launchpad] would go to https://launchpad.net/ubuntu and shows as   [launchpad#bugnum] would go to https://bugs.launchpad.net/bugs/bugnum and shows as   [forums] would go to http://ubuntuforums.org/ and sows as   [discourse] would go to http://discourse.ubuntu.com and shows as   [paste] or [pastebinit] would go to http://paste.ubuntu.com and shows as   [install-d] would go to http://ubuntu.com/download/desktop/install-ubuntu-desktop and shows as   [install-s] would go to http://ubuntu.com/download/server/install-ubuntu-server and shows as   ppa:peterlevi/ppa would go to https://launchpad.net/~peterlevi and shows as   There is    Ask Different  [applesup] would go to http://www.apple.com/support and shows as   Christianity  [bible] would go to http://biblegateway.com and shows as   Currently, they are all the same, for all sites. I would like devs (mods maybe) to be able to add them on a per site basis. This is just a selection of examples. People can comment or answer with ones they would like and I'll edit them into this question. I asked this because  on Ask Ubuntu Meta wasn't possible right now - because it wasn't a feature.  [The devs] said right now it isn't possible because magic links are network wide, and they weren't sure it was high enough priority to really get done anytime soon, but if you want you can post a feature-request on Meta Stack Exchange requesting site specific magic links and see if you can garner more support for the feature and maybe get a dev to champion it.  So that's what I've done!


I am looking for a word which describes meaningless exchanges in conversation e.g. "How are you doing?" "Good, good, you?" "Good." "See you later." That is, in the asking of "How are you?" there is no expectation to find out how the person is actually doing - a perfunctory "good" is anticipated and expected. That is, passing exchanges where little to nothing is actually said or inquired.

Some verbal/written exchanges convey almost no meaning but are part of the protocol of conversation.  For example, somebody greets you with "How are you?" and they're not usually not listening for actual information, just for you to say, "Fine," or similar.  Or when you go through any sort of service transaction, it seems like half a dozen "thank yous" are exchanged between both parties.  Is there a term or phrase describing the phrases we use for maintaining the facade of politeness?


I working with Apache POI and in particular getCellTypeEnum. I have a problem with my program, I get the error NullPointerException when I'm reading a file:  for (int i = 0; i < nbLine; i++) {      Row row = sheet.getRow(i);     for (int j = 0; j < nbCol; j++) {         Cell cell = row.getCell(j);         switch (cell.getCellTypeEnum()){                 case STRING:                 fileData2[i][j] = df.formatCellValue(cell);                 break;             case NUMERIC:                 fileData2[i][j] = NumberToTextConverter.toText((cell.getNumericCellValue()));                 break;          }     } }   When I try a file smaller than my original file it's working well but when I try with the original and bigger file, it returns me the NullPointerException. Cheers in advance guys !  Exception stack trace:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at t6.jFrame.jButton5ActionPerformed(jFrame.java:506) at t6.jFrame.access$400(jFrame.java:40) at t6.jFrame$5.actionPerformed(jFrame.java:239) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

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


I have looked around on cross validated as well as other places but can't seem to find an answer. I'm running a generalized linear mixed-effects model.   Y~initial abundance + Treatment + (1|Month)  Where Y is count data (abundance of prey)  Initial abundance is a covariate of initial abundances before any treatments Treatment is a factor of two levels (control and treated) Month is a random intercept due to repeat sampling  The context of this model is an experiment where I reduced a predator in "treated plots" and left the other plots as "controls". Prior to the start of this experiment baseline sampling was done in all plots. I realized some plots natural had higher abundances of prey than other plots. So I decided to use these initial abundances as a covariate to control for the natural unequal abundances between plots. Here is the question: Should this covariate be included as a random effect versus a covariate that's a fixed effect? My understanding is that it could be technically be used as either.  I used it as a covariate because I know that if more prey are abundant than the effects of reducing a predator would most likely be higher than in a poorly abundant plot. It was something that I knew would have an effect on my response of prey abundance. However, I don't know if this reasoning is justified. Any info or opinions would be welcomed!  Thanks

I recently discovered how to model exposures over time using the log of (e.g.) time as an offset in a Poisson regression.  I understood that the offset corresponds to having time as covariate with coefficient 1.  I'd like to better understand the difference between using time as an offset or as a normal covariate (therefore estimating the coefficient). In which situation should I want to use one method or the other?  UPGRADE: I don't know if it is interesting, but I ran a validation of the two methods using randomly split data repeated 500 times and I noticed that using the offset method leads to a larger test error.


I want to show the following     let $E$ be a vector bundle over a base manifold $M$. Let $s$ be a section of $E$ that vanishes at $x_0\in M$. Show that there exists a finite number of section $\{s_i\}_{i\in I}$ and smooth functions $\{f_i\}_{i\in I}$ such that $s=\sum_{i\in I} f_i\cdot s_i$.    I don't see where the vanishing comes in to play, and I also don't see how to define such a thing globally.   On a local trivialization, where we have $\phi:\pi^{-1}(U)\rightarrow U \times \mathbb R^n$, we can take the $s_i(x)=e_i$ and $f_i(x)=e_i\cdot s(x)$. But this is only local.

Given a smooth finite-dimensional vector bundle $E\to M$ on a smooth manifold $M$, is the space of smooth global sections $\Gamma(E,M)$ always a finitely generated $C^\infty(M)$ module? This amounts to asking whether there exist finitely many smooth sections $s_1,...,s_m$ such that every $s\in \Gamma(E,M)$ can be written as $s=f_1 s_1+...+f_m s_m$ with smooth functions $f_1,...,f_m$.


There are $n$ chairs in a row. In how many ways can a teacher sit k students on these chairs so that no $2$ students sit next to each other (and obviously no $2$ students sit on $1$ chair)?   I think that is not a typical stars and bars problem. It is not exactly $\binom{n-1}{k-1}$ right?

There are n chairs in a row. In how many ways can a teacher sit k students on these chairs so that no 2 students sit next to each other (and obviously no 2 students sit on 1 chair)?  I was thinking about inclusion-exclusion, that each student will sit next to each other, however it isn't good enough since there could be more chairs than students.  Basically currently I have no idea how to solve it.


I have some trouble with my MacBook Pro screen : on it appeared a transparent strip. It's visible from the MacBook start and I can't make it disappear. However, I still can click on files, softwares...  I've already tried :   Many restarts Safe mode Reset NVRAM Apple Diagnostics   When I plug another screen with HDMI I don't see it on 2nd screen.    Weird thing is that this strip has disappear once after using a full screen app for some time. But today after 2 days without using it, it's now more visible and flashes when I'm on some apps (but not flashing on desktop).  Thanks !

I dropped my macbook air and the screen is like this since.    Does anyone know what exactly happened to it? Is it hardware or software?


I just had to have my laptop re-imaged and am getting it all configured again.  There were some items pinned to my taskbar from the image and when I unpin them, they come back after a reboot.  I have seen lots of comments about clearing out %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar and removing HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband.  Also notes about c:\Users\Public\CompanyProfile (which does not exist for me).  None of these tricks have worked.  I even created a new users and am seeing the same problem on that account.  Another symptom I have is that when I default my browser to Firefox, it resets to IE after reboot.  I have checked and I cannot see any group policy that is driving this behavior.  I am out of ideas.   Installed programs to stick and items I place on my desktop do survive a reboot.  In looking around I tried a batch program to help and noticed that if I run these commands in DOS:   taskkill /f /im explorer.exe start explorer.exe   It resets the taskbar and file associations.

I have got a new installation of windows recently. Now when I do unpin items from taskbar that were there (IE, Edge, Explorer), they do come back after restart. A pinned chrome does not disappear though e.g.  Anything to fix this issue?  P.S. Just created a new user, and he has the same problem  P.P.S. Sign out is enough to get it back, no full restart needed


I think this is quite a simple question, but for some reason am finding it difficult to answer. The question is:  If $(f_n:n\in\mathbb{N})$ is a sequence of integrable functions, with $f_n \to f$ a.e. for some integrable $f$, then is it true that if $\|f_n\|_1 \to \|f\|_1 $, then $\|f_n-f\|_1\to 0$.  Any help is very good!

Let $1\leq p < \infty$. Suppose that    $\{f_k\} \subset L^p$ (the domain here does not necessarily have to be finite),  $f_k \to f$ almost everywhere, and  $\|f_k\|_{L^p} \to \|f\|_{L^p}$.    Why is it the case that $$\|f_k - f\|_{L^p} \to 0?$$   A statement in the other direction (i.e. $\|f_k - f\|_{L^p} \to 0 \Rightarrow \|f_k\|_{L^p} \to \|f\|_{L^p}$ ) follows pretty easily and is the one that I've seen most of the time. I'm not how to show the result above though.


I read this a long time ago - perhaps online in a newsgroup, in the 90s, perhaps in a printed collection.   What I remember is this guy was driving through the desert on a highway. Some roadside trash was blown up onto his windshield, and there was a mouth on the bottom side. Apparently these creatures/aliens/whatevers imitated roadside trash - flattened cardboard box, etc - and would eat the roadkill animals.

I'm looking for a short story about a man who thinks he sees a face on a piece of trash while driving to work.I think it looked like a bag or a piece of cardboard blown about by the wind.Seems like it "blew" onto a piece of roadkill and ate it. He thinks he imagined it, but keeps thinking about it. He goes back to the intersection where he first saw it and it causes him to have an accident.It ended up being some type of creature that hunted by pretending it was garbage.   I can't remember if it was in a magazine or an anthology, but I first read it about 20-25 years ago. I keep thinking it was by Harlan Ellison, but I'm in no way positive about that. It may just be that I read it around the same time I first read Ellison.


Okay so with php i add text in a database. Looking through phpmyadmin, i can see how the letters (which are cyrillic) are displayed correctly, therefore i assume i am writing them in the database in the correct way without any problems.  However, when i then visualise them on the same page where i added the text, it comes as "???" (just question marks). I've tried changing the html meta tag. Currently it's "utf-8"" and i've tried with "windows-1251" as well but still with no success.  Everything in phpmyadmin is changed to utf-8 and ive tried all possible solutions that I've found so far.  Any help would be much appreciated. Thank you in advance!

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Im working on a panel data set and have difficulties to understand the odds ratio of a fixed effect logit model. I prepared an cross sectional exapmle. I suppose the interpretation is identical:   data(cars)  attach(cars)   fit<-glm(Sound ~ Mileage+Price, family=binomial(link="logit"))   summary(fit)     Coefficients:                 Estimate Std. Error z value Pr(>|z|)       (Intercept)  1.581e+00  2.811e-01   5.623 1.88e-08 ***   Mileage     -1.189e-05  9.428e-06  -1.261 0.207205       Price       -2.734e-05  7.564e-06  -3.614 0.000301 ***     require(MASS)    exp(cbind(coef(fit), confint(fit))) ## for odds ratios                               2.5 %    97.5 %     (Intercept) 4.8578575 2.8174158 8.4927615     Mileage     0.9999881 0.9999695 1.0000065     Price       0.9999727 0.9999577 0.9999874   How can I interpret odds ratios as an increase/decrease in chance or probability?

I'm somewhat new to using logistic regression, and a bit confused by a discrepancy between  my interpretations of the following values which I thought would be the same:    exponentiated beta values  predicted probability of the outcome using beta values.    Here is a simplified version of the model I am using, where undernutrition and insurance are both binary, and wealth is continuous:  Under.Nutrition ~ insurance + wealth   My (actual) model returns an exponentiated beta value of .8 for insurance, which I would interpret as:     "The probability of being undernourished for an insured individual is .8 times the probability of being undernourished for an uninsured individual."   However, when I calculate the difference in probabilities for individuals by putting in values of 0 and 1 into the insurance variable and the mean value for wealth, the difference in undernutrition is only .04. That is calculated as follows:   Probability Undernourished = exp(β0 + β1*Insurance + β2*Wealth) /                              (1+exp(β0 + β1*Insurance + β2*wealth))   I would really appreciate it if someone could explain why these values are different, and what a better interpretation (particularly for the second value) might be.     Further Clarification Edits As I understand it, the probability of being under-nourished for an uninsured person (where B1 corresponds to insurance) is:  Prob(Unins) = exp(β0 + β1*0 + β2*Wealth) /               (1+exp(β0 + β1*0+ β2*wealth))   While the Probability of being under-nourished for an insured person is:  Prob(Ins)= exp(β0 + β1*1 + β2*Wealth) /            (1+exp(β0 + β1*1+ β2*wealth))   The odds of being undernourished for an uninsured person compared to an insured person is:  exp(B1)   Is there a way to translate between these values (mathematically)? I'm still a bit confused by this equation (where I should probably be a different value on the RHS):  Prob(Ins) - Prob(Unins) != exp(B)   In layman's terms, the question is why doesn't insuring an individual change their probability of being under-nourished as much as the odds ratio indicates it does?  In my data, Prob(Ins) - Prob(Unins) = .04, where the exponentiated beta value is .8 (so why is the difference not .2?)


I have the path data labeled tabel_roads, I want to find the nearest road using coordinates. this is the script I have, but it does not work.                              select id from tabel_roads ORDER BY geom <-> st_makepoint(-6.1688009873927925,106.8256151676178) LIMIT 1

I am trying to find the closest road segment to a point that I have and return an attribute from the closest segment to the given points.    I know in PostGIS I need to use ST_ClosestPoint, St_distance and min functions, but I keep having syntax errors.    So far my code looks like  WITH closest_segment As )  SELECT   ST_ClosestPoint(ST_GeogFromText('POINT(-122.206111 47.983056)')::GEOMETRY,        shape::GEOMETRY)AS segment_location  --shape is the geography WKB       FROM   public.road_segments )  RETURNING closest_segment WITH new_segment AS )  SELECT    MiN(ST_Distance(closest_segment::GEOM,ST_GeogFromText('POINT(-122.206111     47.983056)')::GEOMETRY)   FROM    closest_segment )  RETURNING closest_segment   My knowledge of PostGIS and coding in it is very limited.


In the Harry Potter universe, we see huge differences between wizarding culture and Muggle culture. The differences are so huge that one culture is almost alien to  the other.  We also see marriages between wizards/witches and Muggles, as well as lots of half-bloods.  I am curious to know how social syncretism works after such marriages, on average. Do their kids follow wizarding culture or Muggle culture or an amalgamation of both? Do we have a close picture of such families?

Wizarding families are all magical, spells and charms being performed by older siblings and parents on a regular basis. Families of Muggle-borns are just Muggle normality, up until the Muggle-born’s 11th birthday. Then we have those who are born to a wizard and a Muggle (those who actually LIVE with them (like Lockhart and Umbridge). Would the Wizarding parent perform spells and charms around the house, for example?


In the following linear regression  $y_{t} = \beta_0 + \beta_1 x_{t} + \epsilon_t,$  I want to test whether $R^2 \geq 0.5$. In R, you can make use the CI.Rsq() function in the psychometric package. The formula it applies is:  $SE_{R^{2}} = \sqrt{\frac{4R^{2}(1-R^{2})^{2}(n-k-1)^{2}}{(n^2 - 1)(n+3)}}$  Then, the 95% CI is $R^{2} \pm 2 \cdot SE_{R^{2}}$.  Does this CI work for time series data?

I googled and searched on stats.stackexchange but I cannot find the formula to calculate a 95% confidence interval for an $R^2$ value for a linear regression. Can anyone provide it?  Even better, let's say I had ran the linear regression below in R. How would I calculate a 95% confidence interval for the $R^2$ value using R code.  lm_mtcars <- lm(mpg ~ wt, mtcars)


I have class that extends AsyncTask :       public class DailyCourse extends AsyncTask<Integer, Void , Object> {            public DailyCourse (){            }     }   I have Override necessary  functions and have my own functions too .  in main activity that implements my custom interface I try to call constructor :      public class Luncher extends AppCompatActivity implements DailyCourseAsyncResponse {               dailyCourse = new DailyCourse() ;     }   note that I do this after onCreate and problem is I get this error  :         java.lang.NullPointerException: Attempt to invoke virtual method       'java.lang.String android.content.res.Resources.getString(int)' on a        null object reference   what is the problem ? NOTE : it's not duplicate with  , I know what is null exception , the problem "was" I did not know why I get that in my case (solved)

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


I have 2 partitions (2.6gb, and 150gb) on one of my (3gb) drives. It had 3, but I removed one that wasn't used.  Disk Utility should allow me to expand the 'lower' (150gb) partition into the free space - but not the 'top (2.6gb) partition.  Is there a way, using terminal or an app, that I can expand that 'top' (2.6gb) partition into the free space?

Is there an equivalent on the Mac platform to Partition Magic or GParted that will allow me to resize, move, and/or change partitions on the fly without formatting, or disturbing the data that is already on the disk?


Update  Please take note that this question has nothing to do with   That question doesn't have anything to do with VMware Workstation  My Question is related to Linux Guest OS inside VMware Workstation  I have Linux installed in VMware Workstation with 3 network interfaces.  To make it easier to read, I have assigned 3rd octet of the IP Address based on VMnet ID.  VMnet1 - 172.31.1.0/24 VMnet2 - 172.31.2.0/24 VMnet3 - 172.31.3.0/24   The setting of VMware Virtual Network Editor is as follows:    Virtual Machine Settings    DHCP is used in this setup.  When I run ifconfig, I found that   eth0 assigned to VMnet2 network eth1 assigned to VMnet3 network eth2 assigned to VMnet1 network   I'm not sure why VMware assign it this way.   user@linux:~$ ifconfig | grep ad eth0      Link encap:Ethernet  HWaddr 00:0C:29:AA:AA:A0             inet addr:172.31.2.23  Bcast:172.31.2.255  Mask:255.255.255.0  eth1      Link encap:Ethernet  HWaddr 00:0C:29:AA:AA:A1           inet addr:172.31.3.22  Bcast:172.31.3.255  Mask:255.255.255.0  eth2      Link encap:Ethernet  HWaddr 00:0C:29:AA:AA:A2             inet addr:172.31.1.24  Bcast:172.31.1.255  Mask:255.255.255.0  user@linux:~$    Is it possible to change it?  I would like to get something like this ...  eth1 assigned to VMnet1 network eth2 assigned to VMnet2 network eth0 assigned to VMnet3 network

I know this question is similar to "", but I do not consider it a duplicate because my interface is not named via a udev rule, and none of the other answers in that question worked for me.  So I have one WiFi adapter on this laptop machine, and I would like to rename the interface from wlp5s0 to wlan0:  root@aj-laptop:/etc/udev/rules.d# iwconfig wlp5s0    IEEE 802.11  ESSID:off/any             Mode:Managed  Access Point: Not-Associated   Tx-Power=off              Retry short limit:7   RTS thr:off   Fragment thr:off           Encryption key:off           Power Management:on  eth0      no wireless extensions.  lo        no wireless extensions.  root@aj-laptop:/etc/udev/rules.d# ifconfig wlp5s0 wlp5s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500         ether 00:80:34:1f:d8:3f  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 0  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   However, there are no rules for this interface in 70-persistent-net.rules or any of the other files in the /etc/udev/rules.d/ directory.  Is there any way that I can rename this interface?


When I type these:   ping yahoo.com    or   ping -n or ipconfig   The answer is just this     'ping' is not recognized as an internal or external command operable    program or batch file   or      'ipconfig' is not recognized as an internal or external command operable    program or batch file.    i tried these 2 solutions.   Go to Properties in My computer, Advanced system settings → Advanced → Environment Variables Select 'PATH' from the list of system variables and edit and set PATH to c:\windows\system32 ; this will solve your problem.  If still you have a problem, do the below steps  Control Panel → System and security → Windows Firewall → Advanced settings → Inbound rules → New rule → custom rule  Im Protocol and ports: Protocol: ICMPv4 on the same panel go to customize, choose "Specific ICMP types", check the box "echo request"  but it is still a problem, how can I solve it?

Using Windows 7, on just one of my machines, typing in "ipconfig" no longer does anything.  Is there a reason for this?  My speculation is that it has something to do with java SDK installation / changing the system variables.  The command and response:  C:\Users\Paul>ipconfig      'ipconfig' is not recognized as an internal or external command,   operable program or batch file.   My PATH:  C:\Program Files\Common Files\Microsoft Shared\Windows Live; C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live; C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common; C:\Program Files (x86)\MiKTeX 2.8\miktex\bin; C:\Program Files (x86)\Windows Live\Shared; C:\Program Files\Common Files\Microsoft Shared\Windows Live; C:\Program Files\Java\jdk1.6.0_22\bin; c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\; c:\Program Files\Microsoft SQL Server\100\Tools\Binn\; c:\Program Files\Microsoft SQL Server\100\DTS\Binn\; C:\Program Files (x86)\QuickTime\QTSystem\; C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static; C:\Program Files (x86)\MATLAB\R2007b\bin; C:\Program Files (x86)\MATLAB\R2007b\bin\win32; C:\Program Files (x86)\Common Files\Autodesk Shared\; C:\Program Files (x86)\Autodesk\Backburner\; C:\Program Files\Common Files\Autodesk Shared\


When I try to update on landscape client machine I get this error.  $ sudo apt-get update N: Skipping acquire of configured file 'restricted/binary-i386/Packages'  as repository 'http://landscape/repository/standalone/xenial xenial-updates InRelease'  doesn't support architecture 'i386'   Is there any simple way to add arch i386 without having to create a new pocket, using only CLI?

Getting below error message while issuing :  sudo apt-get update  Get:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease [95.8 kB] Ign:2 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 InRelease                                                                                Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                Hit:4 http://ppa.launchpad.net/canonical-x/vulkan/ubuntu xenial InRelease                                                                                Hit:5 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 Release                                                                             Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease                                                   Ign:7 http://dl.google.com/linux/talkplugin/deb stable InRelease                                                      Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                    Ign:9 http://linux.dropbox.com/ubuntu wily InRelease                                            Hit:10 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease                               Get:12 http://dl.google.com/linux/chrome/deb stable Release [782 B]       Hit:13 http://dl.google.com/linux/talkplugin/deb stable Release                   Ign:14 https://apt.dockerproject.org/repo ubuntu-wily InRelease           Hit:15 https://apt.dockerproject.org/repo ubuntu-wily Release             Get:16 http://dl.google.com/linux/chrome/deb stable Release.gpg [181 B]   Hit:17 http://linux.dropbox.com/ubuntu wily Release                                   Get:20 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,191 B] Fetched 98.0 kB in 0s (118 kB/s)                                  Reading package lists... Done N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'   This cuts across various releases of ubuntu


I have Kali-64bit installed in Virtual Box, and I'm simply trying to set the MATE environment as my default for when I reboot/shutdown and log in afterwards.  I've tried  update-alternatives --config x-session-manager   and choosing mate-session (be it auto/manual mode) but I still get signed into the default GNOME environment.  Yet when I run update-alternatives command again, MATE is still selected and hasn't reverted back to GNOME.    This should be such a minute command that I've ran on two other Kali installations and it worked flawlessly, yet on my Vbox installations, the update-alternatives just wouldn't stick.

How do I change the default session I get when I log in? I'm on Debian jessie. I tried changing settings on gdm3, tried installing lightdm and following  but it's just not working.  For more specificity, I'm trying to default to gnome-classic instead of gnome. I want to turn on the computer, log in as any arbitrary user, and see gnome-classic, not gnome3 (preferably I'd remove the gnome3 default session, if there's a way to do that).


I'm trying to access my Apache server over the Internet.  When I use my external IP to connect from a different system, my router's welcome page is displayed. How can I access the server?

I'm coming from this question:  I want to understand this whole process of port forwarding. I read so many things, but am failing to understand the very basic concept of port forwarding itself. What I have:  a freebsd server sitting at my home.  netgear router  This is what I am trying to achieve:   to be able to access freebsd server from a windows machine over internet to be able to open a webbrowser and access internet.  I also want to access this freebsd box from a ubuntu machine that I have.  It will be great if someone can please help me. Here is the netgear router setup that I did for port forwarding.


I recently encountered the above notation for sets, and I've never encountered it before. What does it refer to?

I have frequently encountered both $\langle a,b \rangle$ and $[a,b]$ as notation for closed . I have mostly encountered $(a,b)$ for open intervals, but I have also seen $]a,b[$. I recall someone calling the notation with $[a,b]$ and $]a,b[$ as French notation.   What are the origins of the two notations?  Is the name French notation correct? Are they used frequently in France? Or were they perhaps prevalent in French mathematical community at some point? (In this  Bourbaki is mentioned in connection with the notation $]a,b[$.)      Since several answerers have already mentioned that they have never seen $\langle a,b \rangle$ to be used for closed intervals, I have tried to look for some occurrences for this. The best I can come up with is the article on , where these notations are called Czech notation and French notation. Using $(a,b)$ and $[a,b]$ is called English notation in that article. (I am from Central Europe, too, so it is perhaps not that surprising that I have seen this notation in lectures.) I also tried to google for  or . Surprisingly, this lead me to a  where this notation is used for open interval.


How do I show that $$\int_{-\infty}^\infty \frac{\sin^2(\pi s)}{(\pi s)^2} e^{2\pi isx} \, ds = \begin{cases} 1+x & \text{if }-1 \le x \le 0 \\ 1-x & \text{if }0 \le x \le 1 \\ 0 & \text{otherwise} \end{cases}$$  I know that $\sin^2(\pi s)=\frac{1-\cos(2\pi s)}{2}=\frac{1-(e^{2\pi i s}-e^{-2\pi i s}))/2}{2}$, so $$\int_{-\infty}^\infty \frac{\sin^2(\pi s)}{(\pi s)^2} e^{2\pi isx} \, ds=2\int_0^\infty \frac{2e^{2\pi isx}-(e^{2\pi is(1+x)}+e^{2\pi i s(-1+x)})}{4\pi^2s^2} \, ds$$  I am also allowed to use the known identity $$\int_{-\infty}^\infty \frac{1-\cos(a \pi x)}{(\pi x)^2} \, dx = |a|$$ for some real number $a$.

I want to evaluate the integral   $$\int_{-\infty}^\infty \frac{\sin^2(x)}{x^2}e^{i t x} dx$$   for all $t \in \mathbb{R}$. I would preferably do it using the tools of complex analysis, but since I haven't found any other thread dealing with this integral at all so far, I'd be open to any approach.  I must admit that I haven't really found a way to start. The function $f(z) := \frac{\sin^2(z)}{z^2}e^{i t z}$ has an isolated singularity (a removable singularity, with continuation $f(0) = 1$, to be precice) at $z = 0$. I think a clever way would be to integrate over the edge of rectangle, semicircle or "slice of cake" (the edges of which we then would let go against $-∞$ and $∞$), then maybe somehow apply the Cauchy theorem or Residue theorem. But I don't know how to concretely do that, or how to even get started with that.  On a more general note, I'm having trouble understanding how to transform a "normal" integral over a real interval into one where we integrate over the edges of a geometric shape; and I also don't know, based on which pattern one can see with geometric shape fits best. Are there any tips or hints on how to get more intuition for that? (Apart from, obviously, dealing with these integrals regularly, what I'm trying to do but where I'm still failing a lot of times.)  I also noticed that the above integrals looks strikingly similar to the Fourier transformed of $f$ (or, even more similar to the formula for the inverse transformed). So maybe this could help us with this integral? I'm not really sure though.


I am new to Ask Ubuntu, this is literally my first question :-)  I purchased an HP laptop (15-AU114NA) and installed Ubuntu 16.04LTS (together with Windows 10).  When I use Ubuntu, my laptop Wi-fi does not work. It works on Windows 10.  I ran the following terminal command:  lshw -c network   The result is the following:  *-network UNCLAIMED description: Network controller product: Intel Corporation vendor: Intel Corporation physical id: 0 bus info: pci@0000:05:00.0 version: 10 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: memory:b1000000-b1001fff   When I run this command:  lspci -vvnn   I get this:  05:00.0 Network controller [0280]: Intel Corporation Device [8086:24fb] (rev 10) DeviceName: Intel Dual BandWireless-AC 3168 802.11 ac 1x1 WiFi + BT 4.0 Combo Adapter Subsystem: Intel Corporation Device [8086:2110] Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Interrupt: pin A routed to IRQ 11 Region 0: Memory at b1000000 (64-bit, non-prefetchable) [size=8K] Capabilities: <access denied>   NOTE: for other results (example for Ethernet) there is a "Kernel module" reference that I could identify and load, but not for Wifi...  I found the drivers for my Wifi built-in chip (3168)  I downloaded the drivers, then I unzipped and copied (using sudo...) in the following directory:  /lib/firmware   But still no luck :-( (no Wifi available)  Actually I checked this directory using the following command:  ls -l   And here is what I got:  -rw-r--r--  1 root      root      1028032 Mar 28 08:22 iwlwifi-3168-22.ucode drwxr-xr-x  2 guillaume guillaume    4096 Feb 26 21:33 **iwlwifi-3168-ucode-22.361476.0**   So here already I see that my copy does not have the same format that other files (owner is me instead of root, and read/write/executable status is different), I guess I should do a chmod to solve that? Also checking the line above I realise that actually there is already a driver for my wifi as it has the same name structure (3168-22.ucode) so I am even wondering if I needed to copy the firmware in this directory because it seems now (since Mar 28) there is a driver already in this directory...  @all any idea of what to do to solve my Wifi issue?  Thanks in advance for your support.

I searched many solutions on this site but most of them were referring to Broadcom Wifi drivers while mine has Intel one.   Output of lspci -knn | grep Net -A2  arijit@HP-AU134TX:~$ lspci -knn | grep Net -A2  05:00.0 Network controller [0280]: Intel Corporation Device [8086:24fb] (rev 10) DeviceName: Intel Dual BandWireless-AC 3168 802.11 ac 1x1 WiFi + BT 4.0 Combo Adapter Subsystem: Intel Corporation Device [8086:2110]   Output of rfkill list  arijit@HP-AU134TX:~$ rfkill list  arijit@HP-AU134TX:~$    i.e No Output  Output of uname -a; dmesg | grep iwl  arijit@HP-AU134TX:~$ uname -a; dmesg | grep iwl  Linux HP-AU134TX 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


I am trying to enumerate this xml (sample):  <SearchSuggestion xmlns="http://opensearch.org/searchsuggest2" version="2.0">    <Query xml:space="preserve">Relativity</Query>    <Section>     <Item>         <Text xml:space="preserve">Relativity</Text>         <Url xml:space="preserve">https://en.wikipedia.org/wiki/Relativity</Url>     </Item>     <Item>         <Text xml:space="preserve">Relativity priority dispute</Text>         <Url xml:space="preserve">https://en.wikipedia.org/wiki/Relativity_priority_dispute</Url>     </Item> ....   using:  XmlNodeList nItems = rssDoc.SelectNodes("/SearchSuggestion/Section/Item")   But it is yielding no results. Can anyone tell me why?

I've got an XML document with a default namespace. I'm using a XPathNavigator to select a set of nodes using Xpath as follows:     XmlElement myXML = ...;   XPathNavigator navigator = myXML.CreateNavigator(); XPathNodeIterator result = navigator.Select("/outerelement/innerelement");   I am not getting any results back: I'm assuming this is because I am not specifying the namespace. How can I include the namespace in my select?


I use sendgrid for sending email. I currently use following codes for validating user inputs. $string = strip_tags(stripslashes($string)); $string = mysqli_real_escape_string($con,$string); $string= htmlspecialchars($string);  I send email via sendgrid api. If i pass user generated html body and then filter/validate it, it looses all the html properties and email looks messy. If i dont filter, user might send some nasty codes which might result in various attacks. I am currently using tinyMCE for html box. Is there anything i can do to prevent SQL injection and other attacks while preserving html message in PHP.

Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML tags?


Not a duplicate of  If you take the time to read the question, I am looking for better ways of representing these floating point number in strings.  I have a numeric up/down control, essentially a normal textbox with up down buttons next to it that stores its value as a double. I have been running into an issue when cycling up and down, when the value is (or should be) 0 or -.1, the text box displays "1.38777878078145E-16" and "-0.0999999999999999" respectively (among others) and this makes the control feel messy.  I get that the floating point precision of double means that values get truncated and absolute precision for decimals longer than the doubles precision are lost. Precise representation of the actual value of -.1d is not as important to me as it's clean representation, meaning I would like -.1d (-0.0999999999999999) to simply display as "-.1".  Do not assume by my examples that all values are within one decimal, though precision is not terribly important granularity is.  Right now I am just catching the string in my double to string converter and handling it, but is there a better way to do this?  No I cannot use decimal due to its overhead.  [ValueConversion(typeof(Double), typeof(String))] public class DoubleToStringValueConverter : IValueConverter {     public object Convert(object value,                           Type targetType,                           object parameter,                           System.Globalization.CultureInfo culture)     {         string res = ((double)value).ToString(culture);         if (res == "1.38777878078145E-16") res = "0";         if (res == "-0.0999999999999999") res = "-0.1";         return res;     }      public object ConvertBack(object value,                               Type targetType,                               object parameter,                               System.Globalization.CultureInfo culture)     {         string val = value as string;         double res = 0d;         double.TryParse(val, System.Globalization.NumberStyles.Float, culture, out res);         return res;     }  }

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


I have two lists [1,2,3] and [4,5,6]. I'd like to generate a list of all combinations as follows using itertools  ResultingList = [[1,4],[1,5],[1,6],[2,4],[2,5],[2,6],[3,4],[3,5],[3,6]]  So far I've only investigated the itertools.combinations function which seems that it can only handle something like this:  list(itertools.combinations([1,2,3,4,5,6],2))   Which outputs an incorrect result. How can I generate ResultingList above?  Thanks

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


My Carrera valour mountain bike currently has v-brakes but the are not very good and to be honest they look a bit tacky compared to disc brakes, is it possible to convert it to disk brakes, because I'm not sure whether my bike has a suitable frame...

I've got an older, about 1991, model Cannondale SM1000 mountain bike purchased new.  Would it be worth it to convert to disk brakes and if so what would be the process?


I don't know much about that topic but wouldn't that be a possibility? I mean an iPhone is just a phone with components in it as any Phone that runs Ubuntu Touch. Wouldn't it be pobbible to replace the Bootloader to get the iPhone to install Ubuntu Touch?  Then you put a sticker on the back and you get a uPhone :D

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


Let's say I have an object, called myMD5, like this:  <md5 HASH object @ 0xb79b9860>   And here is dir(myMD5):  ['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'block_size', 'copy', 'digest', 'digest_size', 'digestsize', 'hexdigest', 'name', 'update']   I want to get the hash string, and to do that I need to call myMD5.hexdigest().  The problem is that I'm actually making a challenge (called PyJail) and the use of the character dot (.) is forbidden.   So, I need to call this method by another way. Is there any way to call it like a function ? Something like this:  hexdigest(myMD5)   I tried to do this, but it does not work:  getattr(myMD5, dir(myMD5)[-3]) # returns <classmethod object at 0xb79b998c>   PS; Other elements are also forbidden by the challenge, like using quotes (', "), using import statements, using things like exec or eval, etc.

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


I know about the  and according to the answer in that question:     Any upvotes you receive after earning 200 reputation from upvotes for the day no longer award any points.   But look at .    From the screenshot, he stopped getting reputation for 10 upvotes (100 rep) and 1 accept (15 rep). i.e., He stopped getting reputation for upvotes after he had 115 rep.  But if you look at his reputation changes later, he still got 80 rep for upvotes.  Why did he stop getting reputation after 115 rep instead of 200 until later?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


I've tried to ask this question both on  and .  Is it possible to prove idempotence? Is it possible to use static or dependent types to prove a function is idempotent? If so, how would one do it?  I keep getting an error saying the question "does not meet our quality standards". This seems like a very reasonable question to me, what's wrong with it?

While trying to ask a question, I got the error message     This question body does not meet our quality standards. Please make sure that it completely describes your problem - including what you have already tried - and is written using proper grammar.    Why am I getting this message? What can I do to get the system to accept my question? Can you be more specific? What are good resources on how to ask high-quality questions?      For more information, see  in the .


Is there some recognized best practice when it comes to inserting hypertext in a page? For instance, what is the best between:  Check out our website:   And..  Check out our !  Or..    I'm thinking the first one might be preferable for mails where links can't be clicked for some reason, but the other two look better. Also, cases likes those:  You can register on our  You can register  You can  on our website  You get the point. So is there some recognized style guide for this out there?

Over the years of surfing on the web I have found numerous examples of people saying that you shouldn't use the word "here" in a textlink etc. Personally I like the idea of using the word, because it is so straightforward for your visitors to know where to click.  The only reason that I can truly think of is for SEO purposes. The word here doesn't have much value as a keyword as such.  I would like to know some other opinions on why we should/shouldn't use word like "this" and "here" in a textlink.


Here is my code and what I want to do is, when the login button is pressed, I would like it to check the password and text fields for the right password(found in the if statement). I need help on what to do to get the input from the text and password fields. When I run the code, it skips right to the else statement and does the code in there, I want it to do the if statement as I have entered the right username and password. I was trying to figure out how to get input from the text fields but I don't know how to. I would appreciate some help, thank you.     import java.awt.BorderLayout;     import java.awt.Color;     import java.awt.GridLayout;     import java.awt.TextArea;     import java.awt.event.ActionEvent;     import java.awt.event.ActionListener;     import java.awt.event.MouseListener;      import javax.swing.BorderFactory;     import javax.swing.JButton;     import javax.swing.JFrame;     import javax.swing.JLabel;     import javax.swing.JPanel;     import javax.swing.JPasswordField;     import javax.swing.JTextField;      public class GUI_2 implements ActionListener {          private JLabel PassLabel;         private JFrame frame;         private JButton enterButton;         private JLabel UserLabel;         private JLabel label;         private JPanel panel;         private JFrame Incorrect;         private JTextField password;         private JTextField username;         private String rightPassword;         private String rightUsername;         private String passwordInput;         private String usernameInput;         private JButton UsernameEnter;         private JButton PasswordEnter;         private final static String newline = "\n";         private TextArea textArea;           public GUI_2()         {             PassLabel = new JLabel("Enter Password:");             password = new JPasswordField(11);             UserLabel = new JLabel("Enter Username:");             username = new JTextField(11);             enterButton = new JButton("Login");             label = new JLabel("Access");             UsernameEnter = new JButton("Enter");             PasswordEnter = new JButton("Enter");             frame = new JFrame();             panel = new JPanel();             Incorrect = new JFrame();             enterButton.addActionListener(this);                  panel.setBorder(BorderFactory.createEmptyBorder(200,200,60,300));             panel.setLayout(new GridLayout(5, 5));             panel.add(UserLabel);             panel.add(username);             panel.add(PassLabel);             panel.add(password);             panel.add(label);             panel.add(enterButton);                  frame.add(panel, BorderLayout.CENTER);             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);             frame.setTitle("Password Login");             frame.pack();             frame.setVisible(true);                   }           public static void main(String[] args) {             new GUI_2();             // TODO Auto-generated method stub          }           public void actionPerformed(ActionEvent arg0)     {                   if (passwordInput == "password" && usernameInput == "harry")         {             frame.setTitle("Success");             label.setForeground(Color.green);             label.setText("Access granted");         }         else         {             frame.setTitle("Access Denied");             label.setForeground(Color.red);             label.setText("Access Denied");         }     }     }

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


How to change the caption of the \listoffigures command?  \listoffigures[list of pictures] #something like that doesn't work

I'd like to modify the names used to typeset some of my document elements. For example, the caption of figure floats should change from "Figure" to "Fig.", and my \tableofcontents sectioning heading shouldn't read "Contents", but "Table of Contents". How can I do that?  \documentclass{article} % \usepackage[english]{babel} \begin{document} \tableofcontents \section{foo} \begin{figure}[h] \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document}


I want to know where I can find out which is the current fglrx-updates driver in the repo. I own a Radeon R9 270 and I need to know if it is supported since Trusty 14.04. Thanks! :)

I have an ATI graphics card and I want to know if it is supported and what kind of drivers should I be running to get the best features out of it.  Is my card supported in Ubuntu and what drivers will work with my card?


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

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Hi :) I've recently bought a new PC with Palit GeForce GTX 1060 6GB Dual video card. Unfortunately, it seems like Ubuntu has some problems with it. When I type "sudo lshw -C display", I get this message:    *-display UNCLAIMED    description: VGA compatible controller    product: NVIDIA Corporation    vendor: NVIDIA Corporation    physical id: 0    bus info: pci@0000:01:00.0    version: a1    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress vga_controller cap_list    configuration: latency=0    resources: memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff    *-display    description: VGA compatible controller    product: Sky Lake Integrated Graphics    vendor: Intel Corporation    physical id: 2    bus info: pci@0000:00:02.0    version: 06    width: 64 bits    clock: 33MHz    capabilities: pciexpress msi pm vga_controller bus_master cap_list rom    configuration: driver=i915_bpo latency=0    resources: irq:124 memory:f5000000-f5ffffff memory:d0000000-dfffffff ioport:f000(size=64)    and when I go to "Additional drivers", I get this:

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


I want to use variable inside the parentclass from all of my subclasses. Like there's a x variable in parentclass and I want to reach it from my theYclass and theZclass subclasses.   i tried using .  i tried using : i tried using protected: i tried using -> i tried using    this i tried using #define   i am taking LNK2001 and LNK1120 error which means undefined reference/unresolved external symbol error      class world     {     private:     public:      static int a;     };      class atmosphere : public world {     private:     public:      static void humon() {           world::a = 5;         };      };   I want to use a on every subclasses.(my first inheritance experiment btw)

Very simply put:  I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions.  Anyway, I have defined two static unsigned char variables in my class public scope, when I try to modify these values in the same class' constructor, I am getting an "unresolved external symbol" error at compilation.  class test  { public:     static unsigned char X;     static unsigned char Y;      ...      test(); };  test::test()  {     X = 1;     Y = 2; }   I'm new to C++ so go easy on me. Why can't I do this?


In python, I have a dictionary named dict_a :   dict_a = {'a':1}   and I want to get a new dictionary dict_b as the update of dict_a,at the same time I don't want to change the dict_a, so I used this:  dict_b = copy.deepcopy(dict_a).update({'b':2})   However,  the return value of dict.update is None, so the above code doesn't work. And I have to use this：  temp = copy.deepcopy(dict_a) temp.update({'b':2}) dict_b = temp   The question is, how to get my goal in one line? Or some

I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.)


I am attempting to access a variable in a view in django. It works in one view but it doesn't work in the other one, although it is not passed as a parameter in both.  The variable is imported from .apps and is called botlist_root. It contains a list of the bots running on the server.   This is the view where it does work:  @login_required def bot(request, name):     if request.method == 'GET':         for bot in botlist_root:             if bot.getname() == name:                 context = {'bot': bot}                  return render(request, 'bot_manager/details.html', context)          context = {'name': name}         return render(request, 'bot_manager/error.html', context)     else:         for bot in botlist_root:             if bot.getname() == name:                 context = {'bot': bot}                 bot.start()                  return redirect('./', context)   And this is the View where it does not work:  @login_required def index(request):     if request.method == 'GET':         namelist = []         for bot in botlist_root:             namelist.append(bot.getname())         context = {'bots': botlist_root}         return render(request, 'bot_manager/index.html', context)     else:         botlist_root = listbots()         namelist = []         bots = botlist_root          for bot in bots:             namelist.append(bot.getname())         context = {'bots': bots}         return render(request, 'bot_manager/index.html', context)   These are all the import statements:  from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .apps import botlist_root, listbots from django.template import TemplateDoesNotExist   I do not understand why I can access botlist_root from the bot view but not from the index view.

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


I have two funcions   int zapiszGenotyp(genotyp *p, int dlugoscGenotypu, int genDoWpisania) {     if (!p)     {         genotyp *nowy = new genotyp;         nowy->pNext = 0;         p = nowy;         nowy->gen = genDoWpisania;         dlugoscGenotypu++;     }     else if (p->pNext == 0)     {         genotyp *nowy = new genotyp;         nowy->pNext = 0;         p->pNext = nowy;         nowy->gen = genDoWpisania;         dlugoscGenotypu++;     }     else         zapiszGenotyp(p->pNext, dlugoscGenotypu, genDoWpisania);      return dlugoscGenotypu; }      void stworzListeOsobnikow(osobnicy *& p, ifstream & input) {     while (input)     {         if (p==0)         {             p = new osobnicy;             string linia;             getline(input, linia);             istringstream strumien(linia);             int gen;              while (strumien >> gen)             {                 p->dlugoscDNA = zapiszGenotyp(p->pGeny, 0, gen);             }               p->pNext = 0;              double(*wybraneDopasowanie)(genotyp*);             wybraneDopasowanie = dopasowanie1;             p->dopasowanie = wybraneDopasowanie(p->pGeny);          }         else if (p->pNext == 0)         {          osobnicy *nowy = new osobnicy;         string linia;         getline(input, linia);         istringstream strumien(linia);         int gen;          while (strumien >> gen)         {             nowy->dlugoscDNA=zapiszGenotyp(nowy->pGeny, 0, gen);         }          nowy->pNext = 0;         p->pNext = nowy;          double(*wybraneDopasowanie)(genotyp*);         wybraneDopasowanie = dopasowanie1;         p->dopasowanie = wybraneDopasowanie(p->pGeny);      }     else         stworzListeOsobnikow(p->pNext, input); }   And they use following structures  struct genotyp {        genotyp * pNext;             int gen;                 };  struct osobnicy {      osobnicy * pNext;        genotyp * pGeny;             int dlugoscDNA;              double dopasowanie;      };   When I try to run then code it stops on when the stworzListeOsobnikow() runs the zapiszGenotyp(). I've realised that pointer passed to zapiszGenotyp() as genotyp *p is always CDCDCDCD but i have no idea what it means. Just using p->pNext in zapiszGenotyp() crashes the program. Could anyone explain to me what is this CDCDCDCD pointer, and what seem to be wrong with my code?

I know that the compiler will sometimes initialize memory with certain patterns such as 0xCD and 0xDD.  What I want to know is when and why this happens.  When  Is this specific to the compiler used?  Do malloc/new and free/delete work in the same way with regard to this?  Is it platform specific?  Will it occur on other operating systems, such as Linux or VxWorks?  Why  My understanding is this only occurs in Win32 debug configuration, and it is used to detect memory overruns and to help the compiler catch exceptions.  Can you give any practical examples as to how this initialization is useful?  I remember reading something (maybe in Code Complete 2) saying that it is good to initialize memory to a known pattern when allocating it, and certain patterns will trigger interrupts in Win32 which will result in exceptions showing in the debugger.  How portable is this?


The story has two point of views. In the first a farm girl somehow ends up moving to a city, and working for a nobleman. She ends up falling in love with the nobleman's friend and constant companion. The nobleman is working to recover the last secrets of magic, which he believes are hidden in folk stories and songs. He is portrayed as very dedicated to this task, commonly forgetting to eat while he spends hours working. The girl works for him copying the spell manuscripts that the Noble obtains or produces.. At some point the Noble takes on students/apprentices The nobleman thinks that she cannot read and is merely copying the shapes but she can actually read and notices that the manuscripts he gives her to copy have been changed from the original form, specifically the manuscripts intended to give extended life. It seems that the Noble did this maliciously and intends to gain power over his friend and his students.  The girl and the noble's friend plan to escape with the original copies, but the noble's friend never shows up and the girl ends up getting her memory erased by the noble. She ends up living on the streets of the city and eventually opens a cheese shop. She is apparently immortal as she does not age, the apparent effect of the age extending manuscript, and closes and reopens the cheese shop every few decades so no one noticed her lack of aging. The novel ends with some attack? on the city and as she evacuatesone of the noble's students directs her out of the city  The second point of view is that of a boy in the future, many years after the girl was born. Magic has been restored and he goes to the academy to learn it. At the academy all the teachers are the noble's students from the girl's chapters. Life at the academy is very tough and there is intense competition to be the best. The boys end up murdering one of the others for reasons I cannot remember.

I only remember reading the first book. It was in middle school (around 2009-2011) so I'm a little fuzzy on the details, but I know once I see or read the title I'll know it.   I remember that it followed two main characters, a girl and a boy.  The boy was high born and was from a time of magic. He was sent to wizard school in a castle where he and the other boys were taught Socrates style, having to figure out the information on their own with little teaching. They had a cafeteria area where you could eat anything you wanted as long as you could concentrate enough to conjure it from the stone, so the boy ate apples, which he remembered most of all because he fed them to his horses. Eventually, after months of the same thing, the boys began to trade food. But he decided to use the stone to conjure soap, and that's when they gave him new robes, as in him moving up in rank.  The girl was born on a farm. Her mother was sick, so she went to get a healer. They killed her mom, and stole all her valuables from the farm house. I remember more, but I think it would confuse rather than help.  Key information: I believe the stories tie into each other like one is from the past, the other the future...  The books' tone was kind of dreadful with the hope of something better, like the boy could become a great wizard and the girl could solve a problem to this magical rebellion I think or learn more magic.


I'm a little bit of a newbie here and I apologize for that. So I've been looking for someone who has the same issue and stuck with Ubuntu 16.10 which is not being supported at the moment. I can't really update anything nor update the O.S as the host is completely shut down. So I came to the conclusion that I must re-download Ubuntu 16.04 and just reinstall the whole thing from scratch. But before I do anything I just want to make sure if there's any alternative way.  Thank You!

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


I had a normal portal system before, but today I decided to get ontop of the nether (the bedrock) and build a better\more organized portal system  when I did it, I just moved the portals exactly on the top (I didn't change the X OR Z coordinators) just the Y.  So I got in the portal from the nether and it linked with the one at my base (home), that's great, but when I came back to the nether it didn't link with the one on top, it generated a new one, I broke the new one and tried again, and it's still not working.  Any ideas about how to figure it out? Besides than going back to the old system (not on top)  edit:it's not a duplicated question and that's why: I'm not in the ordinary nether I'm on top of the bedrock and i know that each nether block is 8 blocks in the over world and my portal is in the exact same location of the over world multiplied by 8 in the nether

I have recently build a platform above my house at y=250. As my house is at ground level, I would prefer not to have to build a tower every time I wish to get up there, and ideally I would like to not have a tower visible between the platform and my house.  With this in mind, I decided that nether portals would be the way to go. I have a nether portal in my house at y=57 and one on my platform at y=250, I also have portals in the same places at y=70 and y=115 in the nether.  Unfortunately, the portal at y=155 in the nether sends me back to the portal in my house. I understand that this is because the house portal is closer. Is there any possible way for me to travel to my platform using nether portals? Or failing that, any way to travel there without building something between my house and the platform?


I am using this to produce a plot of % of names starting with a certain letter over a span of years. When plotting (and printing) my diction (letter_d) the keys are disordered rather than being sequential like how they are added to the dict. Is there a way to fix this, I believe I am adding them to the dict in a sequential order. If not is there a way I can create connect the dots of my scatter plot in order to simulate the correct line plot?    import csv import matplotlib.pyplot as plt   start = 1880 stop = 1890 x = [] years = range(start, stop +1) print years letter_d = {} year_d = {} alphabet = ['Z']#,'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']  for i in alphabet:     letter_d[i] = 0  for year in years:     filename = 'yob' + str(year) + '.txt'     z = open(filename)           year_d[int(year)] = 0     letter_d[i] = year_d     c = 0     d = 0     for line in z:         y = line.strip().split(',')         y.remove(y[1])         c += int(y[1])         if i in y[0]:             d += int(y[1])         year_d[year] = float(d)/float(c)                     #x.append(y) #print year_d print year_d.keys() plt.plot(year_d.keys(), year_d.values()) plt.show()

Here is the dictionary I have  propertyList = {     "id":           "int",     "name":         "char(40)",      "team":         "int",     "realOwner":    "int",      "x":            "int",     "y":            "int",      "description":  "char(255)",      "port":         "bool",     "secret":       "bool",     "dead":         "bool",     "nomadic":      "bool",      "population":   "int",     "slaves":       "int", }   But when I print it out with "\n".join(myDict) I get this  name nomadic dead port realOwner secret slaves team y x population id description   I know that a dictionary is unordered but it comes out the same every time and I've no idea why.


There is no link in special duplicate block to the origin question for old posts. Check out :    The most  contain links in the block:

When Community marks a question as "Possible Duplicate" and at the same time the Question is closed as exact duplicate, the link is missing from the 1st notice.    Examples:       Can we fix this?  References


"One of the sources of water in our country are the rivers" in this sentence, wasn't it supposed to be 'is' instead of 'are'? Normally we say "One of my friends is responsible for this," don't we?

One of the things that makes him great is he brings it every night.   I'm pretty sure it should be that make him in the plural, because one of the things is referring to a lot of things and a lot of things should take a plural verb. But I always hear native speakers in America say it in the singular, so with an s.  Another example:     This is one of the responsibilities that comes with greatness and he understands that.   Native speakers always use the verb in the singular (here, comes) even though [I believe] it is grammatically incorrect to use the singular form of the verb there.


When Neo is sitting in his cubicle after being reamed out by the boss for being late to work, his monitor is off and he doesn't appear to be working - in fact, his monitor doesn't appear to even be connected to a computer. Why is this? Were the filmmakers just being cheap and hoping that no one would notice, or is there some other reason? Is it possible that there's some kind of symbolism here?

The Matrix is not a movie with an overdose of realism.  But parts of it take place in the normal "real" world. We see Neo at work in his software company in his cubicle before the Agents come to his workplace to arrest him. Neo is a programmer in his day job. So why does his cubicle not look like a programmer's? Whatever your view of what a programmer's workplace should look like, it should not be a sterile empty cubicle with no sign of any actual activity. There is no paperwork, no notes and no signs of any sort of activity on his desk. There are no reference books, manuals (and this is set before such resources as stackoverflow went online) or any other sign of activity. Moreover, his computer is turned off.   What explains this? Is it meant to mean something, or were the film makers just being lazy?


It has been around a week that my Updates tab in the App Store looks like this:  All the other tabs are looking normal. The only thing I tried was a restart, the iMac does not have any other weird behaviour. Here are my details, serial hidden for privacy:  Thank you.

Basically the "updates page" loads in a non rich html format, and if theres an update it's missing the tabs on the update page as well.  I can't figure out if this is just because apple may have stopped supporting El Capitan or if I have something else going on.  Any help would be appreciated.  I've trashed the caches in library and the user profile. But this page is the only one that still loads like this (see pic below) on my app store.


I was trying to make a redstone clock that kills a mob with a certain name in a 200 block radius and I messed up and it just kills me. Is there anyway and can break it without dying?

I set a command block to /tp. It was supposed to activate only if you had 0 time left, and to activate the command block with a hopper clock to keep giving it power.   But it is not checking if you have 0 time left, so it keeps teleporting me. I can't get close enough to the command block to break it, so I'm stuck in a neverending teleport loop.  Any ideas?


Let n be a positive integer and let $H=\{z\in\mathbb{C} | \space \space z^n = 1 \} $  i)Prove that the sum of  all elements of H is $0$  ii) Prove that the product of all the elements of H is 1 if n is odd and -1 if n is even.  I)Picking some fixed n and drawing this out its very obvious when n is even and still rather obvious when n is odd but how do i write it out formally which holds for any fixed n?  II) when this is odd we can pair the second and last the third and second last  etc together each product will =1 as they are inverse of each other and the first term is $e^{0}=1$ for the even case i have no idea.  $H=<e^{\frac{i2\pi k}{n}}>$ for some fixed postive integer n where k is in $\mathbb{Z}$

Question: If $c\neq 1$ is an $n^{th}$ root of unity then, $1+c+...+c^{n-1} = 0$  Attempt: So I have established that I need to show that $$\sum^{n-1}_{k=0} e^{\frac{i2k\pi}{n}}=\frac{1-e^{\frac{ik2\pi}{n}}}{1-e^{\frac{i2\pi}{n}}} =0$$ by use of the sum of geometric series'. My issue is proceeding further to show that this is indeed true.


(Couldn't find an appropriate topic that answers my question. I understand why round-trip tickets are cheaper and why non-direct flights may be cheaper as well, but this is just ridiculous)  I was planning a trip to Germany with Lufthansa the next week and was searching for tickets between LED and TXL. I found out that it will cost 21k RUB and there is a transfer in FRA. As you can see, a trip consists of LH1439+LH176 and LH193+LH1438.    Okay, so I guess I could just have a nice trip to FRA and save myself money and time? Like just use LH1439 and LH1438. Nope, it actually costs 70% more.    How is that even possible?

Usually I find a flight I like that uses one or more connections with the same or different companies. In these cases, if the distance between the first and the second connection is not too large, I prefer to go by bus or train and then take the flight. The problem is that sometimes it is more expensive to take the flight in the second airport than to take the flight from the first one. I mean, I'm wondering why sometimes it is more expensive to take only a flight than to take the same flight and another one.  A practical example (and real, you can check with SkyScanner). Imagine I am in Madrid (Spain) and would like to go to Rio de Janeiro (Brazil) on April 1st. The cheapest flight I have found is this:     TAM airlines: MAD -> GRU -> GIG : 507 €   Fantastic! GRU is one of São Paulo's airports. That's perfect for me! I'll go on to Rio traveling overland. But then, I look for this flight (MAD -> GRU, non-stop):     TAM airlines: MAD -> GRU : 597 €   It's the same flight, 90 € more expensive! I've found this kind of behavior a lot of times and I'm intrigued to know why it happens.


If T and S are distributed exponential T,S = Exp(lambda). What is distribution T+S? The solutions says its gamma(2,lambda), but I don't understand why. I can only guess the answer by knowing that E(X+Y) = E(X)+E(Y) and in this case its 1/lambda+1/lambda = 2/lambda. And we know E from gamma distribution that is n/lambda, so T+S is gamma distribution with parameters 2 and lambda. I would also like to ask what in gamma distribution means gamma(n)

I have a sequence $T_1,T_2,\ldots$ of independent exponential random variables with paramter $\lambda$. I take the sum $S=\sum_{i=1}^n T_i$ and now I would like to calculate the probability density function.  Well, I know that $P(T_i>t)=e^{-\lambda t}$ and therefore $f_{T_i}(t)=\lambda e^{-\lambda t}$ so I need to find $P(T_1+\cdots+T_n>t)$ and take the derivative. But I cannot expand the probability term, you have any ideas?


I am trying to break down a long given string into a smaller string of given length x,  and it returns an array of these small strings. But I couldn't print out, it gives me error [Ljava.lang.String;@6d06d69c Please take a look at my code and help me out if I am doing wrong. Thanks so much!  public static String[] splitByNumber(String str, int num) {      int inLength = str.length();     int arrayLength = inLength / num;     int left=inLength%num;     if(left>0){++arrayLength;}     String ar[] = new String[arrayLength];         String tempText=str;         for (int x = 0; x < arrayLength; ++x) {              if(tempText.length()>num){             ar[x]=tempText.substring(0, num);             tempText=tempText.substring(num);             }else{                 ar[x]=tempText;             }          }       return ar; }  public static void main(String[] args) {     String[] str = splitByNumber("This is a test", 4);     System.out.println(str); }

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


Sorry if there's any mistake in the language.   In Einstein's General Relativity Theory gravity is described as the curvature of the spacetime fabric. So can analogous to a real fabric can this spacetime fabric also tear?   In a gravitation field where spacetime is curved time slows down. So what happens to the point in spacetime where it is torn? What causes the spacetime to tear?

If space is warped by objects in space, and black holes are made of infinitely   heavy objects, can space be torn by black holes?


I'm making an isometric map for a game, I can draw it, but I don't know how to implement a sort of 3d collision detection without Threejs or other 3d library.  It is possible? Maybe make the block an Object can help? I have searched a lot on the web, but I found only libraries. Thank you!  This is my JavaScript code:    var canvas = document.getElementById('canvas'),  ctx = canvas.getContext('2d'),  width = canvas.width = window.innerWidth,  height = canvas.height = window.innerHeight,  stop = false;  var tw, th; var player;  setup(); draw();  function setup(){   ctx.translate(width/2,50);    tw = 60; //tile width   th = 30; // tile height   player = new Player(2,3,2);  };  function draw(){    ctx.clearRect(-width/2,-50,width*1.5,height+50);      for(var i = 0; i < 5; i++){       for(var j = 0; j < 5; j++){         drawBlock(i,j,1,tw,th);       }     }      if(!stop){      requestAnimationFrame(draw);     } }  function drawBlock(x,y,z,w,h){   var top = "#eeeeee",      right = '#cccccc',      left = '#999999';   ctx.save();  ctx.translate((x-y)*w/2,(x+y)*h/2);   ctx.beginPath();  ctx.moveTo(0,-z*h);  ctx.lineTo(w/2,h/2-z*h);  ctx.lineTo(0,h-z*h);  ctx.lineTo(-w/2,h/2-z*h);  ctx.closePath();  ctx.fillStyle = "black";  ctx.stroke();  ctx.fillStyle = top;  ctx.fill();   ctx.beginPath();  ctx.moveTo(-w/2,h/2-z*h);  ctx.lineTo(0,h-z*h);  ctx.lineTo(0,h);  ctx.lineTo(0,h);  ctx.lineTo(-w/2,h/2);  ctx.closePath();  ctx.fillStyle = "black";  ctx.stroke();  ctx.fillStyle = left;  ctx.fill();   ctx.beginPath();  ctx.moveTo(w/2,h/2-z*h);  ctx.lineTo(0,h-z*h);  ctx.lineTo(0,h);  ctx.lineTo(0,h);  ctx.lineTo(w/2,h/2);  ctx.closePath();  ctx.fillStyle = "black";  ctx.stroke();  ctx.fillStyle = right;  ctx.fill();   ctx.restore();  }  function drawTile(x,y,stroke,col){   ctx.save();  ctx.translate((x-y)*tw/2,(x+y)*th/2);   ctx.beginPath();  ctx.moveTo(0,0);  ctx.lineTo(tw/2,th/2);  ctx.lineTo(0,th);  ctx.lineTo(-tw/2,th/2);  ctx.closePath();  if(stroke){   ctx.stroke();  }else{   ctx.fillStyle = col;   ctx.fill();  }   ctx.restore();  }  function Player(x,y,z){   this.x = x;   this.y = y;   this.z = z;   this.w = 10; //width   this.h = 10; //height } canvas{   width:100%;   height:100%; } <canvas id="canvas"></canvas>

I am having some issues with trying to detect collision of two isometric tile.  I have tried plotting the lines between each point on the tile and then checking for line intercepts however that didn't work (probably due to incorrect formula)  After looking into this for awhile today I believe I am thinking to much into it and there must be a easier way.  I am not looking for code just some advise on the best way to achieve detection of overlap