Posts by Hebert Lima • 987 points
90 posts
-
1
votes1
answer40
viewsQ: Slick plugin hangs when receiving settings
I’m using the Slick plugin to create a simple carousel but the plugin hangs when I insert the settings dynamically, I can’t understand why it’s crashing =S if ($('.fn-slick').length) { var items =…
javascriptasked Hebert Lima 987 -
0
votes2
answers890
viewsQ: Structural database, address table for two different entities
I have these four tables: Clientes | Lojas | Endereço | Contato As much as lojas how much clientes possess address and contact phones, there is only one table for endereços and contatos, to identify…
databaseasked Hebert Lima 987 -
-2
votes1
answer61
viewsQ: Configure Virtual Web Server
How do I set up a subdomain to access the files inside my server over a third-party url? for example, I have a system that is running on: https://sistema.meudominio.com.br/ for each "new customer"…
-
0
votes1
answer33
viewsA: Doubt with Insert and Select
Total expenses of each customer in the month: Select Clientes.nm_cliente, Sum(Transacoes.gasto_cliente) as gastos_mensal from Transacoes inner join Clientes on Transacoes.id_cliente_transacoes =…
mysqlanswered Hebert Lima 987 -
0
votes1
answer130
viewsQ: Eloquent ORM select with belongToMany relation
Usuario Table usuarioid | nome 1 | joão 2 | jose 3 | maria Rede Table redeid | nome 1 | Subway 2 | McDonald's 3 | Burguer King Table Rede_usuario id | redeid | usuarioid 1 | 1 | 2 2 | 2 | 1 2 | 2 |…
-
0
votes1
answer80
viewsA: How to replace COUNT(*) in innoDB
SQL_CALC_FOUND_ROWS() It is an internal function of MySQL which calculates the row record of the query executed, even if you set a value for the limit the function will calculate the total number of…
-
2
votes1
answer149
viewsA: Add javascript variable in CSS class
Javascript: document.getElementsByClassName("bola").style.backgroundColor = corBola; jQuery: $('.bola').css({'background-color': corBola});…
-
0
votes1
answer357
viewsQ: Creating a directory with mkdir php
I wrote a feature on php to upload files by running localhost it works normal creating the correct directory, but on the server it creates wrong, if I step the way: home\banners, it creates a folder…
phpasked Hebert Lima 987 -
1
votes1
answer2908
viewsA: Integrate LTE Admin Template at Angular 6
I also had problems using ready-made themes, was related to the wrong directory, according to your angular.cli the directories were pointing to the wrong place: "node_modules/", that should be:…
-
0
votes1
answer90
viewsA: CNPJ Mask Problem in print in database (solved)
I guess that settles it, String temp = cnpjFornec.getText(); // segundo sua função ele espera apenas os números sem a máscara // então vc precisa remover tudo que não seja número…
-
3
votes1
answer335
viewsA: Group objects by a certain angular key
to do with Array.reduce: let entrada = [ { conta: "teste1", data: "01/01/2018" }, { conta: "teste1", data: "01/03/2018" }, { conta: "teste2", data: "02/02/2019" } ]; let saida =…
-
0
votes1
answer467
viewsQ: Iteration of arrays and objects
I have the following data coming from the api: { "unidades": [{ "row": { "0": { "titulo": "Unidade S\u00e3o Paulo", "url": "unidade-sao-paulo", "descricao": "Lorem ipsum dolor, sit amet consectetur…
-
2
votes2
answers216
viewsA: How to know one HTTP_HOST and redirect to another
With in_array() gets like this: <?php $domains = ['www.site01.com','www.site02.com']; if ( in_array($_SERVER['SERVER_NAME'], $domains ) ) { // pode adicionar respostas no header depender do que…
-
0
votes1
answer36
viewsQ: How to make this function return a Boleano type
I deleted the question Variables and Scope Typescript because as a solution I made the validations I needed within the function of the event itself onload then I think the solution changed the…
typescriptasked Hebert Lima 987 -
3
votes1
answer2140
viewsA: Slim PHP Problem with CORS
After 3 days I managed to fix and configure correctly: in the .htaccess this line is still required to work on Google Chrome, on Mozilla it makes no difference, I believe it ignores: Header set…
-
1
votes2
answers693
viewsA: Find phone numbers inside a txt file
I think it’ll do: using System; using System.IO; using System.Text.RegularExpressions; class Program { static void Main() { Regex regex = new Regex(@"(\([(\d))]{2}\)\s?[(\d)]{4,5}+\-+[(\d)]{4})");…
c#answered Hebert Lima 987 -
1
votes1
answer765
viewsA: Return label chosen when clicking on some column of the chart - Chart.Js
I think the more organized way would be like, add the property onClick in the object options options:{ onClick: minhaFuncao } and create its function: function minhaFuncao(event, array){…
-
1
votes1
answer2140
viewsQ: Slim PHP Problem with CORS
I’m trying to make a request on the server but I’m having trouble configuring the CORS, the api was developed with the Slim Php framework and I am using middleware PSR-7 and PSR-15 CORS middleware ,…
-
0
votes1
answer22
viewsQ: Components and Services
I am developing an application and came across the following problem: I am working with an api that manages a website and have some endpoints like: banners, testimonials, user, images etc, most…
-
2
votes2
answers103
viewsA: Button can only be clicked after 24 hours after click
Instead of using a "time" field like int change to the type datetime and put the value default NOW(): ALTER TABLE checkin CHANGE hora DATETIME default CURRENT_TIMESTAMP this way you do not need to…
-
0
votes1
answer500
viewsA: How to get Angularjs URL parameters
using $stateProvider, would look like this: $stateProvider.state('/viewPage/:param1/:param2', { templateUrl: 'partials/partial1.html', controller: 'MyCtrl' ... }); and its controller:…
angularjsanswered Hebert Lima 987 -
0
votes1
answer31
viewsA: Listen and perform action
Correction of comment, DOMSubtreeModified was depreciated with the new builder MutationObserver() you can start here: var observer = new MutationObserver(callback); take a look at the mozila link…
-
0
votes1
answer19
viewsQ: Eloquent ORM Manytomany error of Constraint 1452
I’m developing an application using the Eloquent ORM, but I’m having trouble with the N to N relation, This is the relationship: The records I’m using as a test in the Product table: The records I…
-
2
votes2
answers54
viewsQ: Change array structure in php
.tabela-grid{ margin: 0; display: table; width: 100%; } .tabela-grid *{ vertical-align: top; text-align: center; } .tabela-grid img{ width: 100%; display: inline-block; } .tabela-columm{ display:…
phpasked Hebert Lima 987 -
0
votes2
answers278
viewsQ: Javascript.push() inserts variable instead of variable value
I’m having trouble with that code: expected exit: detalhes:[{ 01: 4570.00, 02: 4301.68, 03: 650.00, 12: 700.00, }] reality: 0:[{ { mes: 4570.00, }, { mes: 4301.68, }, { mes: 650.00, }, { mes:…
javascriptasked Hebert Lima 987 -
0
votes0
answers76
viewsQ: mysqli_query() always returns true even when it does not change record update
I am running the query in the database: UPDATE store SET status = '0' WHERE id ='325' And always returns true even if the value is not updated, and how much use the function mysqli_num_rows($link)…
phpasked Hebert Lima 987 -
0
votes1
answer1166
viewsQ: Circumvent "object property does not exist" error
I have the following problem, always time to deal with the result of the request http in the subscribe points out errors saying the property x does not exist in result return…
-
0
votes1
answer40
viewsA: Check the input and then click the button
Use the events and attributes. in his input you do so: <input type="checkbox" [checked]="termo" (change)="termo= !termo"> in his componente: // você cria a variável e atribui false termo:…
-
0
votes1
answer62
viewsA: Only get the lang of the clicked class
Working: $('.filealtera').change(function(){ // $(this) indica este elemento (elemento que disparou o evento change) // parent().find('.amostra') diz para procura um elemento filho que // contenha a…
-
5
votes3
answers1950
viewsA: Error when compiling Angular 5 project "is Missing from the Typescript Compilation."
figured out the problem, import { Venda } from '@app/shared/objeto/Venda'; the V capital, looking at the code I have a include of other classe in the same component import { Cliente } from…
-
0
votes1
answer88
viewsA: How to structure multidimensional array with json
for your while gets like this: while ($query=mysqli_fetch_array($res)) { $array_end[] = array( 'rua' => $query['rua'], 'end' => array( 'col' => $query['coluna'], 'comp' => array('alt'…
-
9
votes3
answers1950
viewsQ: Error when compiling Angular 5 project "is Missing from the Typescript Compilation."
when I try to run the angular server to test the project it fails to build with the following error: ERROR in ./src/app/shared/objeto/Venda.ts Module build failed: Error:…
-
-1
votes1
answer147
viewsA: url friendly rewriting
Ogirinal url: http://meusite.com.br/?sourceId=78902565&categoryId=10 Rewritten url: http://meusite.com.br/categoryId/10 Rule: RewriteRule ^categoryId/([^/]*)$…
-
1
votes1
answer178
viewsQ: Convert JSON to Object with different structure
How can I convert this JSON: {"cliente": [{ "cliente_cpf": "43900404640", "cliente_nome": "Luiza", "cliente_sobrenome": "Azevedo Carvalho", "cliente_genero": "Feminino", "cliente_nascimento":…
-
0
votes1
answer182
viewsA: Overlay a video over a background, and add a logo over a menu
That’s it? *{margin:0;padding:0;} .menu{ display:block; width:100%; text-align:center; line-height: 50px; background: #333 url(https://s.imgur.com/images/imgur-logo.svg?1) no-repeat 20px 50%; }…
-
0
votes0
answers30
viewsQ: PDO Insert only runs once
I’m studying PDO to be able to redo the functions of a crud that I use in mysqli, but I have a problem, when I do an Insert with this function the first time it inserts the value in the database,…
-
-2
votes1
answer973
viewsQ: Site does not open on IOS,
Guys I have the following problem, the site https://aramaquinas.com.br/ does not open in safari on ios it opens normally on windows, but on iphone does not open, someone has already gone through it?…
redirectingasked Hebert Lima 987 -
0
votes1
answer70
viewsQ: Invalid argument supplied for foreach() with correct supplications!
Guys I have the following resource in php: array(3) { ["name"]=> string(12) "module teste" ["status"]=> string(1) "1" ["banner_image"]=> array(1) { [1]=> array(1) { [0]=> array(7) {…
-
1
votes2
answers562
viewsQ: method $.find() in pure javascript
How to define the attribute of a child element within another element using javascript pure? in jquery would be: $('.preview').find('img').attr('src','#url'); but how does it get in javascript pure?…
javascriptasked Hebert Lima 987 -
0
votes1
answer54
viewsQ: Failed to call function with Javascript parameter
I have the following function: function show(msg, el){ if(msg.alertType == 0){ resetForm(el); setTimeout(function(){ $('#show-toast').removeClass('toast-show'); $('#show-toast .td.result…
-
0
votes1
answer119
viewsQ: group per SQL query
I have a table post with a field category, each post that is inserted may receive more than one category: post1 categoria1, categoria2 post2 categoria1, categoria3 how can I perform an sql query to…
-
0
votes1
answer193
viewsA: Long Polling request loop in phpt?
I looked for more about long Polling to understand how it works and develop logic: php server. # includes de conexão include ('config.php'); include ('database.php'); include ('conection.php'); #…
-
0
votes1
answer193
viewsQ: Long Polling request loop in phpt?
I need to create a way to notify system users each time a database table receives a new record. I’m using as a basis an example published here Server Push: Long Polling but I’m having some problems,…
-
1
votes1
answer144
viewsA: How to put image in this code?
try this: window.onload = function(){ var renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // camera var…
-
0
votes1
answer138
viewsQ: Menu Hover Jquery
How can I fix that hover to be able to click the link button? I always have problems with submenus, if anyone can help. $(function(){ $('.menu-toltip').hover(function(){…
jqueryasked Hebert Lima 987 -
3
votes2
answers2961
viewsA: How to pass data from one php to another without form?
try this on arquivo2.php: include 'Arquivo1.php'; public function Alguma_Função() { global $msg; } or include 'Arquivo1.php'; private $newmsg = ''; public function setMSG() { global $msg;…
phpanswered Hebert Lima 987 -
0
votes1
answer75
viewsA: BD Access, Data field
To close the question: >= Date()- 3 E <= Date()
-
0
votes1
answer189
viewsA: How to delete objects within a List?
I’ll try to explain how to do (ñ to find the checkbox in this code x-x) if you identify the checkbox by the attribute name="" put it like this name="del[]" and to the…
-
2
votes2
answers544
viewsA: Return id or know name of the dynamic object that was clicked
You can share the event between them +/- like this: private void MeusBotoes(System.Object sender, System.EventArgs e){ Button botao = default(Button); botao = (Button)sender; switch (botao.Name){…
c#answered Hebert Lima 987 -
1
votes1
answer226
viewsA: Download Webview files into custom folder
I guess that’s how it is: change that: request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);for request.setDestinationInExternalPublicDir(path,filename); add: File…
androidanswered Hebert Lima 987