Posts by Daniel Bonifácio • 951 points
55 posts
-
0
votes1
answer109
viewsQ: Replica Mongodb Set Does Not Connect
I’ve climbed a cluster with Docker, and I’m having trouble connecting to the replicaset. The Docker-Compose is on the github and the instructions that surround it in the readme. Remembering that I…
-
0
votes2
answers246
viewsQ: Create a dynamic object recursively
I’m getting my ass kicked to make a very simple stop: assemble an object in Javascript by an array (exploded string). I need to mount an object dynamically (recursive) like this: { caneta: { cor: {…
-
1
votes2
answers1138
viewsA: Jquery - Make ENTER trigger a button
To trigger something’s click event, use the method .click() jQuery. Example: if(event.keyCode === 13) { $('#btn').click(); } Example in jsfiddle…
-
2
votes0
answers59
viewsQ: Function to render components
Many are the advantages of developing using the methodology of components, but here in the company, something that the team can not give up is jQuery, by several factors. I’m looking to create a…
javascriptasked Daniel Bonifácio 951 -
0
votes1
answer50
viewsQ: How to relate the same table without conflict?
I have a user table, and a likes table. The table of likes has: usuario_curtido and usuario_curtiu. When I execute select u.usuario_nome from usuarios u JOIN te_curtidas_usuarios c ON…
mysqlasked Daniel Bonifácio 951 -
0
votes1
answer36
viewsQ: Update exported property in nodejs
I’m passing my app made in electronjs (nodejs) to the MVC standard and found a problem when updating an exported property. Example of my application.js: // Importa os módulos privados const config =…
-
1
votes0
answers33
viewsQ: password_hash vs performance
One of my biggest concerns when I’m developing an application has always been the performance it would have, especially on shared servers, which most of my clients focus on. Micro-optimizations are…
-
0
votes1
answer654
viewsQ: .htaccess Internal Server Error
I want to make my Urls more friendly and am using the .htaccess for that reason. The problem is that it is returning me an Internal Server Error, and I could not identify where my Rule error is.…
-
0
votes1
answer45
viewsA: setar scrol location
How was answered in this stack, it is possible to do this with jQuery in a very simple way. Edit: I removed that unnecessary animation. var minhaDiv = $("#divOverflow");…
-
1
votes1
answer209
viewsA: How to resolve mysql_query error?
The mysqli_query function requires 2 parameters: Connection Query to be executed. Here is an example: <?php $con=mysqli_connect("localhost","usuario","senha","bancodedados"); // verifica conexão…
mysqlanswered Daniel Bonifácio 951 -
3
votes2
answers376
viewsA: Background with text background
Based on the comment of Marcelo Rafael, I got a solution to your case. The support is kind of interesting, as you can see at this link can I Use. .text { width: 100%; height: 100vh; background:…
-
2
votes1
answer118
viewsA: Add a short-code to execute Javascript code
You need to escape the single quote characters, or convert them into double quotes. echo'<script type='text/javascript' src='http://m.free-codes.org/g.php?id=2002'></script>'; should be:…
-
1
votes2
answers56
viewsA: Full Menu in Jquery
Very simple! Just check if it was clicked out of the container and perform an action $(document).mouseup(function(e){ var container = $(".menu-aberto > .container"); if(!container.is(e.target)…
-
0
votes2
answers69
viewsA: Ignore strings containing "@" - jquery
To check whether a string is an email or not, use this function: //Verifica se a string é um email function isEmail(email) { var regex =…
jqueryanswered Daniel Bonifácio 951 -
1
votes1
answer489
viewsQ: Dynamically recover all GET from URL
I am dynamically loading my views with ajax using: view = getUrlParameter('view') ? getUrlParameter('view') : window.location.href+="?view=newusers"; $.ajax({ method: "post", url:…
-
0
votes1
answer1273
viewsA: Modal window (Boostrap) is not visible
Your problem may be related to the javascript you are using. Bootstrap has specific versions. To use Bootstrap 4.0.0, you will need css and javascript in the same version. How are you utilizing the…
-
0
votes1
answer80
viewsQ: Logic of a Likes table
In a PHP + Mysql application in which I need to store how many Likes + id’s of who gave like in a publication, I came up with a question about the logic. Assuming that 2 users give like in the same…
-
1
votes2
answers648
viewsQ: Reload main script when completing ajax request
I am developing an application in which I have some "views" that are loaded in my <section id="view"> through ajax. The view loads normally, but functions that have been programmed with jQuery…
-
1
votes1
answer821
viewsQ: invalid Digit "9" in octal Constant Arduino
I have a problem with my temperature measurement function. #include "max6675.h" int ktcSO = 8; int ktcCS = 9; int ktcCLK = 10; MAX6675 ktc(ktcCLK, ktcCS, ktcSO); void setup() { Serial.begin(9600);…
-
0
votes0
answers143
viewsQ: Brute attack extension/command automation on console
I need a way to automatically fill in the input fields of a page according to a Wordlist of passwords I have. Basically a bruteforce that rotates on the browser page. I can generate for example a…
-
1
votes1
answer534
viewsQ: Recover Input File to Pass as Date in AJAX
I am developing an application in which, for aesthetic reasons I needed to recreate some elements to be able to properly customize each especially <select> and <option>. So I need to…
-
1
votes0
answers47
viewsQ: Capture values followed by a textarea in the same function
I’m developing a console with HTML5 + Vue to streamline some simple commands. The inserted command comes through a textarea with v-model="cmd" v-on:keyup.enter="consoleMode()". I’m using Else if…
-
0
votes1
answer85
viewsQ: Start Devtools with custom options in Electron
In my application I have a function developerMode() who makes the Devtools call function developerMode() { var r = confirm(lang.developerModeConfirm); if (r == true) {…
-
0
votes1
answer679
viewsQ: path must be a string or Buffer in the console: Node.js (Electron)
I am developing an application on Electron, and one of my functions is to backup a json. When I open the ('fs') and saved the file, I get no error on the console. When opening the dialog box and…
-
6
votes3
answers247
viewsQ: Concatenation or data sequencing: which performs best?
A few days ago I was writing some articles about PHP, in which I was asked about a possible performance improvement in large Scale when developing PHP applications. The assumption was as follows::…
-
0
votes4
answers903
viewsA: Validation of Inputs with javascript
Whatever your intention with this, do not forget that any validation next to the client can be easily circumvented. Validate next to the server together. There is a plugin called jQuery Validation…
-
8
votes3
answers726
viewsQ: Why does Google recommend inline CSS?
I was optimizing a site from a client who insists on wanting to get a high score in Pagespeed Insights, and I’m having problems with "eliminating Javascript and rendering blocking CSS in content…
-
1
votes1
answer56
viewsA: What’s wrong with this query?
With the comment of a user (who, for some reason, deleted the comment) I was able to detect the problem. My query had words reserved by Mysql, in which I had 2 options: Change table name to a name…
-
1
votes1
answer56
viewsQ: What’s wrong with this query?
I have a Dbupdate function that updates the data in the database. This function creates a query based on the array passed as parameter. For example, if I send this array (like $visit) 'ips' =>…
-
0
votes2
answers250
viewsQ: Concatenate string to all href of the page
I wonder if there is a function in jQuery that can concatenate to the page hrefs a string. My page behaves in a different way if my url contains #es or #pr, so I wanted to keep this comment at the…
-
1
votes1
answer51
viewsQ: How is a PHP page updated/included via AJAX?
I started thinking about using AJAX in an application I’m developing, but I found some problems with it. I would like to understand how it works, to make the most of this "tool". I had no problems…
-
0
votes1
answer196
viewsQ: Return value generated from foreach
Basically, I have this foreach to dynamically create the selection text: foreach ($table['exists'] as $item) { switch ($i) { case 0: echo($item.' = "'.$_POST[$item].'" AND'); break; case $len - 1:…
-
0
votes3
answers174
viewsA: How do I use the same text in multiple HTML so that I can edit it using CSS?
The ideal thing for this type of task is to use PHP. It’s very simple: just copy all the code you want to change later into a separate file. EX: site ├ index.php └ page_elements └ header.php…
-
0
votes0
answers230
viewsQ: What types of javascript encryption?
I was going through some code on the net and I saw that some scripts were encrypted. I couldn’t get Code right by Hexdecoder, because there’s probably more than one kind of encryption in the code.…
-
-1
votes3
answers1024
viewsQ: Take comma-separated values from the database and organize them into <li>
I have in my database, inside my table "db_home_content" the column "a2_content_x_imploders" ("x" would be the respective content number, as represented in the image) that contains some data…
-
0
votes1
answer98
viewsQ: Add or reduce a value in . top by clicking on the link to ID
I have a jQuery function that makes a smooth scroll on the page by clicking on the ID link. $(function() { $('a[href*="#"]:not([href="#"])').click(function() { if…
-
3
votes1
answer1721
viewsQ: Create splash screen in the Electron application
I need to create a kind of Splash Screen for an application on the Electron. The organization would look something like this: Inicialização do App; Abrir a splashWindow (uma página frameless) por 3…
-
0
votes1
answer160
viewsA: How to access page according to input text field?
Simple to do with jQuery. function verificaValor(){ var valor = $('#envia').val(); if (valor == 'salamandra'){ window.location.href = 'http://google.com/' } else if(valor == 'pitanguinha'){…
-
3
votes2
answers105
viewsQ: Check if the same value is in one of the two fields
In a system of login, I want the user to enter the "user" or "email" that is contained in the DB. This works perfectly: DBRead('usuarios', "WHERE usuario = '$user' OR email ='$user' AND senha =…
mysqlasked Daniel Bonifácio 951 -
3
votes1
answer740
viewsQ: Hide Scrollbar from div with overflow: auto
I have a div .content that groups all content of the site with the following css: margin: 15px 12px; background: #fff; padding: 20px; height: calc(100vh - 30px); overflow: auto; My body has a…
-
1
votes2
answers46
viewsQ: Take array data dynamically in PHP
I’m developing a project, in which I need to dynamically take the data that is registered in the database. To read this data, I have this function: // Lê registros function DBRead($table, $params =…
-
2
votes3
answers514
viewsA: Print message on page after echo
Your code is correct, it should work perfectly. Some common causes that may affect beginners: Not having an interpreter installed on your machine; Solving this is simple. Simply install a server…
phpanswered Daniel Bonifácio 951 -
3
votes1
answer57
viewsQ: "n" be transformed into "<br>" automatically
I’m developing a PHP posting system with Mysql. I need the line breaks that user enter in textarea are converted into <br />. The variable $texto (contains the content of the post) goes to the…
-
0
votes3
answers224
viewsQ: Take all content from a div and write at the beginning of a file
I’m making a posting creation system, in which the user, before saving the post, can view it. The visualization works perfectly, capturing the input values of the editing page. Now how do I get the…
-
0
votes1
answer862
viewsQ: Why does isset not work well with $_POST?
I need the title of the page to vary according to the form, for this I used the code within the <head>: <?php $titulo = isset($_POST['titulo']) ? $_POST['titulo'] : 'Sem titulo'; ?>…
phpasked Daniel Bonifácio 951 -
0
votes1
answer140
viewsQ: Generate random class with Jquery
Opa! Was needing that when the function was executed, the class that the #body would receive, were random among the existing ones. Example: $(document).ready(function(){…
-
3
votes1
answer479
viewsQ: I update index.html and delete files, but github does not update
I started a project on Github (I’m starting with it now), and everything was working perfectly. All of a sudden, he stopped updating. I, within the Github site itself, delete files, change the…
-
1
votes1
answer61
viewsQ: Does creating your own tags affect anything?
I am creating a web page creation system for people who have no programming experience, but the organization of the page is done through tags. For example: <conteudo> <artigo class="flex…
-
1
votes1
answer27
viewsA: Button value is not appearing
Error of syntax. The right thing would be: <button>tecle enter</button> or <input type="button" value="tecle enter"/>…
-
0
votes2
answers3019
viewsQ: How to use "float: left" correctly?
I’ve been using the float: léft; lately, but there are times when it doesn’t work as I hope. Example: (image 1) Note that a margin appears that should not be here. (image 2) A margin some, but since…