Posts by Bruno Rigolon • 3,282 points
130 posts
- 
		4 votes1 answer76 viewsA: Array Ordering with Value ExchangeWhat is happening is that the "Array(3,3)" command does not create a 9-position array, but rather a two-position array, with the index 0 => 3 and the index 1 => 3. In javascript, when using… 
- 
		2 votes2 answers71 viewsA: 'Delay' in the attribution/existence of properties in the Vue instanceWhat is happening is that you must wait for the change of the DOM, because the value you need is in it. vuejs has the solution for these types of behavior, is the nextTick. This command is used to… 
- 
		2 votes2 answers160 viewsA: Dynamic properties in Vue 2To create dynamic variables, you could do it this way: 1 - Criar uma variáveis que receberá as variáveis dinâmicas 2 - Fazer um loop para exibi-las 3 - Utilizar this.$set e this.$delete para criar e… vue.jsanswered Bruno Rigolon 3,282
- 
		2 votes3 answers3029 viewsA: How to verify if a value exists in a multidimensional array?Another suggestion that I use in my projects. Follow my contribution. <?php $array = array( "user1" => array( "user" => "20", "dados" => array(), ), "user2" => array( "user" =>… phpanswered Bruno Rigolon 3,282
- 
		1 votes1 answer31 viewsA: addClass with Math.roundI made an example of code according to your question with 2 options, clicking a button and passing value and when you put the mouse over the div generates a random code. According to this code is… 
- 
		4 votes1 answer132 viewsA: How does v-if work internally?Vue.js uses the Virtual DOM approach. This method implies first changing in memory, making the diff of what is going to be changed on the screen, and only then changing the DOM. This technique has… 
- 
		0 votes2 answers51 viewsA: Perform multiple functions when the page loadsYou can listen to the event DOMContentLoaded, this is called when the page is loaded. After your listen, execute the codes you need. It would look like this: // Declare suas funções antes... /* ...… javascriptanswered Bruno Rigolon 3,282
- 
		1 votes3 answers2145 viewsA: Vuejs: Is it possible to use a condition to enable a @click?It is possible to mix external code with instances of Vue.js. See the example I did, I created a variable called condicao out of Vue and associated in Vue instance. When you perform this way, the… vue.jsanswered Bruno Rigolon 3,282
- 
		2 votes1 answer1008 viewsA: Access array elements from JSONJust refer to the array item. It would look like this: $objeto_decode['id_operador'] = session_id(); Another example, to access id of a natural person: $objeto_decode['pessoa_fisica']['id'] =… phpanswered Bruno Rigolon 3,282
- 
		2 votes2 answers2135 viewsA: Key code does not hold the ESC keyI recommend to use the function below getCharCode to redeem the event code and then perform the treatment. The reason you have created this function is, in some browsers rescues the value of the… 
- 
		6 votes3 answers1519 viewsA: What is 'final' in PHP?This command serves to prevent the class from being inherited. It must be the final use class. Example, you create a class called pessoa, from it you inherit and create pessoa_fisica and… 
- 
		10 votes2 answers2933 viewsA: What is the difference between global and superglobal variables?The difference is that the super global there is no need to inform global $variavel, you simply access. They are available in all scopes, they are: $GLOBALS $_SERVER $_GET $_POST $_FILES $_COOKIE… 
- 
		1 votes2 answers4025 viewsA: Jquery UI autocomplete JS inputI created an example based on Autocomplete. I modified the script to insert dynamically and set the autocomplete after 2,5 seconds after charging the DOM. The code is commented item by item and easy… 
- 
		3 votes1 answer6638 viewsA: Download using the Xios?Just create the file with the Blog and passing the mime type. Then open a new link passing the URL encodada. You can also use the link created in items of the type a and iframe.… 
- 
		0 votes1 answer148 viewsA: Force container > Row > col to be non-reresponsivel in BootstrapNatively, there isn’t. What I did to have this behavior is: I added width: 9999px and overflow: auto in class .tree. Thus, we are sure that Tree will not be broken because of responsiveness; Then,… 
- 
		-2 votes2 answers3654 viewsA: How to resolve "Function name must be a string" error?$mysqli is as variable. It must be a command, ie without the $ (dollar sign). Only mysqli. 
- 
		1 votes1 answer4781 viewsA: Vue.js with pure PHPYour error is in using the app variable. It does not represent anything in your code. To feed user data, you must use this.users or, if you are in another context, store this, and then use the +… vue.jsanswered Bruno Rigolon 3,282
- 
		0 votes1 answer102 viewsA: Creating super class for PHP form protectionUse the library PDO to carry out the queries and also, to protect your queries. In your case, would be this way: //modo de usar pegando dados vindos do formulário $nome = $_POST["nome"]; $senha =… phpanswered Bruno Rigolon 3,282
- 
		2 votes3 answers4202 viewsA: Countdown PHP + JavascriptI got this code on this reply in the English OS. As it is not possible to interpret php in the snippet below, I put the fixed value of 180 seconds (3 minutes). /* Código exposto em uma página php */… 
- 
		2 votes1 answer605 viewsA: Maximum body size of a POST requestThe answer is simple, it exists. Using the command phpinfo you can obtain this information. The relevant fields of phpinfo about sending data, would be these below: According to the PHP… 
- 
		1 votes3 answers19220 viewsA: How to add a pure Javascript class?Below is an example of how to insert class in javascript and remove: function addClass(id, classe) { var elemento = document.getElementById(id); var classes = elemento.className.split(' '); var… javascriptanswered Bruno Rigolon 3,282
- 
		0 votes1 answer51 viewsA: Randomize Ivivs jQueryUsing the lib lodash, simply do the dynamic Sort with the command shuffle. See below how it would look: var dfl1 = $('<div class="col-xs-6 thumb">teste 1</div>'); var dfl2 = $('<div… 
- 
		2 votes4 answers211 viewsA: Like a tag on a table element with jQuery?Below is code commented with each step to mark the lowest value with the mark. $(function() { function markMinValue() { var pricesTd = $('td', 'table #qtdPrecos #precos'), pricesValue = [],… 
- 
		2 votes2 answers60 viewsA: Replicate DIV, alter content?I believe this is what you need. See if you are correct, in case you are, I will comment on the items to get a better understanding. new Vue({ el: "#app", data: { separaTextoEmNCaracteres: 200,… 
- 
		0 votes2 answers128 viewsA: Laravel directing HTTP method to wrong function in ControllerIt turns out that when working with Vueresource, in some projects you need to tell it to emulate a normal request like HTTP. To perform this configuration, add the Configs parameter to Vueresource,… 
- 
		0 votes1 answer462 viewsA: Bootstrap Collapse on small "Sm" devicesThe solution to this problem has already been answered in Stackoverflow in English. Here is an excerpt from the CSS in English: Link @media(max-width:768px) { .navbar-header { float: none; }… 
- 
		0 votes2 answers1756 viewsA: Receive txt and generate image from textFirst, we need to treat binary, by default, jQuery doesn’t treat answers as binary, so I found this website the addition of this feature. See the $.ajaxTransport block. After obtaining this feature,… 
- 
		1 votes1 answer1241 viewsA: How to upload images with TinymceAccording to the documentation, would be as follows: // Exemplo básico tinymce.init({ selector: 'textarea', images_upload_url: 'arquivoQueRecebeAsImagens.php', images_upload_base_path:… 
- 
		2 votes2 answers229 viewsA: JS and HTML DIV - TAB KEYFollow an example of this behavior. I used the boostrap modal to demonstrate and listen to the event when a key is pressed and when it is released. The keycode 9 represents the TAB, so we are… 
- 
		2 votes2 answers859 viewsA: Chart.JS does not appear in the modal bootstrap!In my view, it seems that when setting the value Data is occurring error. I created a functional example from the documentation. Look how it turned out: $(function() {… modalanswered Bruno Rigolon 3,282
- 
		2 votes3 answers756 viewsA: Transform a Json Array into another JSON using NodeUsing pure javascript, it was as follows: var retorno = [{ "numDoc": "0000001", "OutrosCampos": "outrosDados", "itens": [{ "itemNum": "000000001", "nome": "AAAAAAAAA", "agrup": "00003", "numDoc":… 
- 
		0 votes2 answers72 viewsA: What’s wrong with this PHP code?There are 2 errors in this code, and there is a echo in the string, elseif tag closure is also missing. After $sum) has the opening {, but the closing --> } is missing. The correct code would be:… 
- 
		3 votes4 answers299 viewsA: What does the "do" function do in Javascript?The function do must precede the while. It serves to have the code executed once at least if the while condition is false. I have set examples to demonstrate the use of do. Documentation link… 
- 
		1 votes1 answer51 viewsA: Form "From" field appears as server account nameThe field FROM should be in English, the header of your email is going as "De" (in Portuguese). Change this line: $headers = "De: ".$_POST["contact_email"]."\n"; For this: $headers = "From:… 
- 
		1 votes3 answers1120 viewsA: Enable Submit button if CPF is validI fixed your code so it works the right way. function ValidarCPF(strCPF) { var Soma; var Resto; strCPF = strCPF.replace(/\D/g, ''); // Permite apenas números Soma = 0; if (strCPF == "00000000000")… 
- 
		1 votes3 answers1468 viewsA: First and last character occurrenceUse the exec command of the regular expression. It would look like this: var regex = /\[(.*)\]/g; var string = '<HR>\n[{"key":"value","key2":["¥"]}]\n<HR>'; var finds =… 
- 
		2 votes1 answer1987 viewsA: Change information according to selectI made an example with item you proposed. Sets a variable called precos, it is an object that the index would be the plan code and its default monthly value, no discount; I created a listening event… 
- 
		3 votes1 answer389 viewsA: How to find the JVM port in linux?Execute the command netstat -tlnp, see the result: We have the protocol, such as TCP/UPD, the listening IP and the port. At the end we have the PID and also which program is running.… 
- 
		4 votes1 answer34 viewsA: How to add another zero in hours for example: 4:4:03 becomes 04:04:03?To convert, just use the command date with the command strtotime. Date prints the formatted output, strtotime converts the string into a timestamp that is leveraged by date. According to the PHP… 
- 
		2 votes2 answers235 viewsA: Fault/Doubt event change jqueryWhat happens is that when the modal is closed, the checkbox Systems are removed. One way around this is to listen to the modal event when it is opened and only then instantiate the listening of the… 
- 
		1 votes2 answers17718 viewsA: What to use in Ajax, Success or done?According to the documentation of jQuery, follows below the status jqXHR.done(Function( data, textStatus, jqXHR ){}); An alternative to the return option of Success. jqXHR.fail(Function( jqXHR,… 
- 
		4 votes3 answers220 viewsA: What is the { } in the code below? and what is the definition for?This serves to dynamically access the object. Let’s assume that the $type has the following content: $tipo = 'Residencial'; // Forma correta dinâmica $objeto->{'getEndereco' .… phpanswered Bruno Rigolon 3,282
- 
		1 votes2 answers1582 viewsA: I need to connect to an SSH FTP server in PHPWell, I believe you’re using the SFTP: SFTP, meaning SSH File Transfer Protocol, or Secure File Transfer Protocol, is a separate, bundled SSH protocol that works similarly over a secure connection.… 
- 
		2 votes2 answers51 viewsA: Is there a tool for viewing a website in all screen sizes?You can access the site Quirktools and select the various sizes and devices if you are not familiar with the features of the browser itself.… responsive-layoutanswered Bruno Rigolon 3,282
- 
		3 votes2 answers195 viewsA: How to make menu with different drawing?Following example could get this result: .menu { margin: 0; padding: 0; list-style: none; display: block; width: 100%; } .menu li { display: inline-block; padding: 15px; position: relative;… 
- 
		1 votes3 answers871 viewsA: Validation of completed fields of a formHello, follow the steps and adapt to your code to achieve the effect you want. Create a private function to validate the form private function form_cliente_insert() {… 
- 
		0 votes1 answer39 viewsA: How to pass value from service to var?You are using the scope this within the Omise, this makes it not using the scope of Vue and soon, your variable will not receive the value. Create an access point to the Vue scope with the name of… 
- 
		1 votes5 answers5036 viewsA: Join two Jsons into a single objectWith jQuery, just use the $.extend. It would look like this: $(function() { foo = { "razao_social": "INTELIDER", "nome_fantasia": "INTELIDER LTDA", "rg_insc_estadual": "123456" }; bar = { "usuario":… 
- 
		1 votes1 answer518 viewsA: Datatables bringing all data at onceChange the variable serverSide: true for false. When you say the serverSide is false, your web service must deliver pagination data. This would be a valid return taken from the Datatable… 
- 
		0 votes4 answers11999 viewsA: Take the lowest value and the highest value of an array with Javascript?I advise you to use the library Lodash. The lib is extremely small and has several other very useful features. It would just be this code below: var arr = ["885.9", "984.9", "444.9", "528.9",…