Posts by AnthraxisBR • 4,361 points
185 posts
-
2
votes2
answers1173
viewsA: Color chartjs numbers
chartsjs has a number of attributes with specific functionalities when it comes to the appearance of the rendered object. An example for the 'labels' the legend (removed from the documentation…
-
3
votes3
answers423
viewsA: How do I remove the characters from the variables in PHP to send to the database?
1 - The function explode() does not serve to remove characters, its function is to explode a string separating its value in an array according to the parameter chosen, as in the following example:…
phpanswered AnthraxisBR 4,361 -
5
votes4
answers788
viewsA: Using HTML5 default value
1 - The attribute disabled is an attribute to indicate what its name says 'desabilitato', that is, he will not be skilled within form. 2 - Even with the attribute disabled, the value appears, in…
-
1
votes3
answers408
viewsA: Sort array by itself within PHP Intel
Answering the question to tell how you used the answers received: Receiving the data (passed by Datatables), and calling a function to define: $order_col = $_POST['order'][0]['column']; $order_dir =…
-
2
votes3
answers408
viewsQ: Sort array by itself within PHP Intel
I am working with the datatables, and by chance of the destination I decided to use the function ajax from it, I did the whole process, but one thing is missing, to be able to reorder the array,…
-
1
votes1
answer260
viewsA: Complete fields from a field with mask
1 - To keep the mask in the field and search, remove the special characters inside the function: function ret($cep, $conn){ $a_cep = str_replace(".", "", $cep); $b_cep = str_replace("-", "",…
-
0
votes1
answer28
viewsA: Upload my website to halfway
php comes by default on the server allowing a maximum upload size, and has a timeout as well, they can be changed by the initial configuration: For the size: 1 - Open the file php.ini 2 - Find lines…
phpanswered AnthraxisBR 4,361 -
3
votes2
answers451
viewsA: Apply CSS to a button
You are using correct bootstrap ? need to indicate a .input-group. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><script…
-
2
votes1
answer2910
viewsQ: How does the 'Shown.bs.modal' event work?
The doubt is simple : How the event works¹ shown.bs.modal in Boostrap CSS? How could I create something like this event ? ¹ - Not how it works to use this event, but how the plugin has a special…
-
0
votes0
answers31
viewsQ: Event that identifies shooting another event?
I have a jQuery event that comes from a framework, and I need to trigger a specific event at the end of the shooting of this event that is not foreseen. It would be something like this: Framework…
-
1
votes1
answer138
viewsA: Show Pop-up when user approaches browser address bar
Capture the firing position by 'Mousemove', check the value of Y, compare with distance you want: $(window).on("mousemove",function(event) { var y = event.pageY; if(parseInt(y) < parseInt(20)){…
jqueryanswered AnthraxisBR 4,361 -
0
votes1
answer430
viewsA: Popover inside a table does not work
The problem is only in the note, your jQuery is not firing the Popover. Add an attribute trigger at the <a> inside <td>: <a href="#" data-toggle="popover" title="teste"…
-
3
votes1
answer50
viewsA: Give Hide or show by clicking another element
You don’t need more than 4 lines to do this, add a common classname to the elements, and do this. $(document).on('click','.topic',function(){ $('.topic').removeClass('exibir');…
-
1
votes0
answers34
viewsQ: Performance in somatic database
I have a system in development but are already using in beta, this system has as specific focus: 'control 100% of shares, action by action, without losing any history how it was and how it is now'…
mysqlasked AnthraxisBR 4,361 -
1
votes1
answer357
viewsA: How to use the "php_admin_value" flag in virtualhost via PHP-FPM on a specific Virtual Host?
NOTE: I do not know if I understood right, maybe this right, if not comment to delete the wrong answer, or if I can delete this line. 1 - Create a group and a user for this host (will serve to…
-
1
votes1
answer626
viewsA: I cannot return to input the value of a PHP POST
1 - Set a fixed mask for the value fields, use the plugin jQuery Input Mask , or use input with type='number', but this does not work in multiple browsers, to lock a format for number recommend the…
-
3
votes2
answers821
viewsA: Hide table <td> in some mobile resolutions
You have the responsibility utilities that allow you to do this without needing CSS external to the Framework: To display: .visible-xs-* .visible-sm-* .visible-md-* .visible-lg-* *(asterisk) - may…
-
2
votes1
answer378
viewsA: I can’t install PHP-FPM on Ubuntu
The latest versions of Ubuntu do not support PHP 5.6 natively, only 7.0+, but you can still install the dependencies and components via Ppas. For php-fpm: sudo add-apt-repository ppa:ondrej/php sudo…
-
0
votes1
answer48
viewsA: Creating mkdir folder via PHP is not accessible via FTP
You are creating the folder with mkdir on a linux server, probably the permissions come locked. Create the folder with ftp_mkdir, so you can define the user you can open, and use it to access with…
-
0
votes1
answer31
viewsA: Putting minutes into working time
I think you can settle this quietly with the library Moment.js: Example: moment().format('MM DD YYYY, h:mm:ss'); // 09 29 2017, 3:07:08…
-
0
votes2
answers5547
viewsA: API or database to achieve latitude and longitude
Geolocation by the zip code ? It doesn’t make much sense, geolocation is the name itself, a location, a zip code, has an area, not a point, latitude and longitude will give you a point. By the zip…
-
8
votes3
answers3029
viewsA: How to verify if a value exists in a multidimensional array?
If you are sure how many dimensions are, in the case there, apparently from a loop: foreach($array as $row){ if($row['user'] == '26'){ return true; } } You can also use: foreach($array as $row){ if…
phpanswered AnthraxisBR 4,361 -
1
votes3
answers461
viewsA: Is there a significant difference in performance when using Netbeans IDE with JDK 9 instead of JDK 8?
Netbeans is a full-fledged, slow, heavy IDE that consumes a lot of PC resources, not to escape it. Netbeans does not use SDK for it, it uses the SDK when using it to program JAVA. The version of the…
-
1
votes2
answers118
viewsA: Problems with JSON + PHP
It is putting a natural input in the array, and you are trying to access a key that is not key, wrong method: function setFavorite() { $settings = read(); //Essa abertura [] indica para preencher o…
-
1
votes1
answer2645
viewsQ: Force a shortcut to open Firefox directly on a page
My system is a tax obligations manager and works in any browser virtually, but I have not tested at all, so I do not know if it will be stable at all, I developed doing tests on firefox-dev, so in…
-
0
votes1
answer11
viewsQ: Where did the _POST demo of the console end up in the new firefox?
Until I update firefox on my PC (Ubuntu 16.4) the console demonstrated in one place 'params' (I’m not sure anymore if it was 'params' or 'post') what I had sent by the method post, now this tab does…
-
13
votes2
answers166
viewsQ: What is the impact of changing the keypress event so that it interacts a 'level up' than the key would do natively?
A simple example, no code required: If I press CTRL + F, automatically the browser opens a search bar on the page. I made sure that by pressing CTRL + F it points to an input within the system. I…
-
0
votes0
answers60
viewsQ: Use two different headers for two different exits in the same call
At a certain point, I need to generate XLS files on my system, and use the following header for output: header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition:…
-
2
votes1
answer859
viewsQ: Force download of multiple dynamically generated files with Phpexcel
I have a class responsible for receiving the upload of one or several worksheets .XLS with lots of detailed data (This spreadsheet is default), and convert into another file .XLS leaner for…
-
1
votes0
answers83
viewsQ: PDO returning error when no error
Randomly, I get the following error while upgrading my system: Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Cannot assign requested address By error, it can not connect to the server,…
-
2
votes2
answers124
viewsQ: Is there a 'native' way of the <form> tag to identify changing the original state of a form?
Assuming a form was loaded with 10 text fields with value 1, and the user modified one of these to 0. When submitting the form, there is something 'native' that identifies it had some change in the…
-
1
votes2
answers650
viewsQ: Object orientation with jQuery/Javascript
I’ve read several things about it,: var classe = function () { var metodo = function () { return 0; } return { init: function () { metodo(); } }; }(); jQuery(document).ready(function () {…
-
0
votes2
answers81
viewsA: Search all records that exist in another table at least once
Supposing you made the inquiry and ordered the products: produto - categoria arroz - comida feifão - comida And this is in an array: $arr = [ 1 => [ 'produto' => 'arroz', 'categoria' =>…
mysqlanswered AnthraxisBR 4,361 -
0
votes1
answer2783
viewsA: How to add an inputmask email mask to an input field within a table?
I saw that solved, but I will give an answer in case you need to set more of a mask, without having to call the method again: HTML example: <input type='text' class='mask' data-mask='cpf'…
-
0
votes1
answer334
viewsA: Insert data into the chart
You have two ways of doing this: Build an array in PHP and embed it into JS, or build a string in the format, and print on top of JS, in my opinion, the first is better, the second is easier.…
-
-1
votes2
answers1086
viewsA: Compare two values with jquery
Try to modify this part: if (id_bairro === bairrocadastrado) { $('.entregatotal').html("R$" + valorfrete); $('.bt-finalizar-01 .finalizar-compra-carrinho').css('display', 'block'); return false; }…
-
5
votes2
answers13376
viewsA: Generate Nfe Key
The Nfe key has the following rule: cUF - Código da UF do emitente do Documento Fiscal; AAMM - Ano e Mês de emissão da NF-e; CNPJ - CNPJ do emitente; mod - Modelo do Documento Fiscal; serie - Série…
-
0
votes2
answers417
viewsA: How to make Tables with different ids for Function javascript
To fire the same function on multiple elements they need to be identified by classnames. In HTML: <button id="id_c02b_marcar_consulta" type="button" class="id_c02b_marcar_consulta btn"…
-
1
votes3
answers2405
viewsA: Is it possible to export the source code of an Android Studio project? How?
I believe this will solve: Install the Oracle virtualbox: https://www.virtualbox.org/ Download some android ISO: http://www.android-x86.org/download Install this iso in virtualbox:…
-
0
votes1
answer241
viewsQ: Kill and reply JSON with PHP
My framework submits forms with a fixed concatenation stating the type of data, which validation it should pass, the field name relative to the table in the BD and the value, would be something…
phpasked AnthraxisBR 4,361 -
1
votes1
answer812
viewsA: How does GET work with AJAX?
You need to demonstruct what your current page is when making the request, add an attribute stating this to the 'next', 'Prev', 'last', 'first'. echo "<li class='page-item'><a href='#'…
-
0
votes2
answers98
viewsA: Read HTML inside a Sweetalert plugin confirmButtonText
The answer was @Renato Diniz' comment on the question. I changed it to Sweetalert2, problem solved.
-
1
votes1
answer291
viewsA: Jquery - Select and deselect elements on the page
Indicates a jQuery event to add a class to the clicked element, and remove from all and add one to $(this). $(document).on('click','.div',function(){ var $this = $(this);…
-
1
votes2
answers404
viewsA: mysqli_fetch_array without using while
Without the while has like, no loop has no way, unless you do one by one, which makes no sense, use the foreach. <?php $arr = mysqli_fetch_array($usuario, MYSQLI_ASSOC); foreach($arr as $row){ }…
phpanswered AnthraxisBR 4,361 -
3
votes4
answers59
viewsA: Click the div to open option
Normally that’s not possible, but like everything else in life, you can do it in some way, Take a look at the bottom section, I think there must be some other way, but that’s the only way I could…
jqueryanswered AnthraxisBR 4,361 -
2
votes4
answers130
viewsA: how can I put a condition in if so that it doesn’t happen if the array has "..." at the end of the sentence
I believe this should work: $prod->setNome(Utility::limitaString($prod->getNome(), 30)); public static function limitaString ($string, $size = 50) { if (strlen($string) > $size) { $string =…
-
0
votes1
answer508
viewsQ: What is the purpose of Moment.js?
I bought a new bootstrap template for my system, and it came with an included business that returns several alerts, Moment.js. From what I understand it is like a client-side validation library with…
-
2
votes1
answer56
viewsA: Update price within a box with jquery
Quite simply this, trigger an event by changing the OS, and capture the url and value, fill in the data: $(document).on('change','.SO-select',function(){ var val = $(this).val(); var box =…
-
1
votes1
answer2354
viewsA: PHP - MODAL window
First: You are printing options out of a select. Basically, you only need to include an event to select within the modal, when changing the value of select trigera the modal closure and the input…
-
2
votes1
answer39
viewsA: What’s wrong with my code?
Missing include jQuery library, <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="…