So here is the thing, I'm working on my own little PHP based forum software for my college exam (comp. sciences). One thing I found tricky to do is to allow html content. One of the exam requirements is SQL security.  In my forum I want to allow someone to copy and paste something from the internet, like say a WikiPedia article, with all hyperlinks and font styling to transfer over ones they paste it into the forum textarea.  I was able to achieve this with use of nicEditor which is a js wysiwyg editor. Now the problem strives from the way I validate the user input. In order to make the input secure it's called in such format.  parsebbCode(htmlentities(stripslashes($posts_content)))   This pretty much renders everything useless, turning html into plain text. So here is the thing, how can I store the html code in it's default state in MySQL and convert it into rich format ones it's going to the client side, without creating a SQL vulnerability? Or should I just write some BBCODE to parse the basic elements instead?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


As the question asked, Is every subset of $\mathbb{Z^+}$  countable?

In my book, it proves that an infinite subset of a coutnable set is countable. But not all the details are filled in, and I've tried to fill in all the details below. Could someone tell me if what I wrote below is valid?  Let $S$ be an infinite subset of a countable set $T$. Since $T$ is countable, there exists a bijection $f: \mathbb{N} \rightarrow T$. And $S \subseteq T = \{ f(n) \ | \ n \in \mathbb{N} \}$. Let $n_{1}$ be the smallest positive integer such that $f(n_{1}) \in S$. And continue where $n_{k}$ is the smallest positive integer greater than $n_{k-1}$ such that $f(n_{k}) \in S$. And because $S$ is infinite, we continue forever. Now consider the function $\beta : \mathbb{N} \rightarrow S$ which sends $k \rightarrow f(n_{k})$.   So in order for $S$ to be countable, $\beta$ would have to be a bijection. $\beta$ is injective since if $f(n_{k}) = f(n_{j})$, then $n_{k} = n_{j}$ because $f$ is injective. We also can conclude $k = j$ because the various $n_{i}$ chosen were strictly increasing.   Edit: $\beta$ also needs to be surjective. So for every $r \in S$ there exists a $q \in \mathbb{N}$ such that $\beta(q) = f(n_{q}) = r$. We know that $f^{-1}(r) \in \{n_{1}, n_{2}, ..., n_{k} ... \}$, so we can let $f^{-1}(r) = n_{d}$. Thus $\beta(d) = f(n_{d}) = r$.


I want to find the derivative of a function $f$. If I manage to find a function $g$, whose derivative I know for all $n$ such that $$f(x)=\lim_{n\rightarrow \infty} g(x,n),$$ is it true that $$\frac{\partial f}{\partial x}(x)=\lim_{n\rightarrow \infty}\left( \frac{\partial g}{\partial x}g(x,n)\right)?$$  I'm asking this because I want to know $$\frac{\partial \theta}{\partial x_i}(||\vec{x}||),$$ where $\theta$ is the Heaviside step function.

Let $(f_n)_{n\in \mathbb N}$ be a sequence of smooth functions converging to some $f$.  Under what circumstances can I exchange limit and derivative?, i.e.  $$\lim_{n\rightarrow \infty} \frac{\partial f_n(x)}{\partial x} = \frac{\partial f(x)}{\partial x}$$


There was something that I was getting a little curious about. We know that there are the so-called compound-angle formulae for calculating sines and cosines of sums of angles in terms of those of the original angles:  $$\sin (\alpha+\beta)=\sin\alpha\cos\beta+\cos\alpha\sin\beta$$ $$\cos (\alpha+\beta)=\cos\alpha\cos\beta-\sin\alpha\sin\beta.$$  Now, do there exist any sort of formulae for products of angles, that is, for $\sin(\alpha\beta)$ and $\cos(\alpha\beta)$? If so, how can one derive them? (I had a play and tried to get something, and it ended up being rather nasty; only holding for small-ish angles $\beta$ and resulting in some infinite series that may or may not converge to anything well-known.)

If it is possible to express  $ \cos n \alpha $ in terms of $ \cos \alpha $  as a power series for integer $n$ ...  I like to see an expression for the quotient angle that obviously tallies when $ (\alpha , \beta) $ are swapped.  EDIT1:  Something like:  $$ \cos (\alpha - \beta)= \cos \alpha \cos \beta  + \sin \alpha  \sin \beta $$  EDIT2:  Like to know why $ \cos ( \alpha / \beta )$ cannot be expressed in terms of $ \cos \alpha, \cos \beta $, but  $ \cos ( \alpha + \beta) $  can be expressed in terms of  $\cos \alpha $ and $ \cos \beta. $


I have a generator in Python, and I want to loop over it if it has items, and perform a different action if it is empty. Something like  if generator is empty:     perform some action else:     for item in generator:         perform some actions   I know there is no way to tell if a generator is empty without iterating through it, but it seems that there should still be some nice elegant way to perform this logic. The best I can think of is something along the lines of , which seems very inelegant, I guess because it has to treat the first element of the generator separately from the rest.

Is there a simple way of testing if the generator has no items, like peek, hasNext, isEmpty, something along those lines?


I think it is well known that only moderators can see  comments.   But what I am wondering (mainly out of pure curiosity): can moderators also see the "edit history" of comments?

I think it could be a useful feature. From an experienced usage of the site, I have the impression as if they didn't see that, but I am not sure. I know about : it asks for the visibility of the deleted comments. This is about the visibility of the previous versions of the edited comments.


Along with the information in the title, I can provide a few more details. I read this in the early to mid-nineties, and the cover art had a teenage boy who had his hands on his head with a few stylized "BZZZAP" onomatopoeia around his head.  My memory of the plot is hazy, but it dealt with a computer-savvy teenager who accidentally electrocuted himself while working on his computer. He found that he was able to easily ace his tests at school (specifically a math exam) because of this. I'm not sure if he was able to interface with internet, or if that's something I imagined he would be able to do while I was reading the book.

I remember this book from 15+ years ago about a normal boy who was working on his computer (replacing the motherboard maybe?) and he touched something and got zapped. When he came to he came to realize that the computer shocked itself into his head.   Cut to being the hero sometime down the line and maybe saving someone who was kidnapped? Or was kidnapped himself and had to get out of it using the computer?  I don't know why it's in my head all of the sudden but Google isn't helping me at all!


I am trying to find an easy way to measure the total length of a selected edge loop, without having to manually add up the lengths of each edge given by Blender's Overlay. I have found some suggestions that the MeasureIt addon is capable of doing this, but I haven't been able to figure out how in Blender 2.83. Basically, I want to be able to select a series of connected edges, and get the number I would get by adding up all of their individual edge lengths, in the quickest way possible.

I have a complex curve which is a series of vertices and I would like to find the total length of all the vertices. MeasureIT can show me the length of each segment in the curve but does not seem to offer a total length. Is there any tool that can do this?


Show that a metric space $(X,d)$ is totally bounded(ball compact) if and only if every sequence in X has a Cauchy subsequence.  I already proved that if $(X,d)$ is ball compact, then every sequence in X has a Cauchy subsequence. But I have no idea how to the other part.

Prove that a metric space is totally bounded if and only if every sequence has a Cauchy subsequence.    I think I proved the Cauchy subsequence part:  Let $a_{0},a_{1}, a_{2}, a_{3}, a_{4},...\in X$ be a sequence.  For each $k$, let $F \subseteq X$ be a finite $\frac1k$-net.  Given $I \subseteq \Bbb N_{\ge0}$ and $k>1$ you find an infinite $J \subseteq I$ such that: $$\exists p\in F:\forall n\in J: d(x_n,p)<\frac1k$$


I am getting a blank page, at the end of my report in SSRS 2005.  I have a header logo and footer date values, and I have set the both to PrintOnLastPage = False, but I am still getting a blank last page.  Any ideas how to eliminate it? Thanks!

I have a two-page SSRS report. When I exported it to PDF it was taking 4 pages due to its width, where the 2nd and 4th pages were displaying one of my fields from the table. I tried to set the layout size in report properties as width=18in and height =8.5in.  It gave me the whole table in a single page of PDF, but I am still getting the 2nd and 4th pages blank.   Is the way I am doing it incorrect?  How else can I get rid of those blank pages?


Why is radians the only unit for which I can use take $\sin(\sin(x))$ (Why is it the the default unit of trigonometry). This does not work if change the definition of a radian. But works if we change the definition of $\pi$ itself  Is this due to how we derive the Taylor Polynomial of $\sin(x)$ and $\cos(x)$ ? or How the  differential of $\sin x$ in radians is $\cos x$ ?(i.e because $\frac{\sin x}{x}$ converges to $1$ as $x\to 0$)  Or is it because of some convention or assumption somewhere?

I have learned about the correspondence of radians and degrees so 360° degrees equals $2\pi$ radians. Now we mostly use radians (integrals and so on)  My question: Is it just mathematical convention that radians are much more used in higher maths than degrees or do radians have some intrinsic advantage over degrees?  For me personally it doesn't matter if I write $\cos(360°)$ or $\cos(2\pi)$. Both equals 1, so why bother with two conventions?


Im trying to install an iLok crack at /System/iOSSupport/usr   After installing the plugin, and trying to Replace a libstdc file  at / usr / lib / (with a file from an archive for the current version) but i can't modify this folder, instead this alert pop up: "you cannot complete this operation because you don't have the necessary permission".  I have this files for the crack: 10.10.5_libstdc .6.0.9.dylib.zip 10.9.5_libstdc  .6.0.9.dylib.zip 10.8.5_libstdc  .6.0.9.dylib.zip  Im running Catalina 10.15.3 do I need to run another version for this? do I have to treat rights with DiskUtility?

I upgraded to OS X El Capitan and tried to install a new app (MPLAB X from Microchip) but I got an error because it couldn't copy a library to /usr/lib even when it asked for root password. I tried to manually copying the library using sudo cp libSEGGERAccessLink.dylib /usr/lib but it says cp: /usr/lib/libSEGGERAccessLink.dylib: Operation not permitted.  Is this a permission issue? How can I write to /usr/lib?  ls -ld /usr/lib returns:   drwxr-xr-x  263 root  wheel  8942 Oct  2 15:49 /usr/lib


Can i buy a MAC in US and take it to India? Ofcourse i can! But my question is do i have to pay extra taxes or something for that maybe in US or india?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


I have a python program which prints 1-300,000 with a 1 second gap between each number. I'm running the program on command prompt windows and the output stops showing after 40,000. I suppose the buffer is filled and due to this the output printing is stopped. How do I keep seeing the output?

Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.  Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times.  I'm wondering if, and how, to clear the Python interpreter console.  I've heard about doing a system call and either calling cls on Windows or clear on Linux, but I was hoping there was something I could command the interpreter itself to do.  Note: I'm running on Windows, so Ctrl+L doesn't work.


I recently Installed Ubuntu 19.04, with Windows as dual boot. My device is Lenovo ideapad 330-15AST U. I can't connect to the wireless networks.  I am an absolute beginner to Ubuntu.   Ran the following command:   lspci -knn | grep Net -A3; rfkill list   Following is the received output:   01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]     Subsystem: Lenovo RTL8821CE 802.11ac PCIe Wireless Network Adapter [17aa:c024] 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller [10ec:8136] (rev 07)     Subsystem: Lenovo RTL810xE PCI Express Fast Ethernet controller [17aa:3861]     Kernel driver in use: r8169 0: ideapad_wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: ideapad_bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no

I'm trying to install drivers for my Wifi on my HP All-in-one desktop. I've been told to show the output of the command "sudo lshw -C network" so here it is:  *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: 48:ba:4e:5c:06:5f size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.21 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: ire:31 import:e000(size=256) memory: fea04000-fea04fff memory:fea00000-fea03fff  *-network UNCLAIMED description: Network controller product: Realtek Semiconductor Co., Ltd. vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: import:d000(size=256) memory:fe900000-fe90ffff   Output from "lspci -nnk | grep -A2 0280":  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821] Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:831a] 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)


I have users that login automatically via ssh to a script I defined instead of a shell. The script basically launches a program which has a shell-escape in it which would allow the user to execute commands outside of the program. If I can disable all commands of a user, then that shell-escape function won't matter. How can I disable all commands to be executed from any given user? For clarity, in /etc/passwd, the shell is set to /usr/user.sh and in user.sh, a program is launched.

How to block command, let say mkdir for specific user ?  What I did just created read-only function and store in users profile ~/.bashrc   /bin/mkdir() {         echo "mkdir command not allow for you"  }  mkdir() {         echo "mkdir command not allow for you"  } ./mkdir() {          echo "mkdir command not allow for you" }  readonly -f /bin/mkdir readonly -f mkdir readonly -f ./mkdir   Test:   rahul@ubuntu:~$ cd /bin/ rahul@ubuntu:/bin$ ./mkdir /home/rahul/ggg mkdir command not allow for you rahul@ubuntu:/bin$ cd rahul@ubuntu:~$ mkdir testing mkdir command not allow for you rahul@ubuntu:~$ /bin/mkdir testing mkdir command not allow for you   So my question is What should be the way of achieving this ?  is there any tool for this ?   Update 1 # But if user is smart , he could copy mkdir binary and rename it and use it . So how to achieve this ?


I worked at an agency coding websites for some time.  I got very good, to where I could code entire websites from scratch in less than a day.   The agency had a separate department for graphic design, those designers would give me proofs of the final website exactly how it was to look and what it was to say.  This is how I was able to code them so fast, I had full visual proofs of end product exactly as it should look.  Now I've been back to coding on my own for a couple years, and the biggest hurdle I am still having is creating a process of some kind to actually design the site.  If I can have a final design, I can code the site quickly.  What is stopping me from finishing any sites lately is I have to design them too.  And it can take me weeks to design one site.  I can eventually make them look good, but its just trial and error for 2 weeks straight until I finally come up with something that looks half way decent.  My question, as a coder, how can I learn to design the sites too?  I've tried working other designers but it hasn't worked out so well.  I need to fill the shoes of a designer as well.  And I need a process of some kind so designing sites can be a task that I can schedule, rather than it having to be some kind of creative retreat that takes weeks and weeks and hopefully I come down from the mountain with something that looks nice.    I need a step by step guide so to speak, or some kind of training to be able to design sites as quickly as I code them.  My uncle offered to pay for any courses I could take that would train to be a professional site designer.  Does anyone have good links to online courses that can make me into a good designer so I can design the websites before coding them?  Thanks, David  EDIT:  The best web designers at the agency I worked for happened to professional print layout artists before learning the do the graphics for websites.   Edit 2:  Theres another good answer here: , the answers there and here are all great.  This post is still valid because one is from the East, one is from the West.  Combined the two should cover every aspect and no one ever needs to ask this question again ;) (of course unless someone from Antarctica asks the question for a third time!)

I'm a web developer mainly working in front end developing. My main fields are HTML5, CSS3 and Flash ActionScript 3.0.  Here in Iran, teamwork means nothing for most of the people, but I think it's the most important aspect of our work, especially in web design.   I have poor skills in graphic design and UI design. I always have to work with graphic designers for my websites. They are usually good and skilled designers. But they are all print designers and unfortunately they know nothing about the web and designing for it.  For example, one of the designers that I work with most of the time is a great designer and he won a couple awards for his logo and poster designs. However, he knows nothing about the web and most of my time is spent explaining to him how things work on the web, i.e. in what size he should work, using pixels instead of centimeters, and so on... After all he is a print designer, not a web designer. They often think everything is static and constant, not in motion.  So the best way to work around this is to improve my skills in graphical designing. I just want to be able to design good layouts, make good color selections, and etc for my websites. I do not want to design illustrations and do heavy graphical works. Just design websites with no Photoshop illustrations like posters and etc.  What do you do for your graphic works, and if you do them yourself, which books or references do you suggest I read? Where should I start?


When you listen to old radio broadcasts such as the War of the World or this Dick Tracy radio feature, you can hear Americans having the kind of fast talking and inflections you associate with old-time radio:    Did people really talk like that? On the Honeymooners, you can see similar things when Norton speaks. It's not always as fast, but the focus of the topics, the way they interrupt each other, etc. is very different from today. Did everyday people speak like this?  In your answers, if you could link to some youtube videos or soundcloud recordings of how regular Americans used to speak in the past, and comment on the differences between that, radio and current speech patterns, that would be great.

I watch a lot of old movies, and I've noticed that American actors of the 1930s and 1940s often spoke in a quasi-generic-posh-British accent.  Katherine Hepburn's accent would be the perfect example. It seems exaggerated, and I imagine it was not common off the stage and screen. What was that? Was it just an accent or was it a dialect? Did real people actually speak that way?


I need to define the symbol ||| in my list of symbols. Then, it must be called from the caption of a figure and be displayed in a footnote. The following MWE illustrates the problem I've encountered.  My main file:  \documentclass{article}  \usepackage{graphicx} \usepackage{mwe} \usepackage{kantlipsum} \usepackage[nogroupskip]{glossaries}  \makenoidxglossaries \loadglsentries{gloss-symb}  %For applied indentation to the glossary \newglossarystyle{mylong}{%     \setglossarystyle{long}%     \renewenvironment{theglossary}%     {\begin{longtable}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.8\hsize}}}         {\end{longtable}}% }  \begin{document}  \printnoidxglossary[sort=def,style=mylong,title={List of Symbols}] \printnoidxglossary[type=symbols,sort=use]  \input{myChap}  \end{document}   My chapter file:  \kant[1]   \begin{figure}[!htb]     \includegraphics[scale=1]{example-image}     \caption{Here is the caption\protect\footnotemark.} \end{figure} \footnotetext{$n$-ary operator `\gls{compose}' represents XXX.}  \kant[1]    My glossary file:  \newglossaryentry{compose}{name={|||},description={$n$-ary composition operator}}   As the following output shows, the symbol is not correctly printed in the footnote, nor in the list of symbols:    What am I doing wrong?...

I accidentally, discovered that using | in text mode produces an em dash. I did a quick search, but I could not find a reference where this is noted. I wonder if there is any difference between this and ---? Otherwise, it seems easier to just type one character instead of three.


why there is no clone operation for collections in Java ? There must be able to copy the contents of the collections to a new collection and modify the second collection without affecting the first one

How can I clone an ArrayList and also clone its items in Java?  For example I have:  ArrayList<Dog> dogs = getDogs(); ArrayList<Dog> clonedList = ....something to do with dogs....   And I would expect that objects in clonedList are not the same as in dogs list.


In the theorem environment, I use \begin{enumerate}[(i)] to list some properties. This makes the numbering italic but I want them to be regular font. Is there any way to do this?

I have one problem with enumerating. The symbols for items look differently when the enumerating is done ''inside'' propositions from the enumerating done ''inside'' a proof.   The code  \documentclass[11pt,a5paperfootinclude=true,headinclude=true]{scrbook} % KOMA-Script book \usepackage[T1]{fontenc}                 \usepackage{lipsum} \usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters \usepackage[bitstream-charter]{mathdesign} %\usepackage[osf]{libertine} \titleformat{\section}   {\normalfont\bfseries}{\thesection}{1em}{}       \usepackage{amsthm} \usepackage{amsmath}  \usepackage{multicol}  \usepackage{IEEEtrantools}  \usepackage{anysize} \marginsize{0.1\paperwidth}{0.1\paperheight}{2cm}{2cm} \newcommand{\bigslant}[2]{{\raisebox{.2em}{$#1$}\left/\raisebox{-.2em}{$#2$}\right.}}  \usepackage{enumerate}    \begin{document}    \theoremstyle{plain} \newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter  \theoremstyle{definition} \newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers \newtheorem{exmp}[thm]{Example}  \theoremstyle{corollary} \newtheorem{cor}[thm]{Corollary}  \theoremstyle{lemma} \newtheorem{lem}[thm]{Lemma}  \theoremstyle{proposition} \newtheorem{prop}[thm]{Proposition} \newcommand{\ndiv}{\hspace{-4pt}\not|\hspace{2pt}}  \begin{prop} \begin{enumerate}[(a)] % (a), (b), (c), ... \item \item \end{enumerate} \end{prop}  \begin{proof} \begin{enumerate}[(a)] % (a), (b), (c), ... \item \item \end{enumerate} \end{proof}   \end{document}   and the result     Is there any remedy for this, so they look identical or is it impossible? Can we also make a reference to the enumerated item?   Thank you


If I have a string such as:  [text1]Blablablabla[text2]blalal   How do I extract only what is inside first []?  I use this formula to extract content between []  REGEXEXTRACT(B52, "\[(.+)\]")   With above formula I would get: text1][text2.  Not sure how to limit it only for the first pair of [] though, where I would get only text1

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Chapter 2 of "Magento PHP Developer's Guide" states:     Zend Framework 2 uses 100% object-oriented code and utilizes most of   the new features of PHP 5.3, namely namespaces, late static binding,   lambda functions and closures.   While the post  has some answers (such as, that a lambda is just an anonymous function, and that a closure is a function which can access variables not in its parameter list), seems to be specific to the Python programming language (with some mention of the Scheme programming language). For instance, according to the post, in Python, it seems, there can be closures which are not lambdas, and lambdas which are not closures.  However, I am interested in the PHP programming language, not Python. One of the answers below seems to point out that in PHP all closures are lambdas, which conflicts with what the post relating to Python states.  It seems to me, that these concepts vary in the particulars from language to language, and I am interested in PHP, hence this post.  All of this is confusing. While I would assume that lambda functions in general are just unnamed functions, the following Wikipedia article says more about closures:    although has no examples in PHP.

Could someone explain? I understand the basic concepts behind them but I often see them used interchangeably and I get confused.   And now that we're here, how do they differ from a regular function?


I am looking for the title or author of a atory I read back in the 90's, no idea when it was written. The plot goes something like this: Humanity has gained access to space travel and sends 9 or 12 survey ships towards galactic center, only 1 returns with stories of an enemy so rapacious that humanity starts preparing for war. After a long time, the enemy hasn't shown up and people begin to doubt the need to keep building for war. The government engineers a plan to turn the core systems against the fringe worlds and start warring amongst ourselves so that we may be prepared for when the real enemy shows up.  Written with the focus on one spaceship captain battling in our own internal war.

I remember a story I have read buy could not remember the author the name or anything apart from the basic plot. The story is about some future where humanity has to fight with some aliens (not 100% sure). The story tells about a guy who was some kind of activist and who was in a prison two or more times and somehow helped humanity by being held in a prison (can't remember details). I think the story starts by saying that there is a statue in his honor that is not very well known but he did more to help humanity than famous politicians.   The story is most likely written by some famous English-speaking author, though I read it in a translation.


I want to play online games, and other online stuff that requires Flash Player on the internet. Flash Player works just fine under Firefox, but in Chromium I just get a blank page. I don't know what is the exact problem or know to fix it.

I've deleted ~/.macromedia and ~/.adobe contents and after a restart chromium can't detect flash plugin. It works just fine in Firefox  I have only "Chromoting Viewer" on chrome://plugins/  chromium-browser 34.0.1847.116-0ubuntu2 adobe-flashplugin 11.2.202.350-0trusty1   I have profile-sync-daemon active (tried stopping it, of course) and broken PolicyKit as in   Does the detection depend on PolicyKit? What else can I do?


Let's start with the preface that I am a linguist, not a mathematican. My knowledge of stats stopped after A-level oh-so-many years ago. So if answers could be written in simpleton terms, that would be much appreciated!  For a linguistics study, I have used a corpus program to calculate keyness. Keyness being the actual frequency of a word within my corpus compared to the expected frequency, based on its frequency in a larger reference corpus. A keyness of 3.8 is significant to p<0.05 and a keyness of 6.6 is significant to p<0.01. The program has two options for calculating keyness- Log Likelihood and Chi Squared. The creator of the program has set LL as the default, and has stated that he feels it is often the better method.   However, I do need to state in my project why this method has been used, even if just a sentence.   My question: What is the difference between the two tests? Why would LL be the preferred method?

I am trying to come up with a model by using negative binomial regression (negative binomial GLM). I have a relatively small sample size (greater than 300), and the data are not scaled. I noticed that there are two ways to measure goodness of fit - one is deviance and the other is the Pearson statistic. How can I determine which goodness-of-fit measure to use? Are there some criteria that I can take a look at in selecting the goodness-of-fit measure?


Question: When is an orthogonal projection $P: \Bbb C_n \to \Bbb C_n$ a unitary operator?  Thoughts: I thought about using the fact that the only eigenvalues for projections are 1 and 0. Don't really know how to use it though..

Can anyone explain me please how to see this statement: the only orthogonal projection that is also unitary from $\Bbb C^n$ to $\Bbb C^n$ is the Identity.  how can I prove formally that? or how can I see that only the Identity satisfy it?


If someone lives in USA he'd say,     I live in the United States Of America.   But if someone lives in India, he would not say,     I live in the India.   The better way seems to say,     I live in India.   So what is the rule to decide with which country do we use The?

I have been taught that it's grammatically proper to use the before countries like "Sudan and Yemen" but I was never given a reason (if there exists any, of course) when I asked why, except for "it is one of those ambiguous parts of English language that we – as non-native speakers – should just accept without trying to look for a reason". Now, I'd like to know if there is any answer to this "why" or I should keep on believing that there are no hard and fast rules when it comes to questions like these.


I have a transformer with two output coils I have wired them together in series and used the connection between them as 0v and used the other two leads in a diode bridge rectifier. Without any filter caps, I get +12v on one rail and -12v on the other. However when I add in any kind of cap for filtering my voltage jumps up to 20v.   The parts I am using are largely salvaged; but the only part that I have little to no info on is the transformer. It takes US AC voltage, (110-120) but I don't really know what it's intended output is.   I am very much in the learning stage with this stuff so odds are I have made a dumb mistake, but hey, that's why my parts are salvaged. No cost, none lost. Am I right?   EDIT: To clarify I am going for a dual power supply. With 0v and +/-Voltage. I would prefer +/-12v because 20 volts pushes the limit of some of my other external components, but I can change things if needed.

So I found this 9V 1A AC power supply laying around and decided to make a DC source.  I rectified and added a capacitor to make things a bit even. After adding a capacitor my voltage boosted from 9V to 14V. Can somebody explain why this happened for me? (maybe this has something to do with frequency?) According to theoretical graph I should get aprox the same voltage even after adding the capacitor. And voltage varies depending on how much capacity the capacitor has (aprox. from 12-16V). Maybe there's some sort of equation to determine the actual output voltage depending on caps? It would be great to get 12V out of this thing.   P.S.: Personally I find this boost weird because this circuit doesn't have any switches and coils to boost the voltage, so I need an explanation, thank you in advance!


This question comes from Rudin's book "principles of mathematical analysis" chapter  4,exercise 24,on page 101.  The original question is:  Assume that f is a continuous real function defined in $(a,b)$ such that  $$f(\frac{x+y}{2})\leqslant\frac{1}{2}f(x)+\frac{1}{2}f(y)$$ for all $x,y\in (a,b)$.Prove that f is convex.  I have solved this question.But when I am reading the definition of convex function,I find that convex function is not always continuous.So I want to ask if there exists a discontinuous function which satisfies $f(\frac{x+y}{2})\leqslant\frac{1}{2}f(x)+\frac{1}{2}f(y)$ but is not convex? Thanks！

Rudin's Real and Complex Analysis Chapter 3 Exercise 4 is:  Assume that $\varphi$ is a continuous real function on $(a,b)$ s.t. $$\varphi\left(\frac{x+y}{2}\right)\leq \frac{\varphi(x)+\varphi(y)}{2}$$ for all $x,y\in(a,b)$. Prove that $\varphi$ is convex.   The conclusion does not follow if continuity is omitted from the hypotheses.  My question is, is there some way to explicitly construct a counterexample such that  $\varphi\left(\frac{x+y}{2}\right)\leq \frac{\varphi(x)+\varphi(y)}{2}$ for all $x,y\in(a,b)$, but $\varphi$ is not convex?


Whenever I recite recipes or measurements in my head, the quantity of units is usually plural, but I find myself using singular verbs. For instance, "three cups of butter yields 12 batches" or "when measuring speed, five people gives a 20% increase." I figured that since three cups is obviously plural, it should be "three cups of butter yield 12 batches" and "when measuring speed, five people give a 20% increase." But that just doesn't sound right at all, to my ears at least. This might also just be a poor understanding of English on my part, since I didn't grow up with fluent English speaker, but I'm certain that I've heard other people (including my grammar puritan English teacher) talk like this before.

When writing about specific quantities, should the verb reflect a singular or a plural value?  Do abbreviations vs. spelled-out words make any difference?  I took 2 ml of water, which was/were then added... Six microliters of protein solution was/were placed in a centrifuge...


I need to show that $r^n/n!$ converges where $n\ge r$. Which is basically showing $\lim_{n\to inf}\frac{r^n}{n!}=0.$. Yotas Trejos told I need to do this  Let $N$ be an integer number such that $N> r$. Then for $n>N$ the following holds:  $$\displaystyle\frac{r^n}{n!}=\displaystyle\frac{r}{1}\cdots\displaystyle\frac{r}{N-1}\displaystyle\frac{r}{N}\cdots\displaystyle\frac{r}{n}<\displaystyle\frac{r}{1}\cdots\displaystyle\frac{r}{N-1}(\displaystyle\frac{r}{N})^{n-N}   $$  you have that $\displaystyle\frac{r}{1}\cdots\displaystyle\frac{r}{N-1}$ is a constant and $\displaystyle\frac{r}{N}<1$.  But I'm having trouble concluding it.  Is it just because it is a geometric sequence then after that?

The answer is in the title of the question.  I need to show it converges to 0 and $r>0$.  I am sorry if this is a bad question, I'm having trouble explaining it.  So essentially this Do the $\lim_{n\to inf}\frac{r^n}{n!}=0.$


Marocc Air just changed my flights and now I have an 8 hours lay over in Casa Blanca.  Is it safe to take train to city tour for 4 hours and come back?  Advice please.  I have never been to Morocco

My daughter is going to have a flight with one day stopover in Casablanca. Are there places to be avoided in Casablanca for a single young woman? Which ones might they be?


Why do values on the Y-axis change in a probability density plot when changing from raw values to z-scores?   The mean z-score aligns with 0.40 on the Y-axis, while the Y-value for the mean with respect to raw values is much lower. Why is that?    Here is some sample code in R:   x=seq(25,500,length=200) meanx = mean(x) sdx = sd(x)  y1 = dnorm(x, mean = meanx, sd = sdx )  plot(x,y1,type="l", col="red")  xz = (x - meanx)/sdx  y2 = dnorm(xz, mean = 0, sd = 1)  plot(xz, y2, type="l", col = "red")

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


I am relatively new to Unix, and I stumbled across one curiosity. Some shell constructs like case or find, employ pattern matching, but it is not quite regex. Other commands, like  ed, sed, vi, and awk use regular expressions for pattern matching. Could somebody list which shell commands (builtins, programs) use regex, and which use the other type of pattern matching?

I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?


I understand that if a lift is accelerating downward (suppose at 2 $m/s^2$) then a man on the lift will feel a smaller normal reaction force so the resultant force is downward so the man can match the acceleration of the floor of the lift.  Also, if suppose a rope with tension $T$ was pulling up a block from the ground then also the normal reaction force falls. As $R=mg-T$ where $R$ is the normal reaction force.   Now, my question is how exactly does this happen at a microscopic level, like involving the repulsion of electrons between two surfaces. How does acceleration/movement of the surfaces cause the electron repulsion to change or some other way cause the normal reaction force to increase or decrease?  I believe it’s not a duplicate any question as they still does not answer how the repulsion works in an accelerated frame like for the floor of the lift accelerating downwards and the man’s feet.

I've been wondering, what causes the normal force to exist?  In class the teacher never actually explains it, he just says "It has to be there because something has to counter gravity."  While I understand this is true, it never explains why.  Whenever I ask anyone else they always respond in a similar way, saying "It has to be there, because the object is not accelerating", and this has become very frustrating.  So what is the cause of the normal force? From my reasoning, it has to be one of the four fundamental forces. (Gravity, electromagnetism, the weak force, or the strong force).  It would seam to me that electromagnetism would make to most sense (electrons in the outer shells of atoms repelling each other),   However, just as I thought this had to be right, I read a thing online about "certain fundamental particles repelling each other when their wave functions overlap".  I haven't studied quantum mechanics yet so I'm not really sure what to make of that.  If anyone could shed some light on this for me it would be much appreciated.


As was shown in the movie Interstellar, when you go close to a black hole or move near the speed of light in space, then your clock runs slower than a clock on Earth.   In the movie, Matthew McConaughey's character was younger than his daughter because he was moving in space.  Question: Even a person moving in space near the speed of light, but his body clock moves to same rate compare to earth. How could travelling near the speed of light keep you young? The only effect you can see is demonstrated with time and a clock, but how could it effect a person's body?

It is said that we can verify time dilation by flying a very accurate clock on a fast jet or spaceship and prove that it registers less time than the clocks on earth. However, the clocks on earth would be moving relative to the clock on the spaceship, and since time always dilates and never goes faster regardless of the direction of relative motion,  the clocks on earth should register less time than the clock on the spaceship.  Is this true? Whenever there is a fast-moving object such as a rocket do all clocks on earth really become slow?  If the rocket with the clock landed after moving at relativistic speed, would its clock and the earth's clock again show the same time since during its travel both appeared slow to each other?  Or is all this just an illusion, ie. the clocks just appear to be slow to each other but in actually run at normal speed, and neither is behind when the rocket actually lands?


When I first studied power series in high school, the teacher gave the following general definition:  \begin{equation} f(x)=\sum_{n=0}^{\infty}a_n (x-x_0)^n \end{equation}  He then proceeded to explain that when both $x=0$ and $x_0 =0$, the first term of the power series is defined to simply be $a_0$. How does one justify $0^0 = 1$ in this case?

Could someone provide me with a good explanation of why $0^0=1$?  My train of thought:  $x>0$  $0^x=0^{x-0}=0^x/0^0$, so  $0^0=0^x/0^x=\,?$  Possible answers:   $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined   PS. I've read the  on mathforum.org, but it isn't clear to me.


The following code generates the wrong plot:  \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}   \begin{axis}[domain = 0:1, samples = 500]     \addplot[color = black]  {pi/((pi/2)+atan(x/sqrt(1-x^2)))};   \end{axis} \end{tikzpicture} \end{document}   Obviously, for x tending to 1 the function tends to 1 and not to 0 as in the plot. See also     What am I doing wrong?

I'm trying to plot a function with pgfplots for LaTeX. Unfortunately, pgfplots plots the function incorrectly.  Here is the LaTeX code I use:  \begin{figure}[H] \centering \begin{tikzpicture}     \begin{axis}[xlabel=Gameplays,ylabel=Rating]         \addplot+[gray,domain=1:30]         {0.5 + 0.5 * ((atan(x) * 2 / pi)^11.79)};     \end{axis} \end{tikzpicture} \caption{Omzetten van aantal gameplays tot impliciete rating} \label{fig:omzetten_impliciete_ratings} \end{figure}   Here is how the function should look like:     This is how it is plotted:    Does anyone know what I do wrong?  Thanks in advance!


I have a small pygame based game which uses .jpg and .png files for sprites. I have created a single file .exe with pyinstaller as a --onefile. The problem is that all the game assets are visible within a folder.   How can I hide all the assets or put them in a file that is accessed and not visible to users?   Any ideas would be great.

I am creating an ZIP file with ZipFile in Python 2.5, it works ok so far:  import zipfile, os  locfile = "test.txt" loczip = os.path.splitext (locfile)[0] + ".zip" zip = zipfile.ZipFile (loczip, "w") zip.write (locfile) zip.close()   but I couldn't find how to encrypt the files in the ZIP file. I could use system and call PKZIP -s, but I suppose there must be a more "Pythonic" way.  I'm looking for an open source solution.


I want to install Ubuntu touch on my Sony Xperia T2 device.Any Ubuntu touch for sony xperia t2 ultra(D5303)? When will Ubuntu Touch be available for this device?

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


I know that Strings in Java should be compared using .equals() and not using == operator.  But in the given below code there is a primaryObserverId which has a value of ""  The given below if condition runs fine on Java 6 but fails on Java 7   String primaryObserverId = request.getParameter("primary_observer_id");         if(primaryObserverId == null || primaryObserverId=="")             primaryObserverId = RoleMap.getUserIdForThisSession(session.getId());   Need to know why this code was working on Java 6 and not on Java 7.  I know how the concept of String Pool works for string literals in java , just want to know the reason  this abrupt behavior.  Can using different version of GlassFish may cause any issue as I am using GlassFish-2.1 with Java 6 and GlassFish-4.1 with Java  7

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


I have a 1/2" pipe system in my house. The water pressure is very good if there is only 1 source of water open (bathroom faucet, kitchen faucet); but if there are 2 sources of water open then it is very low pressure/flow. Or if I flush the toilet and the other sink will have low flow.  Is there any way I can improve this? Thank you.

I have a 1/2" water main entry, and if I open water in 2-3 places in the house, the water pressure is very low.   How can I fix this?


I bought 4 packages of vacuum packed bacon 4 days ago, left them on the counter at room temperature by mistake. I opened them tonight, they smelled fine, color was good, bacon was not slimy. I cooked a piece and ate it, tasted fine. Is this bacon OK to eat? (too late for me...)

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


As the title says, I have a public class that is not part of any package. I need to test this class, and for that I need to import it.   How can I achieve this? Thanks.

I'm working now together with others in a grails project. I have to write some Java-classes. But I need access to an searchable object created with groovy. It seems, that this object has to be placed in the default-package.   My question is: Is there a way to access this object in the default-package from a Java-class in a named package?


tom@tom-pc:~$ ls -lrta .Xa* -rw-rw-r-- 1 tom tom  0 May 23 23:45 .Xauthority.RM2HXW -rw-rw-r-- 1 tom tom  0 May 24 09:06 .Xauthority.CS6HXW -rw-rw-r-- 1 tom tom  0 May 24 16:51 .Xauthority.BYMIXW -rw-rw-r-- 1 tom tom  0 May 24 23:22 .Xauthority.F13LXW -rw-rw-r-- 1 tom tom  0 May 25 23:55 .Xauthority.FWY3XW -rw-rw-r-- 1 tom tom  0 May 27 18:52 .Xauthority.Z936XW -rw-rw-r-- 1 tom tom  0 May 28 08:54 .Xauthority.IGGQXW -rw-rw-r-- 1 tom tom  0 May 28 22:41 .Xauthority.874LXW -rw-rw-r-- 1 tom tom  0 May 29 08:49 .Xauthority.LQQWXW -rw-rw-r-- 1 tom tom 51 May 29 18:02 .Xauthority   From looking at the timestamps, a new one seems to be generated every time I turn off my computer (or log off). Where are they coming from? How can I stop these from being generated? I'm running xubuntu 13.04. Thanks

I'm using Ubuntu 13.04 on a Lenovo X220.  Why do I have so many .Xauthority.* files in my home directory? I.e  .Xauthority .Xauthority.0JW6UW .Xauthority.2HWRVW .Xauthority.2TA6VW .Xauthority.49F8VW .Xauthority.4E27UW .Xauthority.7CLTVW .Xauthority.8JGGXW .Xauthority.96SAVW .Xauthority.AOUFVW .Xauthority.ASDOVW .Xauthority.CGVJXW .Xauthority.E0ZSVW .Xauthority.E5VZWW .Xauthority.FE64UW .Xauthority.FIHDWW .Xauthority.HL45VW .Xauthority.HYCCVW .Xauthority.ILUEWW .Xauthority.JXJHVW .Xauthority.K1QJXW .Xauthority.KXSOVW .Xauthority.LEKEVW .Xauthority.M48WVW .Xauthority.M6QTVW .Xauthority.MW6NWW .Xauthority.N57TWW .Xauthority.O5HAWW .Xauthority.OIC5VW .Xauthority.P2RPVW .Xauthority.Q0FRVW .Xauthority.QW01WW .Xauthority.RDW5WW .Xauthority.T0TLWW .Xauthority.TSO4WW .Xauthority.U6R9VW .Xauthority.V3KAWW .Xauthority.W8Z1WW .Xauthority.XDLGVW .Xauthority.XOOHWW.Xauthority.XUICVW  They are all zero bytes except the first, with timestamps all over the place.  What are these, and are they safe to delete?


let $a \in \mathbb Z^+$   find:  1)  $(a,a+1)$     2) $(a,a+2)$  please guide me to solve this question it's about number theory

I want to prove $gcd(a, a+2)$ = 1 or 2 for every integer $a$.   I know that (a, a+2) is equal to the least positive value of $ax + (a+2)y$, where $x, y \in \mathbb{Z}$. However, I'm a little stuck at this point. I'm thinking I should split apart the problem into two cases, one where $a$ is odd and one where $a$ is even? Any suggestions? Thanks.


I am trying to implement this helper bash function: ores_simple_push(){(    set -eo pipefail   git add .   git add -A    args=("$@")    if [[ ${#args[@]} -lt 1 ]]; then       args+=('squash-this-commit')   fi    git commit -am "'${args[@]}'" || { echo; }   git push  )}  with: git commit -am 'some stuff here', I really don't like having to enter in quotes, so I am looking to do: ores_simple_push my git commit message here gets put into a single string  so that would become: git commit -am 'my git commit message here gets put into a single string'  is there a sane way to do this?

I'm trying to join all of the arguments to a Bash function into one single string with spaces separating each argument. I also need to have the string include single quotes around the whole string.  Here is what I have so far...  $array=("$@") str="\'" for arg in "${array[@]}"; do     let $str=$str+$arg+" " done let $str=$str+"\'"   Obviously this does not work but I'm wondering if there is a way to achieve this?


I have a table that is typeset using a tabular environment.  (I want to keep it in a tabular environment.)  The contents of each row is an expression involving radicals. The inter-line spacing is inconsistent with other tables in my file and with the inter-line spacing of the text in my file.  I seem to recall that the inter-line spacing should be 1.2 times the height of the current line or current row.  Is that right?  \documentclass[10pt]{amsart}  \begin{document}  \noindent {\textbf{Example}} \vskip1.25mm The following functions are increasing on the interval $[0, \, \infty)$. \vskip1.25mm \noindent \hspace*{1em} \begin{tabular}{r l} i.)     &       \hspace*{-0.5em}$x^{2} + x$ \\ ii.)    &       \hspace*{-0.5em}$x^{3} + 2x^{2} + 3x - 7$ \\ iii.)   &       \hspace*{-0.5em}$x^{2} + \sqrt{x}$ \end{tabular} \vskip0.25in  \noindent {\textbf{Example}} \vskip1.25mm The following functions are increasing on the interval $[0, \, \infty)$. \vskip1.25mm \noindent \hspace*{1em} \begin{tabular}{r l} i.)     &       \hspace*{-0.5em}$\sqrt{x^{2} + x}$ \\ ii.)    &       \hspace*{-0.5em}$\sqrt[\uproot{1} \leftroot{-1} 3]{x^{3} + 2x^{2} + 3x - 7}$ \\ iii.)   &       \hspace*{-0.5em}$(x^{2} + \sqrt{x}){\vphantom{x^{2} + \sqrt{x}}}^{3}$ \end{tabular}  \end{document}

How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 & column 2 \\      \hline     I really would like this less & crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.


I am trying to insert date from csv file into Salesforce (Sandbox for now).  I have a csv file that has this format YYYY-MM-DD hh:mm:ss.  Bottom is screenshot from a csv file.     I tried inserting into a custom field of Date and DateTime data formats.  When I ran Python file to insert data (using Linux), I am getting same error on both occasions (Date or DateTime).  'JSON_PARSER_ERROR' Cannot deserizlize instance of date from VALUE_STRING.  This is not System.JSONException error.      Is this something to be fixed on the format of csv file?   I read other cases, and it mentioned something about standard ISO 8601 format, but I am trying to go with simple YYYY-MM-DD hh:mm:ss format.

I'm officially breaking up with Salesforce Date parsing. This has got to be the most frustrating thing.  I have the following date in a JSON string (full JSON below):     2017-06-03T10:34:24.000Z   But when I try to deserialize the data:  Opportunity[] results = (List<Opportunity>)JSON.deserialize(res, List<Opportunity>.class);   I get the following error:     System.JSONException: Cannot deserialize instance of date from VALUE_STRING value 2016-12-05T16:19:44.000Z   I have looked at so many date parse issues before and from what I've gathered  it must be in ISO 8601 - though ISO 8601 can take various shapes:   All of the following seem to recommend exactly what I've done          How should I format this date string?  Thank you!  Full JSON string:  [{   "name":"OpportunityABC",   "CloseDate":"2017-06-03T10:34:24.000Z",   "StageName":"Pre-Engagement",   "Amount":"4810308.0", }]


I'm at a complete loss right now.  I did plenty of research regarding this issue. Some background: I'm sending a HTML email through PHP using PHPMailer. The problem is, it always ends up in the junk folder.  $message = "Hello there"; date_default_timezone_set('Etc/UTC'); $mail = new PHPMailer();   //even tried setting up SMTP server  $mail->IsSMTP(); $mail->Host = "smtp.gmail.com"; $mail->SMTPAuth = true; $mail->Username = "myGmailEmail@gmail.com"; $mail->Password = "my gmail password"; $mail->SMTPDebug = 2; $mail->Port = 587; $mail->SMTPSecure = 'tls';  $mail->setFrom('noreply@promisingwebsite.com', 'No-reply'); $mail->addReplyTo('noreply@promisingwebsite.com', 'No-reply'); $mail->AddAddress($to); $mail->IsHTML(true);   $mail->Subject  =  $subject; $mail->MsgHTML($message); if($mail->send()) resp(true,$code); else resp(false,"error (".$mail->ErrorInfo.")");   When I do not use SMTP, it sends the email which ends up in junk folder. When I DO use it, I cannot authenticate:      2016-11-26 12:44:16 CLIENT -> SERVER: EHLO 185.80.130.141 2016-11-26 12:44:16 CLIENT -> SERVER: STARTTLS 2016-11-26 12:44:16 CLIENT -> SERVER: EHLO 185.80.130.141 2016-11-26 12:44:16 CLIENT -> SERVER: AUTH LOGIN 2016-11-26 12:44:16 CLIENT -> SERVER: bmVkdWthczE3QGdtYWlsLmNvbQ== 2016-11-26 12:44:17 CLIENT -> SERVER: bmVkdWxpdWthczEyMw== 2016-11-26 12:44:17 SMTP ERROR: Password command failed: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbtT                                       534-5.7.14 KhjtVSQhqL8MciQEtofR0fc36pPSF1zUxFnNZCay9DTcpxzjY0-elaKn8oWgt_-7bXpCSU                                       534-5.7.14 L0sarBbOFwjA4l3lN_VmEDi1Pej1C4gHpfDiFnpC87Md82FK_qZe2B6J1olxCWnmQUQlWE                                       534-5.7.14 eIwqtsXjE3xia_Y-lJnGZu7uQeQ7L_4QYj452Xxllf6GjA9Pz-cJsanxzXl7NTqRKEhcGM                                       534-5.7.14 hTxqiKtVHXjFtkWZ_fGs5O960iNwk> Please log in via your web browser and                                       534-5.7.14 then try again.                                       534-5.7.14  Learn more at                                       534 5.7.14  https://support.google.com/mail/answer/78754 e102sm10342631lfi.25 - gsmtp 2016-11-26 12:44:17 SMTP Error: Could not authenticate. 2016-11-26 12:44:17 CLIENT -> SERVER: QUIT 2016-11-26 12:44:17 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting   I have no idea what to do. I ran spamcheck tests but they return somewhat a negative result (email is not classified as spam). Thanks for your help.

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


My default OS is Ubuntu 14.04 LTS. I realise now that need to run certain windows software that can not run in the Ubuntu environment. How can I install Windows 7, so that I have a dual boot? I have tried searching for on the web for solutions but most point towards people who already have windows as the default OS and want to install Ubuntu, not the other way around.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I came to Germany on July 8, 2017. Then, I traveled to Spain from 15 to 25 August 2017.  Then I was in England from 25 August to 29 August.  On August 29, 2017 I went back to Germany.  When would my 90-day visa-free period end? Would I start over from the day I re-entered Germany for another 90 days?  I am planing to return back to the US around 20 - 25 October 2017.

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


Suppose $T_i: V_i\to  V_{i+1}$ is a sequence of vector spaces such that $KerT_{i+1} = Im T_i$ with $V_0=V_{n+1}=0$. Show that $\sum_{i=1}^n (-1)^i dimV_i=0$.  For this question, what I did is  $dimV_n=Rank(T_n)+Ker(T_n)$, $dimV_n-dimV_{n-1}=Rank(T_n)-(dimV_{n-2}-Ker(T_{n-2})$, $dimV_n-dimV_{n-1}+dimV_{n-2}=Rank(T_n)+Ker(T_{n-2})$......  Since $ImT_i=KerT_{i+1}$ with $V_{n+1}=0$, $Rank(T_n)=0$, but I don't know how to continue.  The basic thing we want to show is that $-dimV_1=0$, $dimV_2-dimV_1=0$ and extend to n, while from my above process we can show from n to 1 but cannot determine $dimV_2-dimV_1=0$.  Any hints will be helpful, thx!

I've read the following formula in :  Given finite dimensional vector spaces $V_i$ and an  $\cdots\rightarrow V_i\rightarrow V_{i+1}\rightarrow\cdots$, we have  $$ \sum_{n\in 2\mathbb{Z}}\dim V_n = \sum_{n\in 2\mathbb{Z}+1}\dim V_n $$  Is there a name for this theorem? Could anyone please tell me where to find a proof of this in the literature?  Thank you!


I have a disk which has the capacity of 476 GB. I'm running Windows 7 64-bit. I want to check how much storage I've used on the C:\ drive.   The normal thing is to go to the "computer", and check the capacity property. According to the property I have used 324 GB.   When I enter the C:\ drive and select all files and folders (which are "Windows", "Users", "Program Files", "Program Files (x86)" ect...) and go the capacity property it says that the size on disk of these files is 100 GB.   Where is this 224 GB?

I have two hard drives (same size, same partitions, same model) that have been synchronized using FreeFileSync. They are used to store data, not the system. After sync, the drives should report same free and used disk space but it is not the case.  First drive (used for storage) reports 781 GB of used disk space, while second drive (backup) report only 778 GB. To get that information, I right clicked on the disk then choose properties.  First, I was thinking that synchronising tool was not doing is job (by excluding some files) but using other file synchronisation tools (like SyncToy or DirSyncPro) give me same result (no difference in files reported justify a delta of 2 GB).  Also: if I go to drive root folder, select everything (all files and folders) and right click then choose properties, total reported files size is 778 GB on both drives. If i look closer at the numbers, there is a small difference of a few megabytes between the two drives however.   Notes :   Computer have been restarted several times. Recycle bin have been emptied on both drives (if I go to $RECYCLE.BIN folder, both are almost empty (only a few KB). Shadow copy is disabled. vssadmin list shadows doesn't report anything. Windows Explorer folder settings have been modified to display system files and hidden files.  I have run "Error checking" tool (with "Automatically fix file system" enabled) on both disks.   Why is there a difference in used and free space between the two drives? How can I solve this?


I'm trying to import xls file into mysql but getting an error of Nullpointer EXCEPTION please give me the solution  package abhi;  public class ImportData {  /**  * @param args  */ public static void main(String[] args) {     // TODO Auto-generated method stub      try{         Class.forName("com.mysql.jdbc.Driver");           Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost/test","root","abhi1402");           con.setAutoCommit(false);           PreparedStatement pstm = null ;           FileInputStream input = new FileInputStream("D:/New Folder/apnakhata1.xls");           POIFSFileSystem fs = new POIFSFileSystem( input );           HSSFWorkbook wb = new HSSFWorkbook(fs);           HSSFSheet sheet = wb.getSheetAt(0);           Row row;         for(int i=1; i<=sheet.getLastRowNum(); i++){             row = sheet.getRow(i);             String CountryName = row.getCell(1).getStringCellValue();             String CountryCode = row.getCell(2).getStringCellValue();             String BankName = row.getCell(3).getStringCellValue();             String Website = row.getCell(4).getStringCellValue();             String Name = row.getCell(5).getStringCellValue();             String SMS = row.getCell(6).getStringCellValue();             int SMSNumber = (int) row.getCell(7).getNumericCellValue();             int CustomerCare = (int) row.getCell(8).getNumericCellValue();  String sql = "INSERT INTO Bank VALUES('"+CountryName+"','"+CountryCode  +"','"+BankName+"','"+Website+"','"+Name+"','"+SMS+"','"+SMSNumber  +"','"+CustomerCare+"')";              pstm = (PreparedStatement) con.prepareStatement(sql);             pstm.execute();             System.out.println("Import rows "+i);         }         con.commit();         pstm.close();         con.close();         input.close();         System.out.println("Success import excel to mysql table");     }catch(ClassNotFoundException e){         System.out.println(e);     }catch(SQLException ex){         System.out.println(ex);     }catch(IOException ioe){         System.out.println(ioe);     }  }  }   }  }

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 citizenship for Australia, UK & Ireland, and possess a passport for each and am planning a trip for this year. Please can you help me understand the best way to travel on these if I'm travelling from Sydney to London to Dublin, then Amsterdam, London, Sydney. It's a little complicated and I'm tempted to simply travel on my AU passport only as that's where I live and my other two passports are currently blank.   Any advice would be appreciated! Thanks.

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


I made a video to explain whats happening:   The image looks good until I press enter, then it gets really blurred. Is there any way to stop this?

I want to size down an already small rasterized layer in Photoshop. I notice that Photoshop distorts the layer by applying anti-aliasing after the resizing is applied. During the resizing, when we can mess around with the resize handles, the anti-aliasing is not rendered and the layer looks exactly the way I want it.  Is there a way to stop PS from applying the anti-aliasing after the "apply" button is pressed?  I've attached a snapshot to explain what I mean. Notice that star labeled after has anti aliasing applied, which the same star, this time labeled during looks more jagged.


Is it true that $x_n$ is a Cauchy sequence in some Hilbert space if and only if:  for all $m \in \mathbb{N}$, for all $\epsilon > 0$, there exists $N=N(m) \in \mathbb{N}$ (so the $N$ can depend on $m$) such that $$\lVert x_{n+m}-x_n \rVert \leq \epsilon \quad\text{ if $n \geq N(m)$}.$$  Is that correct?

Is this statement true?      In a metric spase $(E,d)$, a sequence $(x_n)$ is Cauchy if and only if $  \forall k\in \mathbb{N}, \lim_{n\rightarrow+\infty}d(x_{n+k},x_n)=0$   I proved that $\Rightarrow$ is true,indeed if $(x_n)$ is Cauchy then for all $\varepsilon>0,\exists n_0\in\mathbb{N}, \forall p,q\geq n, d(x_p,x_q)<\varepsilon$ it still right for all $ n\geq n_0$ and $m=n+k>n\geq n_0$   But I don't know if $\Leftarrow$ is true ?


This is what  appears when I try sudo apt-get update:

When updating I got the following message:  W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E W: Some index files failed to download. They have been ignored, or old ones used instead. Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done   I'm on Ubuntu 16.04 and currently using Chrome 60.0.3112.90. Any suggestions? I'm also trying to install libimobiledevice but apparently the system is not reading the repository where I just added the PPA as I can't install it. Thanks in advance for any help.


Would you please give me a concrete example for the following definitions? Specifically I don't understand why a choice function is defined as $c: B \rightarrow P(X)$.   For any nonempty set $X$, let $P(X)$ denote the set of all nonempty subsets of X.  For any nonempty subset $B$ of $P(X)$, a function $c: B \rightarrow P(X)$ is called a choice function iff $c(A) \subset A$ for all $A \in B$. The pair $(B, c)$ is called a choice structure. For any binary relation $R$ on $X$, define the function $C_R : P(X) \rightarrow P(X) \cup \{\emptyset\}$ as follows: $$C_R (A) = \{x \in A : ( \forall y \in A ) ( xRy ) \}.$$   This question is in no way a duplicate for the following question:  In this question I am asking people to provide me some examples to understand the definition of Choice function and Choice structure. In the other question, I am asking for an example to show that a relation underlying a choice structure should not necessarily be a rational relation. The only relation between these two questions is the definition included in the latter questions to clarify the question.

Would you please give me an example to show that $(P(X), C_R)$ may be a choice structure even if $R$ is not rational (i.e., complete and transitive).  Clarification:   For any nonempty set $X$, let $P(X)$ denote the set of all nonempty subsets of X.  For any nonempty subset $B$ of $P(X)$, a function $c: B \rightarrow P(X)$ is called a choice function iff $c(A) \subset A$ for all $A \in B$. The pair $(B, c)$ is called a choice structure. For any binary relation $R$ on $X$, define the function $C_R : P(X) \rightarrow P(X) \cup \{\emptyset\}$ as follows: $$C_R (A) = \{x \in A : ( \forall y \in A ) ( xRy ) \}.$$


I know I can create rectangle and put inside a text but is it any easy way to get text with rectangle around it?

I frequently create labels that follow the same format: white text on a 75% opaque black background, with 10px of margin around the text. Currently, I have to manually build these labels, which takes a lot of work.  In one method, I write the text, figure out its height and width, then create a separate rectangle and place it behind it. This takes a lot of clicking around for every label.  In the other method, I draw out a text box, select it directly, give it the correct background and margins, and then insert the text. However, I must then resize the box manually, meaning more clicking around and greater imprecision. There doesn't seem to be a way to directly select a text box once it has text inside it.  I tried using the script contained in  to resize the text box to the content, but it only resizes the box vertically, and removes my color and margins.  Does anyone have suggestions on how to resolve these problems, or for a better method? I'm using CS3.


I have some important files on my PC, and it crashed. I tried to repair it but it didn't fix the issue. I installed Windows into another partition, hoping to gain access to the old Windows partition to recover the files, but I get "Access Denied". How can I fix this?

My Windows 10 notebook died but fortunately I was able to rescue the hard drive and put it into another PC.   Unfortunately, the other PC can't open the C/Users/Joe folder. What do I have to do to open the folder?


Back in the late 70s or early 80s, I read a short story in an anthology of science fiction (possibly The Year's Best series) about a scientist who has developed a new type of nuclear weapon.   The technique is so simple but devastating that he is sure if he releases his work, all of humanity will be destroyed.   He reflects back on his life, revealing he was a genius at an early age and brutally bullied and beaten by classmates. He was nicknamed "Sally" which crushes his confidence around women later in life (he mentions he couldn't even date a woman named Sally as an adult).  He ends the story by saying "I would kill you all slowly if I could" and reveals his work to the world.  The story was in English. I read it at the Mt. Washington branch of the Cincinnati Library.

I was reading  and it reminded me of story I read somewhere in the mid 90s to the early 2000s in an anthology. A scientist finds a way to explode the iron in the Earth's crust. I want to say that it was something like a Fission bomb, but with iron rather than Uranium. At the time, it reminded me of the story I'd heard of how, in early development of fission bombs, they always did air bursts because there was a fear that the nuclear reaction wouldn't stop, and might consume the rest of the Earth.   Anyhow, he reflects that, once the process is available, sooner or later, someone was going to use it, probably not a major government but a fringe organization or country who didn't care about the consequences. He considers destroying his research, but then reflects on an unhappy childhood, including a fair amount of bullying, and decides to publish.


I used the following code for displaying the tikzpicture code alongside it.  Is there an easy way to automate displaying the code (centered alongside the picture) without modifying it.  \documentclass{article} \usepackage{verbatim} \usepackage{tikz} \begin{document} \begin{tabular}{cc} \begin{tikzpicture} \draw[thick, blue] (1,0) -- (0,0) -- (0,1) -- cycle; \end{tikzpicture}  &  \textbackslash begin\{tikzpicture\}\\  & \textbackslash draw[thick, blue] (1,0) -- (0,0) -- (0,1) -- cycle;\\  & \textbackslash end\{tikzpicture\}  \\ \end{tabular} \end{document}

When documenting a style file, it would be nice to be able to easily put side by side different examples of code, side-by-side with the output they produce.  What recommendations to people have to do this efficiently, and æsthetically?


I have a study where the same people were exposed to advertisements both with and without an "endorser" or spokesperson.  There were also several different kinds of endorsers (male vs. female and so on).  The response was "change in desire for a product" on a Likert scale.  What I have done is a sort of two stage non-linear multilevel model, with the first stage being "endorser vs. not" and the second being characteristics of the endorser among those who saw the endorser. This worked fine.   But, can I combine the parameter estimates from the two stages to get a full picture of the effects?  That is, is the parameter estimate for (say) a female endorser the sum of the effects for an endorser and a female?    It seems it should be, but I wanted to check.

Consider a statistical problem where you have a response variable that you want to describe conditional on an explanatory variable and a nested variable, where the nested variable only arises as a meaningful variable for particular values of the explanatory variable.  In cases where the explanatory variable does not admit a meaningful nested variable, the latter is usually coded either as NA in the data set, or if it is coded with a value, that value is merely a placeholder that does not have any meaningful interpretation.  This situation tends to arise whenever you have an explanatory variable indicating the existence of a thing, and one or more nested variables describing the characteristics of that thing.  Some examples of this kind of situation in statistical problems are the following:   The explanatory variable is an indicator of whether a survey participant is married, and the nested variable is some characteristic of the spouse (e.g., education, age, etc.); The explanatory variable is an indicator of the presence of an item in a space, and the nested variable is a measure of some characteristic of the item (e.g., size, distance, etc.); The explanatory variable is an indicator of the occurrence of an event and the nested variable is a description of some characteristic of the event (e.g., duration, magnitude, etc.).   In these kinds of situations, we often want to build a regression-type model (in the broad sense that includes GLMs, GLMMs, etc.) describing the relationship between the response variable and the other variables.  It is not obvious how to deal with the nested variable in this type of model.  Question: How do we deal with the nested variable in this type of model?    Note: This question is designed to give a generalised answer to a recurring question on  regarding nested variables in regression (see e.g., , ,  and ).  This question is designed to give a generalised context-independent example of this problem.


I'm always trying to find underlying principles, like that the force is always directed toward a (locally) lower potential energy and alot of stuff like that.  Recently I've begun to gain some layman understanding of GR and it seems that things move toward states in which time flows slower.  Is this generally true? And if so, is there some sense in which forces like the E&M-force brings particles to a state of slower moving time? I can't really think of anything obvious but maybe some of you guys have some ideas/have thought about this kind of stuff already...

Particles in gravitational fields are subject to gravitational time dilation. The closer a particle is near a gravitational source, the slower is running its clock. I would like to know more about the relation between gravity and gravitational time dilation.  In order to get a rough impression I used Newton's gravity equation (which may be used for weak fields, and I found that gravity and time dilation are (approximately) proportional: Can this result be confirmed on the base of Einstein's field equation (maybe even for stronger fields)?  dτ = proper time of a particle in the gravitation field of Earth, dt = proper time of an observer in infinity, rs = Schwarzschild radius of Earth, r = distance particle - center of Earth  Gravitational time dilation:  $\frac{dτ}{dt}=\sqrt{1- \frac{r_s}{r}} ≈ 1- \frac{r_s}{2r}$   Time dilation (difference):  $1-\frac{dτ}{dt} ≈ \frac{r_s}{2r}= \frac{GM}{c^2 r}$   Gravitational force (Newton's equation):  $F=G \frac{mM}{r^2}$  \begin{equation} \frac{Gravitational\:force}{Time\:dilation\:(difference)} ≈   \frac{G\frac{mM}{r^2}}{\frac{GM}{c^2 r}}=\frac{mc^2}{r}=\frac{rest\:energy\:(of\:the\:particle\:subject\:to\:time\:dilation)}{distance\:(of\:the\:particle)} \end{equation}  (As a result, time dilation would be approximately gravitaty, divided by the rest energy of the particle, multiplied by its distance.)


I need to install any form of Texas Hold Em' on a Lubuntu Live USB that doesn't have persistence.  I was able to download PokerStars.net by emulating the .exe (a windows type file) using WINE for Linux (Lubuntu). But, when I try to install, I have no room. The only place on the Live USB is in the root folder which is set to read-only.  Is there any way I can change the read only properties of the Live USB while it's in use?  So, to recap. I am running Lubuntu 13.04 and can't start in Persistent mode. When I start normally everything worked fine. I proceeded to Chromium and successfully downloaded Wine and the Pokerstars.exe. I right clicked the downloaded fiel then clicked Wine, the installer loaded fine. There are about 8 different disk icons and only the one containing system files is active.  Is there any way I can use the terminal to install it to Root.

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


Does the existence of continuous injections $f: A\rightarrow B$ and $g: B\rightarrow A$ imply the existence of a bicontinuous bijection between A and B (ie topological equivalence)? If not, what is a good counter example?

Let $A$ , $B$ be topological spaces such that there for some subset $D$ of $B$ there is a homeomorphism form $A$ to $D$ and for some subset $E$ of $A$ there is a homeomorphism form $B$ to $E$ ; then must there exist a homeomorphism from $A$ to $B$ ?


I'm a new user of linux and intalled ubuntu 13.04 and i don't know how to install tar.gz file there. I want to install adobe flash player to play videos on firefox browser. Please give me solution

I have had significant problems with watching flash video in 64-bit Ubuntu.  Does anyone know of a good way to get flash running on the platform?


So I have TeXShop for mac, and this comes with BibDesk. Have used BibDesk to create a database with all my references in, and am using this with TeXShop in my LaTeX document. My advisor wants me to use an ampersand instead of "and" in my citations, and also possibly my bibliography. Have found many answers saying to edit the .bst file etc, all for use with biblatex, which I am not using.   At the moment I am using natbib, which I like. But the main problem is that I do not have a .bst file to edit, nor even a .bbl file as I am using this BibDesk- I do not even know how to edit the file BibDesk produces. Also not great at programming so getting very confused! Please please help I would appreciate it so much.

I'm using LyX on Linux Mint 14 ...  Using BibTeX with the apalike style and some modifications in the preamble, I've managed to get the bibliography as it should be except for one thing. When I cite a work with multiple authors it gets printed with the separator "and" which isn't correct for my language (Danish). Curiously it's displayed correctly in the user interface of Lyx - for example "(Wittgenstein og Waismann 2003 - which led me to believe everything was ok but in the pdf the separator "and" is used both in the reference and in the bibliography.  Is there any way to fix this using BibTeX, or can it only be done with biber 1.5, as suggested in the last comment here:   I really hope their is because getting biber to work using the following guide has thus far proven to be impossible:   Help much appreciated ... I really hope I won't have to relapse into setting my master thesis up in LibreOffice.


I have a multi-line string which looks like this:  something1 something2 something3   I'm wanting to send each line of this string to a list so that result[0] = something1 and so on.  I have tried doing this:  for line in tableOut:         results.append(line.strip().split('\n'))   However, this makes every character of the string sent to a unique index in the list.   For example:  [['s'], ['o'], ['m'], ['e'], ['t'], ['h'], ['i'], ['n'], ['g'], ['1']]   Why isn't this working, and how can I send each line of a multi line string to a unique index in a list within a for loop?

I have a multi-line string literal that I want to do an operation on each line, like so:  inputString = """Line 1 Line 2 Line 3"""   I want to do something like the following:  for line in inputString:     doStuff()


Would you say both are correct? I have a doubt about "open-source", but I've seen it quite a lot.  Thank you.

Some compound words are written without hyphens (nonaggression, nonbeliever), some with hyphens (well-intentioned), and others with spaces (post office).  Is there a rule or good guide as to which option should be used?


my issue is when i try use Google services that Allow remote lock and factory reset. if the mobile stolen, then i want to try it and i locked my personal phone successfully it locked by password when i open my device password entry screen appear and when i write the password that i requested from web the device open but i want to remove this lock and i cannot do it, i locked the phone by using Android Device Manager through this   Thanks in advance for help.

I have played with Android device manager and I have blocked my phone. I have deblocked but everytime my phone enters into standyby it apears me the message "locked by android device manager" and I have to enter the password again.  Do you know how to remove this message?


I got a Moto G4 Plus recently. It has a pretty fast fingerprint sensor. For my own reasons I don't want a secondary/backup(pattern/pin/etc) method to unlock my phone. I want to unlock it solely using my fingerprint. I'm ready to root it if needed. I know this comes with risks of being locked out of my phone or other emergencies, I'm ready for it. Does anyone have a way of achieving this?

When I initially set up my phone, I had to both choose a pattern and scan my fingerprint, for providing maximal security. Now, when I want to unlock my phone, I can choose, whether I want to do that with the pattern or with my fingerprint.  Why providing the fingerprint, when someone still can use my pattern? Is there any way, to deactivate the pattern, so that it can be unlocked by the fingerprint only?


I have a header file DCM_Types.hh which is in fact located in the project directory. Why cannot find the source file?

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?   #include <filename>  #include "filename"


I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I have just installed ubuntu 14.04 LTS and it is asking for a username and password.  I don't have one.  What do I do please? ctrl alt delete does not work neither does ctrl alt t

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


I have asked questions before, and have read many questions and answers from others on stackexchange, about how to treat "$dx$" in a differential equation.   people often have the intuition of treating $dx$ in the term "$\frac{df}{dx}$" as if it were a separate subterm of that, even though $\frac{df}{dx}$, or at least $\frac{d}{dx}$ is an operator, and shouldn't be seen as a fraction of two seperable elements.   Nevertheless, when solving the simple differential equation $\frac{dx}{dt}=x$, people often proceed as follows:     $$(a):\qquad \frac{dx}{dt}=x$$   Step 1: multiply by $dt$ and subtract by $x$:   $$(b):\qquad \frac{1}{x}dx=dt $$   Step 2: integrate both sides:   $$(c): \qquad \int\frac{1}{x}dx=\int dt$$   Step 3: Solve the integral:   $$(d): \qquad ln(x)=t+C\implies x=e^{t+C}=x_0e^t$$   So my questions are   we know that the justification of Step 1 as "multiplication" is incorrect, since $dx$ and $dt$ are not seperable elements, so what is the justification for going from equation $(a)$ to $(c)$? When $a=b$, we can conclude that $\int adx=\int bdx$, since this takes the integral of both sides with respect to the same variable, but What is the justification of inserting the integral sign in equation $(c)$, without also adding the differential $dx$ to both sides?

I read the following statement in a book on Calculus, as part of my mathematics course:  Technically this separation of $\frac{dy}{dx}$ is not mathematically valid. However, the resulting integration leads to correct answer.  The book also contains the following:  To solve a differential equation by separation of variables:  get all the $x$ values on one side and all the $y$ values on the other side by multiplication and division. separate $\frac{dy}{dx}$ as if it were a fraction. integrate both sides.   Note: This box doesn't refer to a particular problem. It refers to a class of problems of differential equations which can be solved using the Method of Separation of Variables. My high school mathematics teacher told me that this is the most fundamental way to solve differential equations but the textbook says it is not mathematically valid. I am not able to understand why are certain methods being followed without having a mathematical proof. Or am I wrong?


When we write class in c++ we divide class into two part that header file and cpp file. In header file we define class and prototype  Class.h  class A{ public: void functionName(); };   Then we define what the function actually does in cpp  Class.cpp  #include<iostream>  void A:: functionName(){  do something; }   then in main function we do  #include "class.h"  using namespace std; int main() {   A a;   a.functionName();   return 0; }   Is their a better way to do it?. Somthing similar to java(that's the language i currently work with). I think doing things like this(cpp way) in big projects will be Messy to work with

Why does C++ have header files and .cpp files?


I would like to continue the numbering of equations that I have in my paper in the Appendix section. Right now, the equations are numbered (A.1), (A.2), .... I would like them to appear as a continuation of the equation numbered in my previous sections in the paper. \appendix\newpage\markboth{Appendix}{Appendix} \renewcommand{\thesection}{\Alph{section}} \numberwithin{equation}{section} \section{Appendix} \label{Appendix}      \subsection{Proofs}     \label{proofs}     \noindent {\it Proof of Lemma 1}. Consider Case 1      \begin{align}         x = 1 + y,\label{eqn:40}     \end{align}\\     and      \begin{align}         m = bx -c.\label{eqn:41}     \end{align}\\ $\blacksquare$\\  Instead of being labeled (40) and (41) the equations appear as (A.1) and (A.2) How do I change that?

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


Using SOQL or apex, I would like to read Sharing rules defined in Sharing Settings like for Contact/Accounts in the Org.?

I'm trying to find the sharing settings OWD information and I have looked at the tooling/api and APEX/SOQL could not find, is that even possible to retrieve this metadata information?


After recovering my HDD, I ended up with a lot of files with no extension. Many of them are .bin files.  Is there any way to find out what file format they actually are?   Many of them have no information if I edit them with Notepad++ or Hex Editors.

I sometimes get files from my clients that have the wrong file extension. For example, the name is image.jpg but the file is actually a TIFF image. In many cases I can clarify it by opening the file in a text editor, looking at the first few bytes, then deducing which file type it is.  This works for me with JPEG, TIFF, GIF and PDF files. However there are many more file types out there.  Is it possible to automate identification of the correct file type by analyzing the containing data?


In  two sequences are mentioned. In particular, I would like to prove that  $$\sum_{n = 1}^{+ \infty} \frac{1}{n^2} = \frac{\pi^2}{6}$$  If I knew that the sequence converges to $\frac{\pi^2}{6}$, I could use the $\epsilon$-$M$ criterion to prove the convergence to that value.  But how to prove that the above sequence converges to that value if I don't know the value itself? Is there a general way to proceed in such cases?

As I have heard people did not trust Euler when he first discovered the formula (solution of the ) $$\zeta(2)=\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}.$$ However, Euler was Euler and he gave other proofs.   I believe many of you know some nice proofs of this, can you please share it with us?


Assume  That $M$  is  a  compact  subset of $\mathbb{R}^{2}$ which has zero measure and is homeomorphic to the Cantor  set:  Is the topology or  homology of $\mathbb{R}^{2} \setminus M$  independent of $M$. We have the same question for the relative homology $H_{*}(\mathbb{R^{2}},\mathbb{R}^{2} \setminus M )$?

Suppose C is a Cantor set in the Euclidean plane, or even in R^3. Suppose h is a homeomorphism of C onto itself. Can h be extended to a homeomorphism of the whole space? What about if h preserves the ´end points´ of the Cantor set? Seems that the latter is a necessary condition but I don´t know how to prove it.


I got my pilot started in my gas fireplace, and now the flame won’t stay lit. I have a light switch as an on/off switch. Originally, I couldn’t get the flame to light at all. Toggled the switch a few times and the flame went on. Shut the bottom compartment of the fireplace and boom, flame gone! And now it won’t restart. Pilot is lit. Can anyone recommend anything?

I have a new construction home with a gas fireplace (Copreci VCS-ECOMOD) that won't stay on when lit. If I leave the pilot on, the pilot is stable and stays lit indefinitely. Once I light the fireplace, the fireplace will come on and run for about 5-10 minutes then shut off. When this happens, the pilot also shuts off. After 3-5 seconds the pilot will come back on, and then I can light fireplace again. After a few cycles of this, I get a double beep, which looking at the manual is telling me there is unstable pilot. The fireplace is turned on manually through a control panel or via a simple remote. The fireplace has only a thermocouple (no thermopile). Visually, the flame touching the thermacouple when only pilot is lit, or when fireplace is lit looks blue and healthy and largely covering the thermacoupler. Trouble shooting steps I've taken so far:  Cleaned out the holes use air compressor where flames come out, including at igniter and thermocouple. Used sand paper to clean the thermocouple thoroughly. Used a voltmeter to measure a healthy 18mA from the thermocouple. Ensured there are new batteries (although not needed) in the power backup box. Adjusted flame so that it is blue coming out with yellow tips - does not have the "soot" appearance.  Any help of what to try next would be highly appreciated!


I need to prove $A⊆B$ where A and B are defined as: ${A =\{x | x = 2n + 1}\}$ ${B =\{x | x = 2m - 21}\}$ where $n,m∈\mathbb{Z}$    I know that I need take an arbitrary element from A and show that it works in B, but I'm stuck on how to do it in this example.

Let  $$A = \{x | x = 2n+1, n\in\mathbb{Z}\}$$ and  $$B = \{x | x = 2m-21, m\in\mathbb{Z}\}.$$  I am trying to prove $A =B.$ I understand that I need to prove  $A\subseteq B$ and $B\subseteq A$; But my difficulty is how to prove it.  Any help would be appreciated!


From time to time, some flags are not available to me. I would, for example, like to flag  as off-topic, but the flag is not available for me. (It wasn't before the post was closed, as well.) The last time this happened, I flagged the post as "in need of moderator intervention" which was not correct, either. Why are certain flags sometimes not available? Is this some kind of bug, or is there a system that decides which flags I can use on which posts?

This is normally what I see when flagging a post:   Which then provides the following options:    I have come across this problem before. Where I have wanted to flag a question, as not belonging here, but only have limited options.    When this happens, I use a custom flag and write in the reason, but am not happy doing so.  Is this a bug?   What is the best thing to do?


I'm experiencing symptoms similar to  on my . Here are my memory stats after a day of use with no applications running, showing that about 2 GiB of memory are gone:  The  suggests that the video driver may be the culprit, therefore I would like to see how much memory is consumed by the drivers. Is there a tool or a technique which allows me to estimate the memory consumption of individual drivers, or at least estimate the total? Edit: it looks like my issue is caused by Steam client leaking handles, similar to what's described . The tag name is not the same, but my issue doesn't appear when Steam is not started.

A few days ago I updated my PC to Windows 10. However, after some use my PC started to slow down until it was impossible to use – it was due to high memory usage. After a restart, everything came back to normal (total usage around 25% of 8GB of RAM). However, during a few hours of usage the memory builds up again to 70%, and if not restarted it further goes to 100%, and later on even freezes. Task manager does not help very much as it does not show all the processes (added screenshots below). Also tried RAMMap but it gives an error: "error refreshing database". I tried Googling this question, yet without much success.  I do not know much about PCs, but maybe some of you know this issue, or could help to find out what is using my RAM.


This is happening quite frequently and this is so annoying  While I'm reviewing First Posts, I see some posts that require better formatting and corrections. So, I press the edit button to enter the edit mode. Sometimes it will not let me edit because of the number of edit suggestions, but sometimes it lets me in and I start making improvements such as correcting spelling, fixing grammar, and improving formatting. If the post is of low quality it takes quite a normal amount of time and effort to edit it. In the end, when I press the Save edits button, it "scolds" me saying The edit queue is full at the moment - try again in a few minutes:  This is so annoying when you devoted your time to editing and cannot submit it. In other words, you have just wasted your time. Congratulations! The only option is to wait some time and try again, which usually not works. It just keeps saying "try again", and you have no option to cancel your edits.  Here is the question: Why did the system not say it before letting me in to edit mode if the queue is full? I know that someone is submitting an edit suggestion before me, so the queue is filling up when I try to submit my edit. But this is bad and should be fixed! I think the system should work like this: when someone enters edit mode, it counts it and puts them in the edit queue, and will not let others enter if the queue is full. Is this a bug in the system? Or is it done deliberately?  Of course, I read other posts related to this topic, but my question is different and mostly it is a request that this issue be fixed

I have been editing an answer on , with some considerable amount of effort, and when I hit on Save Edits, the edit gets rejected with the following error. I got to know the meaning of this from .     The edit queue is full at the moment - try again in a few minutes!     I tried in a few mins, and still it didn't work. I believe that some edits might be valuable and this resists the users from doing so.   Main Question: Is there a way to show the queue limit at the beginning of the editing process? (So that we won't spend time on doing the edit, knowing it will fail)