Posts by viniciussvl • 699 points
53 posts
-
0
votes1
answer49
viewsQ: Is importing module into the loop a bad practice?
Good morning guys, I have a javascript module and I import it at the beginning of my main/main code and I run a foreach, still in this main code has loop that calls the methods of the module:…
-
-2
votes1
answer126
viewsQ: Is it possible for an Laravel API to consume a Node API and that Node API to call that same Laravel API in a request?
I have a client (front-end) that consumes an endpoint in an Laravel API, this endpoint communicates with an API in Node.js and this API in Node.js calls Laravel API methods (which called the Node…
-
0
votes3
answers29267
viewsA: Barcode Converter - Convert Barcode to Digitized Line
I found on this site https://boletobancario-codigodebarras.blogspot.com/ the code in Javascript which converts the barcode to the digitable line and vice versa: function f_barra() { var antes =…
-
0
votes0
answers274
viewsQ: POST requests for specific URL are taking 3 minutes
All my POST type requests for a specific URL are taking about 3 minutes to return the sponse, that is, a few seconds after I submit the form, I look at the API website and there is my data posted,…
-
0
votes1
answer33
viewsQ: Fragment not being loaded inside Framelayout
I created a Navigationview with 3 items, when clicking on one of them, a specific fragment should be loaded inside the Framelayout, but this is not happening. I believe the error is in XML, because…
-
0
votes0
answers178
viewsQ: How to organize array to display on graph (Chart)
This graphic aims to list the total monthly accesses by user type of the current year. It is divided into 3 series, each series represents a type of user, within it has the total of accesses of that…
-
1
votes2
answers1281
viewsQ: How to check if there is a string in this array?
How can I check for the "2017-11-15" string in this array? array(4) { [0]=> object(stdClass)#43 (1) { ["date"]=> string(10) "2017-11-13" } [1]=> object(stdClass)#44 (1) { ["date"]=>…
phpasked viniciussvl 699 -
0
votes2
answers676
viewsQ: How to convert from hexadecimal to Base64?
I’m getting a hexadecimal image from the database and have to convert it to base 64, only I don’t know how to do that. I am currently setting it as string and returning to json: Model private String…
-
1
votes1
answer891
viewsQ: How to display the time in 24 hour format using datetimepicker?
I’m trying to display in PM format, but whenever I select in timepicker it arrow as AM. $('.datetimepicker').datetimepicker({ lang: 'pt-BR', timepicker: true, format: 'd/m/Y h:i' }); When I select…
-
1
votes3
answers3029
viewsQ: How to verify if a value exists in a multidimensional array?
I have the following data coming from a bank: array(2) { [0]=> object(stdClass)#28 (6) { ["id"]=> string(1) "5" ["user"]=> string(2) "26" ["created_date"]=> string(19) "2017-09-29…
phpasked viniciussvl 699 -
0
votes1
answer325
viewsQ: How to convert bitcoin to real?
Guys, I have the following code that converts for example 14,000 in real to BTC that would give 1.07481682, only that I also wanted to do this guy’s reverse way, turn the 1.07481682 in BTC to 14,000…
phpasked viniciussvl 699 -
0
votes2
answers251
viewsQ: Upload multiple images by saving only one file
My code is saving only an X image that I select in the input file, for example, if I select 3 or 10, only 1 image will be saved, I’ve tried everything and I can’t get it to save all the images in…
-
0
votes0
answers89
viewsQ: Dropzone images are not coming to the server
I have a normal form and inserted the drozpone inside it following some tips by the community. When I give the Ubmit, the Dropzone images do not arrive at the server in any way, the $_FILES is…
-
1
votes2
answers362
viewsQ: Display name in input using autocomplete
The autocomplete is working correctly, I get the following json: [{"label":"Jorge Valdivia","value":"16"},{"label":"Vinicius Aquino","value":"15"}] The problem is that when I select an option, the…
-
1
votes1
answer511
viewsQ: When clicking the button makes two ajax requests, how to avoid?
When I click on the "Hire" button it makes two requests on the server at once, as I can avoid this? <button type="button" class="pagar" id="10.00">Contratar</button> Ajax…
-
1
votes0
answers1555
viewsQ: Problems Trying to Move Up Project in Bitbucket with Netbeans
I want to upload my git project into the Bitbucket repository by Netbeans, whenever I try to upload the following error: The remote repository contains non-mixed commits in the local branch. Open…
-
0
votes1
answer193
viewsA: Problems uploading images with the Dropzone library
I got it this way <form method="POST" enctype="multipart/form-data" id="myFirstDropzone" action="<?= base_url('Anunciante/adicionarImagens'); ?>" class="dropzone">…
-
0
votes1
answer193
viewsQ: Problems uploading images with the Dropzone library
I’m using the library Dropzone, it is working the only problem is that the selected files do not reach the server, always returns me Undefined index files, what could be? The form looks like this:…
-
1
votes1
answer194
viewsQ: How to go through the brother elements with jQuery?
What I want to do is to pass the mouse over some star, all the previous ones including it was with a "selected" class, I tried to use siblings along with each and almost got the result where I…
-
0
votes1
answer1390
viewsQ: Mouse image display text and vanish image (vice versa)
I’m trying to make this effect with that when passing the mouse over the image, it disappears and displays the text, when taking the mouse, add the text and display the image. I tried as follows,…
-
3
votes1
answer81
viewsQ: View the year and month that is coming from the array
I can already display the year inside the foreach by position, as I do to display the month too? The array is coming like this, the month in case would be that 3, 2, 3, 4 wanted to display this…
phpasked viniciussvl 699 -
3
votes1
answer1472
viewsQ: How to change content within div with Ajax/Jquery?
Here lists all records that when clicking edit opens a modal with description value. <?php foreach ($beneficios as $v): ?> <tr> <td><?= $v->id; ?></td> <td…
-
0
votes2
answers443
viewsA: Remove element by clicking the jquery link
I managed to solve so using the method parents, I don’t know if it’s the best way: $(".delete-newsletter").click(function(){ var id = this.id; var trAtual = $(this); $.ajax({ url: path…
-
3
votes2
answers443
viewsQ: Remove element by clicking the jquery link
I need to make sure that when clicking on the link it removes this element tr that is the link, someone can help me? <?php foreach ($emails as $v): ?> <tr> <td><?= $v->id;…
-
2
votes1
answer2265
viewsQ: jQuery validation with ajax does not work
When I click on Ubmit it does not validate the fields, it simply does Ubmit without even having filled in. Does anyone know what can be? Obs: The form is with id form_redes_social and all fields are…
-
1
votes0
answers331
viewsQ: How do I leave the Friendly URL in Classic ASP?
I can only access the file by placing its extension, for example clients.php. I configured the web.config file this way, but I did not get results: <?xml version="1.0" encoding="UTF-8"?>…
-
0
votes1
answer519
viewsQ: How do I check for a file?
I used the function file_exists and she even finds the file. The problem is that when it does not find, the message that does not exist is not displayed (it does not enter Else). <?php $email =…
phpasked viniciussvl 699 -
1
votes1
answer1133
viewsQ: Fatal error: Call to a Member Function num_rows() on a non-object
I’m looking for the total number of lines of a query but keeps giving this error, I’ve tried to use the function Row(), rowCount() and even check if found any results to return and still not reached…
-
1
votes1
answer1102
viewsQ: How to pass a controller variable to view?
I need to pass the variable $limit to my view and display it there, how could I do it? public function index() { // .... $this->pagination->initialize($config); $data['pagination'] =…
-
2
votes1
answer213
viewsQ: How to recover only 1 URL value with Codeigniter?
I’m passing two parameters http://localhost/topsamp-ci/votar/4-Slug-de-algo public function votar($id) { echo $id; die; } And it returns me 4-Lug-de-something. I wanted to just recover the ID but…
-
3
votes2
answers1567
viewsQ: How to handle string to avoid SQL Injection?
I have the following code: $nome = $_POST['nome']; $ip = preg_replace("/[^a-zA-Z0-9\.]/", "", $_POST['ip']); $porta = preg_replace("/[^0-9\s]/", "", $_POST['porta']); $site =…
-
2
votes2
answers354
viewsQ: Validate preg_replace domain
My question is this, I have the following function: $site = preg_replace("/[^a-zA-Z0-9]/", "", $_POST['site']); But when using in the string www.lostscavenge.com.br, that regular expression emits…
-
0
votes1
answer1623
viewsQ: Error using PDO: "Call to a Member Function query() on a non-object in ..."
I am trying to make a query in the bank, but I get the following error: Fatal error: Call to a Member Function query() on a non-object in C: wamp www site-noticias Class Publicacao.class.php on line…
-
0
votes3
answers1270
viewsQ: How do I not display the directory list?
Hello, so my question is the following, I have a folder called admin and another call general, which is inside the admin. Inside the admin folder I have a file called general.php so far ok, the…
-
1
votes2
answers87
viewsQ: How to not load the page by clicking on the select option?
I have the following select, every time I select some option it reloads the page, so far so good, but I want to make sure that by clicking the option nAtualiza, it just wouldn’t update the page, is…
-
0
votes1
answer36
viewsQ: How do you add a get without replacing what you already have?
I don’t know if it’s like that, but what I want to do is basically keep the GET parameters you already have on the page, for example it’s like this: http://localhost/forum/topic/verTopicos.php? id=1…
-
1
votes1
answer4234
viewsQ: How to submit a form with select without Submit button?
Good evening, how do I submit a form with select without the Ubmit button? For example, to create a filter that when selecting the option it automatically submits the form without having the Submit…
-
0
votes1
answer36
viewsQ: How to display results if my select turns out to be false?
And I’m having the following problem, there are two POSTS and TOPIC tables, one topic has several posts, and I’m displaying the topics by sorting the most current date of the topic post, only when…
-
3
votes1
answer188
viewsA: How do I get the value of each checkbox that’s inside a loop?
Guys, the mistake I made was to put the form inside the while, so it was only displaying the first checkbox marked, the form has to be outside the while but the input has to be inside. RESOLVED!!!…
-
1
votes1
answer188
viewsQ: How do I get the value of each checkbox that’s inside a loop?
Good morning guys, I need help :( The thing is, I need to delete several records at once so I need to select the ID of each record, so I did an input with checkbox inside the loop this way: <form…
-
1
votes0
answers44
viewsQ: How do I display the areas of each category?
Good evening guys, I’m in need of a little help I wound up here in PHP, is the following, I created two tables category and area, each category has several areas, each area can only have one…
-
0
votes1
answer920
viewsQ: How to sort a foreach by an array value?
Good afternoon guys, I’m doing a ranking with 10 people, is showing the 10, however I wanted to display in descending order through the value score <article class="rank"> <h2>Ranking de…
phpasked viniciussvl 699 -
1
votes3
answers506
viewsQ: Can you start with underline?
I wonder if a variable in php can begin with underline, for example: $_1teste;
phpasked viniciussvl 699 -
2
votes2
answers770
viewsA: How to display data in descending order?
Solution: array_multisort ($dadosjogador, SORT_DESC);
phpanswered viniciussvl 699 -
1
votes2
answers770
viewsQ: How to display data in descending order?
I would like to know how I can display the data on descending order across the field score, in that code he’s displaying the smaller for Mayr, and I would like to exhibit the greater for the lesser:…
phpasked viniciussvl 699 -
0
votes0
answers14
viewsQ: How to resolve header information warning
How can I resolve this warning? I’ve never seen it in my life, on my local server (localhost) does not give this warning, only on the hosting server... Warning: Cannot Modify header information -…
phpasked viniciussvl 699 -
0
votes1
answer1625
viewsQ: How to remove this warning Notice: Undefined index:
I have a variable $posicoes that receives the amount of elements that exist in the reply session: $posicoes = count($_SESSION['respostas']); So I check if the GET idQuestao is greater than the…
-
5
votes3
answers885
viewsQ: How can I check if the last position of the array has been filled?
How can I check if the last position of the array has been filled? I tried the function array_pop but it seems she cuts the element of array, I just want to check if in the last position of array is…
-
0
votes2
answers100
viewsQ: I can’t break line using Javascript
Good morning, I’m having some difficulty trying to break a line using [b] n[/b] javascript. The code is working perfectly, what happens is that when it displays, it looks like this: My nick:…
-
0
votes1
answer591
viewsQ: How to redirect the Subdomain directory?
I have a domain lostscavenge.com.br and I created a domain for it forum.lostscavenge.com.br that points to the forum Scavenge.forumeiros.com is working right everything beauty, the problem is that…
phpasked viniciussvl 699