Posts by Kallef • 134 points
9 posts
-
0
votes3
answers84
viewsA: String Replacement for Array
Try this way: <?php $string = 'Teste simbolo $'; foreach ($arr_symbols as $key => $symbol) { $string = str_replace($key, $symbol, $string); } ?>
-
1
votes3
answers3178
views -
1
votes1
answer438
viewsA: Node install without npm only via . zip
In the folder you downloaded Node.js run: ./configure --prefix=/opt/node && make && sudo make install To facilitate Node commands add Node path in one of these files: ~/.profile or…
-
1
votes1
answer3086
viewsA: Fullcalendar fetch data from php database
Try to do it this way: $.ajax({ type: "POST", url: "myfeed.php", data: { //the data }, success: function(events) { $('#mws-calendar').fullCalendar('removeEvents');…
-
0
votes2
answers311
viewsA: Maintain full size image - CSS
It can be done that way too: <div style=" background-image: url(admin/cache/1404830097269_808646729155217_5122918805829398554_n.jpg); width: 264px; height: 177px; background-size: 262px…
-
1
votes1
answer1025
viewsA: Package duplicity error updating Ubuntu 14.04
Back up the apt-get list: sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak After that remove the duplicate lines listed above: sudo nano /etc/apt/sources.list Rotate again sudo apt-get update…
-
0
votes2
answers746
viewsA: Excel printing with php and jquery
I believe that this excel example with jquery and php does not work, in the blog comments themselves already complain. Use this library made by the Excel programmers themselves.…
-
0
votes2
answers1537
viewsA: jquery method does not pass parameters to controller
I have an example of a tcc I did once: [HttpPost] public ActionResult CalendarData(FormCollection f) { string datainicio = Request.Form["data_inicio"]; string datafinal = Request.Form["data_final"];…
-
4
votes2
answers183
viewsA: Help with post upload and move file manipulation in PHP
Try to do it this way: $fil = $_FILES; $uploaddir = 'files/'; $ext = pathinfo($filename, PATHINFO_EXTENSION); $destino = $uploaddir.$fil['name']; if(move_uploaded_file($fil['tmp_name'], $destino)){…