php foreach Loop try not to copy a array Is there any way of not copying the specific array in the foreach loop?  Here's the code   &lt;?php      $letters = array("A","B","B","C");        foreach ($letters as $char){         if ($char == "B") {           continue;          }         echo $char;       }  ?&gt;   I want my output to be only ABC not AC
How to remove duplicate values from an array in PHP How can I remove duplicate values from an array in PHP?
Integral conversion to polar coordinates - bounds $\int\limits_0^1 \int\limits_0^1\sqrt{x^2+y^2}\ dxdy$ Project Euler Question 14 (Collatz Problem) What does it mean if a Python object is "subscriptable" or not? Which types of objects fall into the domain of "subscriptable"? Notify more frequently than once a day? Is there a way to subscribe to a question and be notified more frequently than once a day?  I'd like to be notified immediately on any posts to a question. Split file into multiple files based on pattern I have a large file that's a couple hundred lines long. This file is partitioned into many parts by a specific identifier, lets say 'ABC'. This line 'ABC' appears 6 times so I want 6 output files. I'm familiar with split and awk but can't seem to create a command line that will do what I've described, any ideas?  Here's an example  ABC line 1 line 2 line 3 ABC line 1 line 2 ABC line1   I'd like three files where ABC is the first line in the new file and it ends before the next ABC is encountered. What can I do to prevent passport stamps being put on blank pages? I'm running low on blank passport pages which are sometimes needed for full page visas such as those issued by Armenia, India, and Vietnam.  When I crossed the border into Turkey the other day I got my visa-on-arrival and stamp, but instead of putting it on a partly used page, which I have many, the guy at customs and immigration put them on a previously blank page. Now I have one fewer!  What can I do to prevent or at least reduce the chances of this happening?  It's worth remembering that there's likely to be a language barrier and it's always best to be ultra-nice to these border officials.  Has anybody heard of any trick such as sticking bit of paper in your passport, either blank, or looking a bit like visas? I have noticed that nobody ever stamps a page that has a remnant of something once stapled in there in Japan. There is a kind of stub that had its major part torn off along a perforation. Might I be able to emulate this somehow or would that even be worse making the blank pages invalid for full page visas due to having holes from staples? I know some things can get very picky when it comes to customs and immigration. SQL - Query to get server's IP address How do I find the caller of a method using stacktrace or reflection? I need to find the caller of a method. Is it possible using stacktrace or reflection? How to prove this inequality $\left|x\sin{\frac{1}{x}}-y\sin{\frac{1}{y}}\right|<2\sqrt{|x-y|}$? For any real numbers $x,y\neq 0$,show that $$\left|x\sin{\dfrac{1}{x}}-y\sin{\dfrac{1}{y}}\right|&lt;2\sqrt{|x-y|}$$ I found this problem when I dealt with . But I can't prove it. Maybe the constant $2$ on the right hand side can be replaced by the better constant $\sqrt{2}$? Thank you. Code Formating in Comments latex gives me the error: Ouch---my internal constants have been clobbered As the title states, compiling with latex produces the error, right away:  Ouch---my internal constants have been clobbered!---case 14   I have no idea what this means... I use TexLive 2012. I updated my texmf.cnf and ran fmtutil-sys and texhash. I guess texhash may have messed it up?  Any ideas?  As requested a minimal working example:  \documentclass{article} \begin{document}     Any tex file. \end{document} When I see someone else being embarrassed / humiliated, for example a singer forgetting their words in a concert, I would say something like "I feel embarrassed for them". But is there a better word to describe this feeling?  I would say it's a mix of:   Empathetic discomfort for someone else's humiliation Tension; hope that spectators will be forgiving Frustration that I cannot help them   Other scenarios I would feel the same emotion:   Seeing someone make a presentation, the slides are all out of order, and their face gets red with embarrassment while there's a tense silence in the room. Seeing someone make an embarrassing social blunder in front of unforgiving people. Seeing a speaker who keeps making a distracting and annoying gesture, and they don't realize that the whole audience is annoyed. Seeing someone be taken advantage of, like seeing someone naively and happily accept a terrible offer on a car. Seeing a person of strong image (for example the CEO of your company) do something like accidentally leave their webcam on after a conference call, and employees see him/her let out a big burp and pick their nose or something.   In these cases it's important that the audience is not forgiving, even if they don't confront the person about it. The person may or may not know they are being humiliated.  "Pity" as proposed in an answer seems very close, but I think it lacks a few components. I think "pity" has a chronic connotation - that you are referring to the general state of things rather than a specific event.  I think "pity" also depends on the subject suffering, but in my example they are often oblivious.  It could very well be that there is no word for this at all.  NOTE: Some people do not feel the same way I do in this scenario, so you may not think this question makes any sense. How can I debug my JavaScript code? Which shells don't support dollar-parenthesis expansion, and demand backticks? When two accounts are merged, all the posts/votes are moved over to the "master" account, and the other account ("slave"?) is deleted. The merge is propagated network-wide, so a similar thing happens on each site.  But, this does not happen to the chat user. The "slave" chat user is kept, with a 404 parent profile link. I feel that the chat user should be merged as well, re attributing all the chat messages.  Thoughts? timestamp, modification time, and created time of a file How to debug "Cross-thread operation not valid" error in C#? I tried to prove this question but without a success: Let $K_1$ and $K_2$ be definable sets, prove that $K_1\cup K_2$ is definable.  What I tried to do is to assume: $K_1=Ass(X)=\{ v|v \vDash X \}$ and $K_2=Ass(Y)=\{ v|v \vDash Y \}$ and to say that $K_1\cup K_2=Ass(X \cap Y)$. but I couldn't prove that: $K_1\cup K_2 \supseteq Ass(X \cap Y)$ .   I would like to get help with this proof Shear transform a "box" Using the graphicx package, I can make any arbitrary box rotated using the \rotatebox{...}{...} command. Is there a comparable command in any package that lets me shear a box, i.e., producing a kind of general slanting? Which Harry Potter works are considered canon? There are many different Harry Potter works including:   books short stories movies card games video games toys amusement parks web content   Which ones are considered to be canon?