Posts by AnthraxisBR • 4,361 points
185 posts
-
1
votes1
answer56
viewsA: Does not capture events after cloning - jquery bootstrap
By the attributes of his HTML, and knowing that you are using Bootstrap CSS. What’s going on is that: For the plugin Collapse Bootstrap CSS uses two main identifiers to tell you what the target will…
-
1
votes2
answers728
viewsQ: How to search for something in 100% of Mysql database
There is a Mysql query where I can search all the data of all tables in a database at one time? Equivalent to something like this: "SELECT todos_os_campos FROM todas_as_tabelas WHERE qualquer_campo…
mysqlasked AnthraxisBR 4,361 -
0
votes2
answers246
viewsA: I need to select recipes and their ingredients, without repeating the other recipe fields
Let’s assume you’ve already done your search and fetch an array on it, getting the result: 1| Carrot cake | method of preparation: blablabla | Category: Sweets | flour 1| Carrot cake | way of…
-
2
votes1
answer47
viewsA: FX (sound effect) in UX, is it good practice for systems running on browsers?
After some use analysis, it was identified in our context, that sound effects are not so User Friendly as they are in other contexts. Motives: Corporate group environment - Users need to communicate…
uxanswered AnthraxisBR 4,361 -
4
votes1
answer38
viewsA: Consultation with combined criteria
You can do this with IN in mysql: Query using 'IN' SELECT * FROM pe_basedecisao WHERE cidade IN ("351015", "351013"); Translation of this query without 'IN' SELECT * FROM pe_basedecisao WHERE cidade…
-
0
votes2
answers139
viewsA: Force file . EML open directly in e-mail client
Solution was only with headers even, it didn’t work just because it pointed out the standard program by 'content-type' be set wrong, with 'message/rfc822' worked correctly (force the download and…
-
0
votes2
answers139
viewsQ: Force file . EML open directly in e-mail client
Thunderbird allows a 'imagem' email be saved in a file, this file comes in format '.EML', and on my system, users load this file into the system along with what they are doing related to particular…
-
1
votes2
answers156
viewsA: Save after hiding a div
As you said yourself, you can do this with cookies: $(document).ready(function() { $(".info-game--remove").click(function() { $('#info-game').css("display","none"); document.cookie =…
-
1
votes1
answer19
viewsQ: Is it wrong to return $this->something to another value after using the value of a previous assignment?
I have the following example: <?php class Classe { public function calcula(){ $resultado = ($this->valor * 2); $this->valor = $resultado; return $resultado; } public function valor(int…
phpasked AnthraxisBR 4,361 -
2
votes2
answers2830
viewsA: How to check if a file has been selected in the input field?
1 - You will not carry with the form, the form will just force the upload to some script server-side (PHP) to do the upload, in case, you would receive on PHP and would do it would put the file…
-
0
votes2
answers85
viewsA: Bootstrap is a CSS?
More or less, bootstrap is a CSS framework, however, it uses jQuery in interactions, see the following example: With a JS file <script…
-
6
votes1
answer47
viewsQ: FX (sound effect) in UX, is it good practice for systems running on browsers?
I’m doing some finishing for a release, and I had the idea to put some sound effects, like 'crack' when closing modal, or 'pin' by warning something. Well, personally I didn’t like it, but it seemed…
uxasked AnthraxisBR 4,361 -
0
votes4
answers1713
viewsA: How can I create a circle in CSS with number in the center to use in wordpress
More or less that, main property is the border-radius: .circulo{ border: 1px solid #000; border-radius:30px; width:50px; height:50px; text-align:center; vertical-align: middle; background-color:…
cssanswered AnthraxisBR 4,361 -
0
votes1
answer75
viewsA: Undefined method in Ruby
Are you saying that Note belongs to Student, and trying to access in a way that he won’t allow, and will get the error response: noMethodError in Notescontroller#index Undefined method 'Notes' for #…
-
2
votes2
answers119
viewsQ: Iframe does not support the "resize:" property in Mozilla Firefox
I have a function that arrow the WYSIHTML5 plugin in a textarea, this plugin migrates the textarea to an iframe: <iframe class="wysihtml5-sandbox" security="restricted" allowtransparency="true"…
-
1
votes1
answer17
viewsA: Combox appear if there are records
It’s simple, return information in the query’s json response saying whether or not there are colors: $key = $_REQUEST['idProduto']; $tamanho = $_REQUEST['tamanho']; $sqlCores =…
jqueryanswered AnthraxisBR 4,361 -
3
votes1
answer60
viewsQ: Why in PHP and Mysql ! is it converted to 0 in some cases?
The question is the title by itself, in PHP we can do: var_dump((int) "!"); And receive int(0). And in Mysql we can do: SELECT campo_int FROM tabela WHERE campo_int = "!" What if this 'campo_int'…
-
0
votes1
answer131
viewsQ: Is it possible to apply style to an XML structure?
A while ago I did that question, and those days I wondered if I could not use XML for structures, for example, with a table,: XML: <root> <row> <col>col 1</col>…
-
16
votes4
answers1634
viewsQ: What does the term "atomic" mean?
I see in some answers/questions the term "atomic". In programming, what it must mean in fact? Ex: comparison (4) is possible only for Atomic and list types What are the atomic transaction methods in…
-
2
votes1
answer44
viewsA: Is it possible to find this in a foreach?
The solution was found right after the question, just add the key pickup: foreach ($return as $rs_key => $rs_row) { foreach ($rs_flag as $flag) { if($rs_row['id'] == $flag['relationship']) {…
phpanswered AnthraxisBR 4,361 -
2
votes1
answer44
viewsQ: Is it possible to find this in a foreach?
I have the following script: $arr = [ 10 => [ 'Xa' => 'xA' ], 32 => [ 'Xb' => 'xB' ], 45 => [ 'Xc' => 'xC' ], 78 => [ 'Xd' => 'xD' ] ] foreach($arr as $var){ if($var['Xa'] ==…
phpasked AnthraxisBR 4,361 -
1
votes1
answer55
viewsQ: Doubt about icons in UX (Font-awesome)
I have a table (Datatables), and this table lists controls: These controls are accounting, tax, documentary and other activities, every month a company receives a control for each sector, and this…
-
2
votes1
answer125
viewsQ: What does the Depth parameter of the json_encode() method mean?
Sometimes I noticed that Docs suggests that instead of using the native method \json_encode() from PHP, he suggests using a class method for requests that apparently does the same thing…
phpasked AnthraxisBR 4,361 -
3
votes0
answers103
viewsQ: Force sequence of methods to have their call set to default?
I have a framework that is used basically in building forms and events HTML/jQuery with PHP, an example call: $VIDB_input = new \vidbModel\inputElement(); $documentos_date_action = 'triggered';…
-
3
votes1
answer1235
viewsA: PHP Save form data in array and display on another page
Assuming you’ve already sent the form and received the information on the other side: Log in again: session_start(); And just below do a light work with the arrays so you can keep storing the…
phpanswered AnthraxisBR 4,361 -
0
votes1
answer665
viewsA: Dropdown From Bootstrap Menu Does Not Drop Down
By the error message, and by using Bootstrap 4, you are missing Popper.js: <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/popper.min.js"></script> And you’re adding…
-
0
votes3
answers222
viewsA: Getting TD value and placing it in the array - Javascript
The solution in Anderson’s answer is simpler, but follows an option using jQuery: var data = []; $('#tblItens').find("tr").each(function (i, el) { var row = []; var td = $(this).find('td');…
-
1
votes2
answers945
viewsA: Bootstrap responsive examples please
The Bootstrap CSS framework has several liability utilities, explained in the following basic way:: In Bootstrap CSS there is the mechanism called 'grid', which is nothing more than distributing the…
-
8
votes1
answer707
viewsQ: Why use Mutationobserver instead of Mutation Events?
Well the title is the question itself, I know it’s because the Mutation Events will not be continued further, but: What is the difference between one and the other (not how to use, but the technical…
-
2
votes2
answers1087
viewsA: Open a tab by clicking on the navbar link
Recreating the same situation: $(document).on('click','.navbar-nav li a',function(){ var tab = $(this).data('tab'); $('.'+tab).trigger('click'); console.log(tab); }); <script…
-
4
votes3
answers4370
viewsA: How to add opacity only to the image?
This is happening because if you directly inform the element that it must have an opacity, all its heirs will receive this same opaque style, example: .pai-opaco { background:…
-
3
votes1
answer81
viewsQ: What does cardinality mean in this case ? (jQuery Inputmask)
I have the following excerpt: $('#elemento').inputmask({ mask: "*{1,255}", greedy: false, definitions: { '*': { validator: "[A-Za-záãâÁÂÃéêẽÈÊẼìîĩÌÎĨòôõÒÔÕùûũÚÛŨ ]", cardinality: 1 } } }); The…
-
2
votes1
answer296
viewsA: Dynamic graph does not update
This is happening because the PHP code that is in the same file that renders the graph, PHP is processed only once at the time of page loading, so to process repeatedly, it is necessary to call…
-
0
votes0
answers105
viewsQ: Equivalent to PHP eventListener
I have a series of PHP classes that assemble my HTML structures based on CSS Bootstrap already added with their respective Javascript actions, such as this call: $VIDB_button = new…
-
4
votes2
answers256
viewsQ: Function javascript duplicating trigger by init method
I have a function in my main menu that, when clicked, starts a 'classe' for the sector in question, everything goes well, however, I need to start the same class again when someone goes back to the…
-
1
votes2
answers287
viewsA: Registration for minors -Php - Javascript
Directly, you just need to capture the shipping date, and date today, and calculate the difference between the two: $('.dtnasci').on('input',function(){ var dtnasci = $(this).val(); var hoje = new…
-
1
votes0
answers51
viewsQ: Is this a good way to instantiate a modal without leaving traces in html?
The initial phase of the project I’m working on is almost over, and I’m adjusting things done in a way not very well done (gambiarras). One of those things was that I left two modal elements of…
-
0
votes1
answer52
viewsA: Update variable in IF
The error is here: if (strlen($cnpj_part) == 14){ $cpf_part = ''; } if(strlen($cpf_part) == 11){ $cnpj_part = ''; } In your code you were comparing strlen within the function, the top code should…
-
1
votes1
answer26
viewsA: concatenate into $.keyframe.define parameters
Assuming you have the values of tMin and tMax defined, and want to concatenate, must concatenate outside the array: var tMinConcat = tMin + '%'; var tMaxConcat = tMax + '%'; var tMinAttr =…
jqueryanswered AnthraxisBR 4,361 -
3
votes3
answers306
viewsA: How to remove internal dashes from a <SELECT> in Firefox
There is already an answer saying something similar, but complementing: .form-control-border { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857;…
-
0
votes1
answer73
viewsQ: Monitor if the change event occurred in a short time
I have in my framework a trigger that sends the data from input onchange for a model that validates and returns, in this process there is a problem, each character typed is made a submission, what…
jqueryasked AnthraxisBR 4,361 -
2
votes2
answers574
viewsA: How to catch the "name" in an HTML editor?
1 - You cannot put an editor in a div if you wish to submit via form, should put in a textarea: <textarea id='editor' name='editor'></textarea> 2 - To make it recoverable, you need to…
-
5
votes1
answer4404
viewsA: How to change the width of the modal bootstrap?
You don’t need external CSS to the framework for this, add one of the bootstrap size classes to the classnamed element .modal-dialog: > .modal-sm = pequena (small) > .modal-lg = grande (large)…
-
1
votes2
answers142
viewsA: How to prevent a modal from appearing?
There is an option using the bootstrap events themselves, not so feasible, but to adapt: $('.modal').on('shown.bs.modal',function(e){ var button = $(e.relatedTarget); var target =…
-
14
votes1
answer5204
viewsA: What is the difference between . on(), . click(), . Blur(), bind()?
There are many triggers for jQuery, here is a brief explanation: 1 - The method .click() is the name itself, it will fire an action when there is a 'click' in some element informed in the selector:…
jqueryanswered AnthraxisBR 4,361 -
0
votes2
answers1035
viewsA: How to insert value in mysql with PHP and Ajax
Let’s go in pieces: 1 - This process encompasses 4 things, HTML, Javascript, PHP and Ajax. HTML Will build the elements Javascript will make the interaction between HTML, Ajax and PHP. ajax will…
-
3
votes1
answer42
viewsA: Removing fields from a list
You will use jQuery or javascript for this, and can also be done only with CSS. I’ll give you an answer with jQuery, just add an event 'click' to remove button, and remove the nearest li element…
-
1
votes2
answers204
viewsA: Recover jQuery date variables
It is not working because your call 'makes no sense', you are informing $(this) to catch a attr other element. In this passage: $('#abrir-imagem').on('show.bs.modal', function(e) { You are saying…
jqueryanswered AnthraxisBR 4,361 -
5
votes1
answer257
viewsQ: What is more efficient, a complex query or treat the results?
I can do it: $sql = 'SELECT * FROM ' . 'data_companies ' . 'INNER JOIN data_companies_extra_infos ON' . 'data_companies.cod = data_companies_extra_infos.relationship'; $rs =…
-
13
votes5
answers1023
viewsQ: What is the difference between starting an empty variable and starting directly with the value?
I see things like: $arr = []; $var = ''; $var; $var = null; What’s the difference between starting the variable like this: $var = ''; $var = 'teste'; And start like this: $var= 'teste';…