add new line in textarea not working in my CI project i have a problem with my code, when I write content in my admin dashboard, the textarea to make a new line not working, what's wrong with my code ? this is the view &lt;div class=&quot;main-conatiner-inner&quot;&gt;     &lt;?php      if(isset($error_upload)) {         echo '&lt;div class=&quot;alert alert-danger alert-dismissible fade show&quot; role=&quot;alert&quot;&gt;         &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;alert&quot; aria-label=&quot;Close&quot;&gt;                         &lt;span aria-hidden=&quot;true&quot;&gt;&amp;times;&lt;/span&gt;                     &lt;/button&gt;' . $error_upload . '&lt;/div&gt;';     } ?&gt;     &lt;div class=&quot;row&quot;&gt;         &lt;div class=&quot;col-12&quot;&gt;             &lt;div class=&quot;card&quot;&gt;                 &lt;div class=&quot;card-body&quot;&gt;                     &lt;?php                          echo form_open_multipart('artikel/input');?&gt;                             &lt;div class=&quot;col-6&quot;&gt;                                 &lt;div class=&quot;form-group&quot;&gt;                                     &lt;label for=&quot;example-text-input&quot; class=&quot;col-form-label&quot;&gt;Judul&lt;/label&gt;                                     &lt;input name=&quot;judul&quot; class=&quot;form-control&quot; type=&quot;text&quot; value=&quot;&quot; id=&quot;example-text-input&quot; placeholder=&quot;Masukkan judul&quot; required&gt;                                 &lt;/div&gt;                                 &lt;div class=&quot;form-group&quot;&gt;                                     &lt;label for=&quot;example-text-input&quot; class=&quot;col-form-label&quot;&gt;Konten&lt;/label&gt;                                     &lt;textarea name=&quot;konten&quot; class=&quot;form-control fwMultilineTextbox&quot; aria-label=&quot;With textarea&quot; style=&quot;width: 800px; height: 400px;&quot; placeholder=&quot;Masukkan konten&quot; required&gt;&lt;/textarea&gt;                                 &lt;/div&gt;                                                                  &lt;div class=&quot;form-group&quot;&gt;                                     &lt;label for=&quot;exampleFormControlFile1&quot;&gt;Masukkan Gambar&lt;/label&gt;                                     &lt;input type=&quot;file&quot; name=&quot;gambar&quot; class=&quot;form-control-file&quot; id=&quot;exampleFormControlFile1&quot;&gt;                                 &lt;/div&gt;                                 &lt;div class=&quot;form-group&quot;&gt;                                     &lt;button type=&quot;submit&quot; class=&quot;btn btn-success btn-sm mb-3&quot;&gt;&lt;i class=&quot;fa fa-check&quot;&gt;&lt;/i&gt; Simpan&lt;/button&gt;                                     &lt;button class=&quot;btn btn-info btn-sm mb-3&quot; onclick=&quot;goBack()&quot;&gt;&lt;i class=&quot;fa fa-arrow-left&quot;&gt;&lt;/i&gt; Kembali&lt;/button&gt;                                 &lt;/div&gt;                                  &lt;?php echo form_close(); ?&gt;                                 &lt;/div&gt;                             &lt;/div&gt;                         &lt;/div&gt;                     &lt;/div&gt;                 &lt;/div&gt;             &lt;/div&gt;             &lt;script type=&quot;text/javascript&quot;&gt;                 $('textarea').keypress(function(event) {                       if (event.which == 13) {                         event.preventDefault();                           var s = $(this).val();                           $(this).val(s+&quot;\n&quot;);                       }                     });             &lt;/script&gt;
How to save user-entered line breaks from a TextArea to a database? How do I save user-entered line breaks from a &lt;textarea&gt; HTML element to a database?  It always removes the line breaks.
A shell tool to "tablify" input data A long time ago I remember using a command that makes its input into a nicely formatted table.  For example, for this input,  apple 1 100 orange 20 19 pineapple 1000 87 avocado 4 30   The output will be similar to this:  apple     1    100 orange    20   19 pineapple 1000 87 avocado   4    30   I'd like to know the name of this tool. Are recommendation questions an acceptable kind of list-type question or should they be closed? Recommendations are a recurring topic on multiple Stack Exchange (SE) sites. Some sites allow recommendations (ex: ), some do not (ex: ). There are many reasons for that and I can still remember animated discussions on this subject on the Gaming meta. Then there is that existential problem with Sci-Fi SE, &quot;What problems does answering a question on this site solve?&quot;  The only common problem I can think of is What to read/watch next?, which obviously led to a big number of recommendation questions, later slightly disguised as list question. And the main trouble with these questions isn't objectivity at all, some of them aren't even subjective. It's the fact that they don't have an answer - they are open ended. -  Those questions are monstrously popular because:  There's an actual problem to be solved,  or  This problem is quite common.  In view of the  blog post, a recommendation question fails the &quot;real questions have answers, not items or ideas or opinions.&quot; criteria. But it's still a &quot;practical, answerable questions based on actual problems that you face. &quot; and it requires expertise to answer. The problem is that there are multiple acceptable answers, and the asker is not the best person to evaluate the best answer because he doesn't know which one is the best compared to the others, and he cannot test it in short term. Even the need to accept an answer is questionable. So, is a recommendation question an acceptable kind of list-type question or should it be closed just like any other list-type questions? How can I run ssh-add automatically, without a password prompt? I want to communicate between several computers on my network (static Ethernet), through SSH. In order to do that I need to run ssh-add every time I log in on a specific machine, how can I do it so that it's set up once and it doesn't ask me for the passphrase every time I log in or reboot my machine?  I know that there is a way that you should add some lines to the bash_profile file, but I still need to type the password every time I reboot/log in to a specific machine.  if [ -z "$SSH_AUTH_SOCK" ] ; then     eval `ssh-agent -s`     ssh-add fi How do I create a list of Python lambdas (in a list comprehension/for loop)? I want to create a list of lambda objects from a list of constants in Python; for instance:  listOfNumbers = [1,2,3,4,5] square = lambda x: x * x listOfLambdas = [lambda: square(i) for i in listOfNumbers]   This will create a list of lambda objects, however, when I run them:  for f in listOfLambdas:     print f(),   I would expect that it would print  1 4 9 16 25   Instead, it prints:  25 25 25 25 25   It seems as though the lambdas have all been given the wrong parameter. Have I done something wrong, and is there a way to fix it? I'm in Python 2.4 I think.  EDIT: a bit more of trying things and such came up with this:  listOfLambdas = [] for num in listOfNumbers:     action = lambda: square(num)     listOfLambdas.append(action)     print action()   Prints the expected squares from 1 to 25, but then using the earlier print statement:  for f in listOfLambdas:     print f(),   still gives me all 25s. How did the existing lambda objects change between those two print calls?  Related question: Reputation graph not interactable with a touch screen Duplicates of duplicates should be remapped I noticed today another example of duplicates of duplicates: that  (A) was closed as a duplicate of  (B), but one day later (B) was closed as duplicate of  (C). Sometimes I need to click many times from one question to another until I get to the master question.  I think that it's better if the question (A) is closed as duplicate of (C), and even if (B) has already (helpful) answers, (B) and (C) could be merged.  Is it possible to remap all duplicates to the master question, just like the tag synonyms? How to disable pylint 'Undefined variable' error for a specific variable in a file? Cross-referencing between different files Redirect automatically when selecting an item from a select drop-down list This page does it the way I want it to:   But I want to find a better way using jQuery, can anyone point me to a good script that uses jQuery to accomplish this? How to get a mission to continue the story? I got Destiny and I did the first mission where the guy wakes up and has to get to his ship. Now I'm stuck in the tower. There are no mission notifications or anything. How can I get the next mission and start it? What year is the series "Chilling Adventures of Sabrina" supposedly set in? Almost everything in Greendale seems to be vintage 1960's (cars, movies, dress). I assume it is to reflect the original comic book, but I swear I saw Ambrose using a laptop computer in the first episode. Was this just to make it more topical? Or is it some kind of alternate reality? Elantech Touchpad not working on Ubuntu 16.04 and Arch Linux So I have and Asus R558UF notebook with an Elantech Touchpad. After installing Ubuntu 16.04, the touchpad worked once but after restarting, it failed to work and has not been working ever since.  This is output of xinput:   ↳ Elan Touchpad                            id=12   [slave  pointer  (2)]   In Mouse and Touchpad settings, the touchpad is enabled. What should I do to fix this? Cannot determine size of graphic I'm trying to include graphics in my Latex-file, which I compiled with latex+dvipdf on OS X. Latex however returns this error: "Cannot determine size of graphic"  My graphic is exported from PowerPoint, so I have tried both .pdf and .png. I get the same errors for both.  Sample code that doesn't work:  \begin{figure}[htb] \begin{center} \leavevmode \includegraphics[width=0.8\textwidth]{graph.png} \end{center} \end{figure}   If I have to manually set some measurements of the image, please tell me how I can find out those measurements. I need the image to take up about 80% of text width and be centered. Thanks. I had a Windows 7 installation on my 1TB SSD laptop with 4 primary partitions. I wanted to install Lubuntu Linux but the process failed with an error which kind of said:     cannot write MBR   It gave me an option to put an MBR somewhere else or to boot without MBR. None of these options worked and it became a useless install. After this failed dual boot attempt, Windows would give a BSOD wit Code 007 ending - translated to inaccessible boot device. That is a huge NTFS partition and I don't think I have any other media to back it up before formatting it.  My only option is somehow rebuilding the old MBR. Hence I started creating a whole bunch of live USB boot environments  including Super GRUB Disk and MiniTool Partition Editor Live CD, but none of this could ever help me recover my lost MBR.  Win PE 4.0 reported the partition as bad disc and the latest version did not even have an option for MBR. I managed to create a live USB with Testdisk Running on Ubuntu. Whatever partition was seen as HPFS on quick  search was written in the MBR and after this the disc is totally unreadable. Earlier I could see my data through Linux and now I can see nothing.  Here are my questions:   When some data could be read (but Windows would not boot) the MBR was shown as dynamic MBR. As far as I know dynamic MBR is a Windows concept and my Linux attempt would not have converted it. While installing Linux I tried to delete 2 primary partitions which I found to be not really useful (I backed up their data first). So I am not sure what created the dynamic MBR.  Did my dual install convert those basic MBR to dynamic MBR? How did that happen? Here is a screenshot of my deep search attempt with TestDisk which is still in progress. I can see 4 NTFS partitions and one of these two system partitions should be the original MBR. When I tried to write both these system partitions (after stopping the deep search momentarily) I got an error like "partition not found". The file system utility showed me that there is no backup sector and that may be the reason why it cannot be read.  What other Resorts do I have, other than doing a plain format and then using some recovery tool to recover all my lost data? I am not even sure I will recover the folder names.  What other options should I be trying to restore my old MBR so Windows can boot?      Update  as of last I managed to create a live USB w/ W7  I used AOMEI Partition assistant 6.0 and on deeper  search I can see the 909 gb partition - it wont let me select it for recovery. I am sorry if my earlier Q was not clear. I referred to restoring an MBR from a partition . What happened earlier  - superficial search revealed all old partitions but NOT this one   and the later partitions showed up on Deep search &amp; I can select Other partitions for recovery but for this one. It wont let me select the partition I want  Here are some more screen shots    So in summary all that happened is   4 primary windows 7 partition -->  wanted to install Linux so I deleted 2 non bootable partitions after backing them up  ended up with BSOD ( inaccessible boot device ) and noticed that some windows partitions showed up as Dynamic MBR  (using Live USB Linux,gparted )  Use standard testdisk procedure to write MBR from the superficial NTFS-HDFS partition.  this is where I screwed up . Hindsight I should have really done a deep search and caught the 901gb partition to write MBR. I am not sure if I can undo this action  after this - life gets worse. I am  on a ventilator ! Now C is unreadable by windows and linux both and testdisk cannot list file ( see screenshots ) and I have been using a series of live USB's with some recovery s/w but no luck. ALL I want is to recreate that 901gb partition and the boot partition and put the MBR on the latter so I can get my windows 7 back again When is it correct to use upper case letters for nouns that may only be unique in a given context? Some of the git commands have many options, and it would often be useful to search through them for the one I need - I was just looking for the option which controls the TAB width in git-gui, but there are about 200 completions for git config. An obvious workaround is to copy all the completions into an editor and search through them, but I'd rather do  [something] | grep tab   There are no man or info pages for compgen, help compgen doesn't even explain its own options, and there's no auto-complete for compgen (how's that for irony?).  PS:  doesn't work.  PPS: This is not a question about git-gui - The  was elsewhere.  PPPS: This is not about auto-completing commands, only command parameters. How to use SQLDeveloper to connect to embedded Derby database Windows 7 finding location of installed program Integral change that I don't understand If $f(t)$ is a Probability density function of a positive RV.  $\int_0^\infty\int_x^{\infty}f(t)dtdx$ Using fubini theorem should become $\int_0^\infty\int_0^{t}f(t)dxdt$  But why? Surely the answer is very simple but I don't see it. Fubini theorem allows the change of the order of integration. So it should become $\int_0^\infty\int_x^{\infty}f(t)dxdt$  but then I don't understand what meaning could have $\int_x^{\infty}dx$ Jointly Complete Sufficient Statistics: Uniform(a, b) Let $\mathbf{X}= (x_1, x_2, \dots x_n)$ be a random sample from the uniform distribution on $(a,b)$, where $a &lt; b$.   Let $Y_1$ and $Y_n$ be the largest and smallest order statistics.  Show that the statistic $(Y_1, Y_n)$ is a jointly complete sufficient statistic for the parameter $\theta  = (a, b)$.     It is no problem for me to show sufficiency using factorization.   Question: How do I show completeness? Preferably I would like a hint.    Attempt: I can show $\mathbb E[g(T(x))] = 0$ implies $g(T(x)) = 0$ for the one parameter uniform distribution, but I am getting stuck on the two parameter uniform distribution.   I tried playing around with $\mathbb E[g(Y_1, Y_n)]$ and using the joint distribution of $Y_1$ and $Y_n$, but I am not sure if I am going in the correct direction, as the calculus is tripping me up.