Posts by Alisson Acioli • 5,815 points
323 posts
-
-2
votes3
answers1764
viewsA: PHP + Mysql - Quote syntax error in String
Try to "escape" the characters: function escape_mimic($inp) { if(is_array($inp)) return array_map(__METHOD__, $inp); if(!empty($inp) && is_string($inp)) { return str_replace(array('\\',…
-
1
votes2
answers92
viewsA: Error converting Ajax Array to Array in PHP
The best way would be to make a json and pass to data: {id:id} so in PHP it was just decode and loop the delete command. But one possible rs solution is the below. It concatenates each ID and in PHP…
-
1
votes2
answers1849
viewsQ: Slimframework: Method not allowed. Must be one of: GET
I’m having a hard time solving a mistake that’s been slim framework. I have a contact page that is accessed /p/contact, after accessing and clicking the send button, it tries to send the…
-
1
votes1
answer317
viewsQ: SQL counting data from the second table of INNER JOIN, but shouldn’t?
I have 2 tables: sponsors quotas What I need to do is check how many nominees the sponsors have but only count the users who have the record in the table cotas. The SQL I made is as follows: SELECT…
-
1
votes0
answers63
viewsQ: Group elements based on values
JSON: var obj = { 'itemA' : { 'x' : '300', 'y' : '200' }, 'itemB' : { 'x' : '305', 'y' : '210' }, 'itemC' : { 'x' : '442', 'y' : '210' } }; What I need to do is take these items and instead of…
-
1
votes1
answer43
viewsQ: Pulse effect does not work properly when it has 2 elements
I have the following code: <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" xml:space="preserve"> <g> <circle…
-
2
votes2
answers401
viewsQ: Get element position based on another
Has two 3 Divs: <div style="margin-top: 30px;width:50px;height:50px;"></div> <div class="boxPrincipal"> <div class="elementoSecundario"…
-
2
votes0
answers59
viewsQ: Get X and Y of <g> with ID even when zooming in
I have a map of Brazil with several <g> svg. Each element of this is a municipality. I need to take the X and Y of this element in relation to the div that svg is in. The biggest problem is…
-
1
votes1
answer113
viewsQ: json array with javascript serialize not working
I have this form: <form> <select name="data"> <option>0831</option> <option selected>4731</option> <option>9831</option> </select> <br />…
-
-1
votes1
answer28
viewsQ: Add element content that contains the data-layer "element" in the tag
I have the following code: <ul class="dropdown-list-autocomplete" id="Layer_1abc" data-layer="Layer_1"></ul> And this JS: function AtivaAutoComplete(id_mapa, regiao, path_map){…
-
1
votes1
answer59
viewsQ: Executing action on a non-clicked ID
I have several links: <a href="javascript:void(0);" id="ZoomPath" data-ref-id-map="Layer_1" data-ref-g-id="xxx">São Paulo - São Paulo</a> <a href="javascript:void(0);" id="ZoomPath"…
-
0
votes1
answer40
viewsQ: Mongodb finds no record of some names
I’m pulling some data from Mongodb with Codeigniter and came across something strange... Some records are found and others are not. Debugging the code I saw that the problem was the name he is…
-
1
votes1
answer49
viewsQ: ngRoute not working properly
I’m trying to create routes with the AngularJS to make a Single Application. I can load the main page that would be the /, but others that contains parameters I cannot. I have the URL…
-
0
votes1
answer68
viewsQ: Spawn play ENOENT Nodejs
I’m trying to use a library called steal: const Troubadour = require('troubadour'); const troubadour = new Troubadour('sox'); app.get('/playmusics', function(req, res){ troubadour.on('start', ()…
-
1
votes3
answers1230
viewsA: Return ajax data with php
I use the CodeIgniter and sometimes I also need to get some information via ajax. What I recommend you to do is to create a controller special only for ajax requests. I would make a controller…
-
0
votes0
answers28
viewsQ: resizable and draggable do not work on items added later
I’m using draggable and resizable of jQuery UI to box the user can change the dimension and move. It is working properly if I put the <div> right in the code: <form action="" method="post"…
-
3
votes2
answers141
viewsQ: Search content within tag parameters
I’m creating a search bar where the user type and filter in real time the content of <li>. I have a similar code: HTML <ul id="list-search-filter-map"> <li><a…
-
1
votes2
answers80
viewsQ: Error getting photo from facebook friend via PHP SDK
I’m using the Facebook SDK API to work with facebook. The SDK version I’m using is 2.8. I’m pulling up the list of my friends' Ids and I can successfully get. What I need now is to get a picture of…
-
3
votes3
answers611
viewsA: Variable variable in php
I agree with @bfavaretto ... the code with $variavel$i would be a bit confusing. To increment using his answer, I put a loop on the images, because if you change the LIMIT SQL, so you don’t need to…
-
2
votes2
answers79
viewsQ: Remove Download after page fully load
I have a custom Clicker that appears on the screen while loading. When I’m done I need this Clicker to disappear, so there’s nothing wrong. The problem is that the page is still doing some processes…
-
1
votes1
answer1254
viewsQ: Return the maximum sum of Collection with Mongodb
I have a collection in the MongoDB and it has several records and I need to sum up a column by UF and then return the highest value of that sum. For example UF: 'SP', Valor: 10 ---- UF: 'SP', Valor:…
-
1
votes1
answer189
viewsQ: D3.js shows nothing on the screen
I’m trying to use D3.js but I’m not getting it. I have the code below, but it doesn’t print the map of Brazil. The screen shows no error, what could it be? my file "meso.json" is in topojSON format…
-
2
votes1
answer653
viewsQ: Catch Querystring with Nodejs
I need to pick up the QueryString which is being passed to the server created on Nodejs. I’ve tried several ways but I can’t get the parameters of and Ph. I’m a beginner at Nodejs and the code I…
-
3
votes2
answers260
viewsQ: Error sorting positive and negative numbers Jasvascript
I have an array with several numbers, these numbers are positive, negative and decimal as well: var array = [365, -1.304, -17.803, -3.529, -3.602, -2.942, -2.074, -115] I need to sort this array of…
-
0
votes1
answer92
viewsA: How to get an infinite route in Codeigniter?
Try to use: $route['busca/(:any)'] = "Busca/index/$1"; $route['busca/(:any)/(:num)'] = "Busca/index/$1/$2"; So you will access: http://www.seusite.com.br/busca/qualquercoisa/umnumero And he can be…
-
1
votes0
answers68
viewsQ: Array is not being created correctly
I have a variable from AngularJS which saves any json I upload, the json data is similar to that: { "Products": "Pimenta Vermelha muito boa", "Product_Code": "XXXXX", "RTV": "Alisson Acioli",…
-
0
votes3
answers130
viewsA: Store PHP array value and quantity
Your array seems to be a multi-dimensional. Try it this way: <?php $ar1[] = array("red","green","yellow","blue"); $ar1[] = array("green","yellow","brown","red","white","yellow"); $ar1[] =…
-
1
votes3
answers16786
viewsQ: Change object value
I have an array with objects similar to this: [{ name: '2015', data: [...] color: 'orange' }, { name: '2016', data: [...] color: 'red' } ] I’d like to change the value of name for another name, like…
-
2
votes3
answers88
viewsQ: Insert non-existent months into the array
I’m putting in a array total sales value per month. The code is working perfectly, but I need the javascript check which months are not in this array and fill it in order 1 to 12. For example: The…
-
0
votes1
answer430
viewsQ: jQuery conflict with Angularjs
I’m having a problem with AngularJS and jQuery. When I only use jQuery in the layout, the menu (sidebar) I have opens normally. But when I add Angularjs the menu does not open anymore, it is simply…
-
-2
votes1
answer329
viewsQ: Javascript multidimensional array with angular is undefined
I’m trying to create a multidimensional array but it returns to me results[array. state] is Undefined. I’m using angularjs: results = new Array(); var indice = 0;…
-
2
votes2
answers46
viewsA: Take array data dynamically in PHP
Change the read function for this: // Lê registros function DBRead($table, $params = null, $fields = '*'){ $table = DB_PREFIX.'_'.$table; $params = ($params) ? " {$params}" : null; // Caso não haja…
-
1
votes3
answers1306
viewsQ: Empty string passed to getElementById()
I’m using the jQuery and I have the following code jQuery(document).ready(function($){ $(".checkParcelamento").click(function(){ var bandeira = $("#bandeiraCartao").val(); var numero_cartao =…
-
-2
votes2
answers328
viewsQ: With "echo" it works and with "Return" it doesn’t
I have a function, and it checks if the ID that I’ve informed has more than six records in the database. If it has, then it takes, makes a select to return these 6 records and plays in an array and…
-
0
votes2
answers99
viewsQ: Problem with CSS Filter in some browsers
I’m trying to use the parameter filter CSS, but in some browsers with Chrome and IE not working, already in firefox it works normally as desired. The code I have is this: .empresas-marcas ul li a{…
-
1
votes0
answers224
viewsQ: Change "Fill" of each path according to the color in an array
I am doing some tests and I am generating a map of Brazil with all municipalities and I am creating an array that will have the following structure: var arr = []; arr['São Paulo'] = 'red';…
-
0
votes3
answers3943
viewsA: Remove "margin" of responsive website image by CSS
Use html, body{ margin:0px !important; padding: 0px !important; }
-
3
votes5
answers1033
viewsA: What is the definition of each css selector combination
The . is the element that contains class="" ... When we use class="" in HTML then in CSS we call the element with . (point), example: HTML <div class="fundo-vermelho">Aqui vai ser um fundo…
cssanswered Alisson Acioli 5,815 -
0
votes2
answers268
viewsA: Codeigniter multilingual site
I would not create 4 columns stating which language it would be like in the example you quoted: titulo_br | titulo_en | conteudo_br | conteudo_en I would make a normal table and only create a column…
-
0
votes1
answer192
viewsA: PHP - How to navigate a radios array?
The Table <?php while($row = mysql_fetch_array($alunosTurma)){ ?> <tr> <td><?php echo $row['NM_NIS_ALU']; ?></td> <td><?php echo $row['ST_NOME_ALU']; ?>…
-
2
votes1
answer959
viewsA: How to select all columns in the database
You can do the SELECT selecting only the fields date and name: SELECT nome,data FROM sua_tabela And also you can select all table columns SELECT * FROM sua_tabela If you want to select these same…
-
1
votes2
answers807
viewsA: Limit total options in select - PHP
Slightly improving the code of @Ricardo ... Here it disables the button when it reaches more than 3 selected. <script…
-
2
votes2
answers140
viewsA: Classification system
Do so: <?php include("./configs/dados.php"); $posicao = 4; $ranking = "SELECT * FROM usuarios ORDER BY pontos_total Desc LIMIT 3,10"; $limiteranking = mysql_query("$ranking"); while ($ranking =…
-
1
votes3
answers6527
viewsA: How to release port 80 to Apache?
The ideal would be you change the door of the EasyPHP, because some other programs use port 80 by default. To change the Easyphp Standard Port: 1 - Click the Easyphp icon 2 - Go to Configuration and…
-
2
votes2
answers102
viewsA: Php file that creates html, how do I get the information to come from the database?
Make a SELECT <?php # Nome do arquivo html $pagename = "pastatest/paginahtml.html"; # Pega texto no Banco de dados $query = $conn->prepare("SELECT * FROM sua_tabela WHERE id='1'"); //Em id vc…
-
2
votes2
answers573
viewsA: Does anyone know why Mysql Select sometimes doesn’t work?
Table: Code (with C capital) |idEquipamento|idCodigo| | 1 | 123 | | 2 | abc123 | Test this command: SELECT idEquipamento, idCodigo FROM Codigos WHERE idCodigo = 'abc123' It should return the second…
-
1
votes1
answer61
viewsA: Validation input problem
Try function repeatLink(){ var link = $("#link").val(); if (link === null || link === '') { $("#link").addClass("input-required"); } $.ajax({ url: './model/functions/link_repeat.php', type: 'POST',…
-
0
votes2
answers97
viewsA: Element Span at the front
Try putting a z-index <td style="font-size:10%"> <p class="list-group-item-text"> <a href="@Url.Action("Cidade", "Cidade", new { cidadecod = item.cidadecod, contratocod =…
-
2
votes2
answers21084
viewsA: Brazilian Time Zone in Mysql
Add date_default_timezone_set('America/Sao_Paulo'); at the beginning of your PHP code, timezone will be correctly configured. Remembering that you have to add on the page that makes the insert in…
-
0
votes1
answer643
viewsQ: Get item from an array with jQuery
I have the following structure: [{tabela: 'tabela1', coluna: 'coluna1'}, {tabela: 'tabela2', coluna: 'coluna2'}] I need to insert this data into a div in format: [TABLE.COLUMN] In case it would:…