I encountered a problem while working with PHP rest api. I can't show unicode output in any way.      table 'coronaapi' data :  id    title  1      কুমিল্লা সদর  2      কুমিল্লা সদর দক্ষিণ   &lt;?php  // Headers header('Access-Control-Allow-Origin: *'); header('Content-type: text/html; charset=UTF-8'); header('Content-Type: application/json');   include_once '../../config/Database.php'; include_once '../../models/Post.php';  // Instantiate DB &amp; connect $database = new Database(); $db = $database-&gt;connect();  // Instantiate blog post object $post = new Post($db);  // Blog post query $result = $post-&gt;read(); // Get row count $num = $result-&gt;rowCount();  // Check if any posts if($num &gt; 0) { // Post array $posts_arr = array(); // $posts_arr['data'] = array();  while($row = $result-&gt;fetch(PDO::FETCH_ASSOC)) {   extract($row);    $post_item = array(     'id' =&gt; $id,     'title' =&gt; $title,     'body' =&gt; $body,     'author' =&gt; $author,     'category_id' =&gt; $category_id,     //'category_name' =&gt; $category_name   );    // Push to "data"   array_push($posts_arr, $post_item);   // array_push($posts_arr['data'], $post_item); }  // Turn to JSON &amp; output echo json_encode($posts_arr);  } else { // No Posts echo json_encode(   array('message' =&gt; 'No Posts Found') ); }       OutPut displaying like this:  [{"id":"1","title":"???????? ???","body":"???","author":"00","category_id":"sodor"},{"id":"2","title":"???????? ??? ??????","body":"03","author":"00","category_id":"sadardokkhin"}]       But I want to display  [{"id":"1","title":"কুমিল্লা সদর","body":"???","author":"00","category_id":"sodor"},{"id":"2","title":"কুমিল্লা সদর দক্ষিণ","body":"03","author":"00","category_id":"sadardokkhin"}]
I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.
Ragged Right linebreaking, such that the last line is fullest, and the first most empty Why can't you get awarded the bounty for answering your own question? Consider this question on .  I put out a 200 bounty on the question, but did not get an answer from anyone other than myself that worked.    In fact, my answer is also the highest up-voted on it at this point.  I know that allowing OP's to retract a bounty can be a slippery slope; in fact I think that once the bounty is put up it should stay up.  But why not allow the OP to answer their own questions with a bounty and reward it to them if they receive the same up-votes as others?  Yes, I am fully aware that bounties are a risk.  People will use them for numerous reasons such as trying to draw extra attention to their issues.  However, in my specific question, the only valid answer is the one that I gave.  Had it been anyone else's question, I would have received the bounty, but since it was my own I did not. I read this story in the early 2000s, but it was a Chinese translation so the English version could be older.  The beginning is a bit like the Passengers movie: on a spaceship, a man woke up from stasis too early and found that he could not go back to sleep. So he has to spend his whole life on the spaceship, alone.  For some reason (technical or ethical), instead of waking other people up, he created a fantasy adventure story featuring a brave prince as a pastime. He did stories, and drawings all over the inside of the ship. Then he died, not knowing how people are going to respond to his work. Use a partitioned live usb I have a USB device and i'm trying to create it in a way that it has 2 partitions: one for a live linux disc and the other for document storage.  I created the partitions using gparted and and set a boot flag to the one I want to use as the live disc. Now, I have a usb like this:  Disk /dev/sdc: 14.6 GiB, 15623782400 bytes, 30515200 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xc3072e18  Device     Boot   Start      End  Sectors  Size Id Type /dev/sdc1       8439808 30515199 22075392 10.5G 83 Linux /dev/sdc2  *      51200  8439807  8388608    4G  b W95 FAT32   I then used dd to flash an Ubuntu iso to /dev/sdc2  sudo dd if=/dev/shm/ubuntu-17.04-desktop-amd64.iso of=/dev/sdc2 bs=4M   When the disc is flashed onto the usb drive, I try to boot from my laptop and it shows "Operating system not found". When i try to use qemu/kvm, it shows a kernel panic like this:    How would I be able to do this properly? How should I install HPLIP binary/proprietary plugin/driver for my HP printer or printer+scanner? Menu select item stuck on screen after context or command menu has closed Periodically when I select a menu command, the label or selected option gets "stuck" on screen and won't go away. I can close all open applications, including whichever one I was using when it got stuck, but it still won't go away.   In the screenshot below, I opened an new instance of IE just to show how the label stays on top. The label was not created by this instance of IE.    (I added the circle in MS Paint. That part isn't stuck.)  The label that gets stuck is the first menu command I select in IE. If a label is already stuck, a new one does not get stuck (regardless of which instance(s) of IE are involved). Based on this knowledge, I now just open IE on my secondary monitor, carefully open the context menu so the Properties command is in the bottom corner, and click it. This is not a solution.  The floating label never moves and is transparent to mouse input (if I click it, it's as if I clicked the item behind it).  The label does not go away if I close all running applications. I haven't tried stopping services or closing system tray items like Live Mesh.  The label does go away if I change the screen resolution and then change it back.  Any ideas how I can stop this from happening? It's happened a half dozen times and it's becoming quite disrupting to my work. This  shows the dual cone of $K = \{(x,t) \mid \| \boldsymbol{x} \|_1 \le t \}$ is $K^{*} = \{(x,t) \mid  \| \boldsymbol{x} \|_{\infty} \le t\}$. Is it right? How is it proved? Should 'drive by' downvoting be more effectively caught? I have an answer that I'm certain is technically correct. However, it continues to be downvoted. The answer has already been noted in comments on other answers to be better. It goes more in-depth than the others, yet it continues to be downvoted.  The already upvoted answers were nowhere close initially, and I had already commented on them to say why it is wrong...  Isn't there a limit for that? Shouldn't something be catching this? When for the first time A new question I answer This haiku appears:     Little slab of meat   In a wash of clear jelly   Now I heat the pan   Such a message is Very strange; is anyone Seeing the same thing?  Have not seen again. Came and went like the wind does! Why I am so blessed? Programmatically create a user and assign a role I'm programmatically creating a user with the following code.  $newUser = array(   'name' =&gt; $mail,    'pass' =&gt; 'password',  // note: do not md5 the password   'mail' =&gt; $mail,    'status' =&gt; 1,    'init' =&gt; $mail,   'roles' =&gt; array(5) ); $user = user_save(null, $newUser);   I have got a role with the role ID equal to 5; when I create the user, in the table "users_roles" there is only a row with the value 0 for the role ID, but if I print the user object with var_dump(), it looks like the roles are created.  What am I doing wrong? I am currently learning how to use TikZ/PGF to make some figures for a project report, and so I have a question:     Is there is a practical way of making a particular object into a node?   The object I have in mind is shown in the Figure below. I want the object to consist in the big circle, the two circular arcs, the label and anchors at north, south, east and west. The dotted lines are simply there to indicate that I am going to have paths going out of these points, which is why I need the anchors there.     I include the source, in the case that it is useful to anyone.  \begin{tikzpicture} \draw[help lines, gray, dotted] (-2,-2) grid (2,2);  \begin{scope}[shift={ (0,0) } ]     \begin{scope}[rotate=90]         \draw[thick] (-1,0) arc[start angle=-90, delta angle=90, %                               x radius=1, y radius=1] -- (0,1) %NW                      (0,-1) arc[start angle=180, delta angle=-90, %                                    x radius=1, y radius=1] -- (1,0); %SE         \draw[gray] (0,0) circle (1);     \end{scope} % Anchor replacements     \node(N1)       at (0,1)    {};     \node(S1)       at (0,-1)   {};     \node(E1)       at (1,0)    {};     \node(W1)       at (-1,0)   {}; % Label     \node(Crossing number) at (0,0) {1}; \end{scope}  \path[thick, gray, dotted] [ out=90,   in=270]     (N1.center) edge (0,2) [ out=180,  in=0]       (W1.center) edge (-2,0) [ out=270,  in=90]      (S1.center) edge (0,-2) [ out=360,  in=180]     (E1.center) edge (2,0); \end{tikzpicture}   PS. I have had a look at the Manual, but I could not find a description of how to do this. Scenario 1: A grimlock hits Alice with a Spiked Bone Club, dealing 5 bludgeoning damage, plus 2 piercing damage. Alice's HP was 12.   Using the optional Massive Damage rules on page 273 of the DMG, does this count as more than half the HP from a single source, or less than half, but twice?  Scenario 2: Assume the same grimlock hits Bob with the same attack, this time rolling 6 bludgeoning damage, plus 3 piercing damage. Bob's Max HP is 8, and he had 1 HP remaining before he was hit.  Using the Instant Death rules on page 197 of the PHB, does the character die, or are the two damage types tracked separately? Does the character have to make a death saving throw for the second part of the damage? Attributing contributions to academic work that occur in Stack Exchange Was Daenerys actually trying to hatch the eggs? I was reading @Aegon' s response   and I realized that I've never been clear on whether Dani was intentional in her pyre building to do blood magic and wake the dragons, or if she was just grieving Drogo and killing Mirri and her statement about "only death can pay for life" was a slap in the Maegi's face, since in the end she sacrificed her unborn child for the husk of Drogo.    I know she had tried baking the eggs previously and had felt like they could hatch then, but was clearly disappointed and chastised herself for foolishness when they did not. I don't recall inner monologue or statements after that where she said, "ya know what I should have done..."   I guess what I'm asking is whether there is evidence outside her statement to the Maegi that she was intentional in her blood magic rite or if the miracle was a happy accident? prove that a connected graph with $n$ vertices has at least $n-1$ edges Show that every connected graph with $n$ vertices has at least $n − 1$ edges.  How can I prove this?  Conceptually, I understand that the following graph has 3 vertices, and two edges:  a-----b-----c  with $a$, $b$ and $c$ being vertices, and $\{a,b\}$, $\{b,c\}$ being edges.  Is there some way to prove this logically?  --UPDATE--  Does this look correct?  Any advice on how to improve this proof would be appreciated.  Thank you. How to Disable new terms (free tagging) with Taxonomies? how to shuffle characters of strings in bash? i have this script where it generates random password but it needs to be shuffled. I couldnt find a way to do it. Please Help me.  num=("0" "1" "2" "3" "4" "5" "7" "8" "9") special=("@" "#" "$" "%" "*" "-" "+") upper=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) lower=(a b c d e f g h i j k l m n o p q r s t u v w x y z) lower2=${#lower[*]}   #${lower[$((RANDOM%lower2))]} upper2=${#upper[*]}   #${upper[$((RANDOM%upper2))]} num2=${#num[*]}     #${num[$((RANDOM%num2))]} special2=${#special[*]} #${special[$((RANDOM%special2))]} echo "${special[$((RANDOM%special2))]}${num[$((RANDOM%num2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}"   this is the output: @7nOyIaJ  how do I randomize this? Is there always an equivalent metric which is not complete? Suppose I look at a parallel plate capacitor in its rest frame and calculate the electrostatic energy, $E$.  Next, I look at the same capacitor in a primed frame boosted in the direction perpendicular to the plane of the plates. In this frame, the $E$-field is the same strength, there is no magnetic field, and the volume over which the $E$-field extends is less by a factor $1/\gamma$. This suggests $E' = \frac{1}{\gamma} E$, but relativity states that energy transforms as $E' = \gamma E$.   Where is the missing energy? Proof that $1729$ is the smallest taxicab number