Posts by Maykel Esser • 598 points
54 posts
-
3
votes1
answer354
viewsQ: Regex in input Pattern is not valid, but the expression is functional
I have a field on a form that can only accept Youtube or Vimeo Urls. Having this, I found the following regex:…
-
2
votes0
answers28
viewsQ: PHP Autoload x Include - Include insecure?
I’m having a problem with a recent work, where I was asked about the security of a site in PHP developed. The same suffered several attacks of brute force this last week, and the responsible for the…
-
1
votes0
answers28
viewsQ: Convert UL list to radial
I’m trying to turn an image infographic into something editable in HTML/JS/CSS. I’d like to bring it as close to the image as possible. I need you to be flexible enough that you don’t need to pass…
-
-2
votes2
answers408
viewsQ: AWS with Route 53 - Domain with WWW does not work and neither does HTTPS
It’s my first experience with AWS and it’s been really complicated. I have no domain for machine assembly, no DNS routing, and what I’ve achieved so far is creating an instance of Beanstalk,…
-
1
votes0
answers363
viewsQ: Add two "alias" columns in a new alias column
I have the following in my consultation: SUM(vopValorTotal + vopTaxaComissao) as vopValorComComissao Both vopValorTotal and vopTaxaCommission are previously created alias columns. Both are not null.…
mysqlasked Maykel Esser 598 -
0
votes3
answers69
viewsQ: Mysql - Query using Between to know if item is reserved on date/time
I would like to know if the item is booked on an X date in my BD. For example: I have the following bank: I want to book the item with Resid = 5 on the date of 02/26/2019 from 14h30 to 16h30. But…
mysqlasked Maykel Esser 598 -
1
votes0
answers27
viewsQ: MYSQL - Query to bring the best-selling plans and courses, with different groupby
I sell subscriptions to my course online, and also the courses separately. I’d like to bring the top 5 best selling plans/courses. For this, I have a table called subscriptionPlan, who guards the id…
mysqlasked Maykel Esser 598 -
1
votes0
answers92
viewsQ: How to validate this regex? AA-000
I’m building a regular expression to validate plane registrations. They are always in this sequential format: 2 capital letters A to Z Hyphen 3 numbers Totaling 6 characters. I did the following…
-
-2
votes1
answer44
viewsQ: How to access the values of a private object in PHP?
I have the following variable: var_dump($bankAccount); Printing: Object(Pagarme Sdk Bankaccount Bankaccount)#35 (11) { ["id":"Pagarme Sdk Bankaccount Bankaccount":private]=> int(17929453)…
phpasked Maykel Esser 598 -
1
votes1
answer361
viewsQ: Return JSON Infos in MYSQL in SELECT itself
I have a table in BD called "menu", with a column called STRUCTURE. It was text-like, and in it contains a JSON with a menu structure referenced by Ids from another table "category". Ex: [{"id": 1},…
-
1
votes0
answers25
viewsQ: Optimize query by reducing Queries (+ 1 alias per subquery, is it possible?)
I would like to reduce the number of queries in my query. As the data are distributed in different tables, I collect the necessary information through comparisons with their Ids. Today my…
mysqlasked Maykel Esser 598 -
2
votes2
answers379
viewsA: Select2 in multiple fields with the same name
I had a similar problem a long time ago. At the time, I gave up searching, but I believe that with the "on" feature of jQuery you can restart Select2 for dynamically added Elements. Try adding…
-
0
votes1
answer81
viewsQ: Grab subquery ID field that only draws Mysql name
Good afternoon! I have an SQL query and would like to get 2 additional fields from other tables, but with other names so that they are not ambiguous. See the last two Queries to rescue 2 fields like…
mysqlasked Maykel Esser 598 -
1
votes1
answer26
viewsA: Responsiveness in Wordpress - Developer
Friend, you can check to see if any common use framework for responsive CSS/HTML has been used. Search your code for references to Bootstrap or Foundation. They are the most common on the market.…
-
1
votes1
answer308
viewsQ: Wordpress - Custom Post Type and New Taxonomy - Display records from selected category only
I created a custom post type called "downloads" and created categories for these using register_taxonomy() called downloads-Category. In WP-Admin, I managed to register all my files and separate…
-
0
votes1
answer50
viewsQ: Make Wordpress direct an access to a PHP file in the theme
I have the following need: I have some pages called "Diagnostics" on my site in Wordpress. However, the standard features of WP do not allow to do what I wish. I need to do some calculations on…
-
0
votes1
answer74
viewsQ: IF record = X, LEFT JOIN in table 1, IF record = Y, LEFT JOIN in table 2
I have a table called "system_signature" containing these fields: - Tipousuario - usuId This user must save a user’s ID, of course. But this user can have 2 types (Student and Client). The data of…
mysqlasked Maykel Esser 598 -
1
votes0
answers39
viewsQ: Send email and record record automatically in BD (called)
I have the following need. I am creating a system of calls to a client in PHP, and everything will be registered in the Mysql database and for each response, an email will be sent (via Phpmailer,…
-
0
votes0
answers23
viewsQ: Doubt in logic for table of comparisons between plans - It is giving Timeout
I have the following table on my website, and today, it is static (not upgradable by Cmss). It has more lines than this image, but I only took a piece to illustrate. Today, in my database, I have…
-
1
votes1
answer159
viewsA: How to generate a PDF from a registration folder and then attach the generated file and send it by email?
After the form post, mount an HTML "body" even (you don’t need to display it. Save it in a variable), and make the PDF lib of your choice convert into a valid PDF. Personally use the mPDF for this…
-
0
votes1
answer48
viewsQ: Add items to the array without creating a new level
I have the following routine that generates an array for me: $tipo = "V"; if($tipo == "V"){ $addonTypeSuccess = ["size" => 10, "option" => 'classic', "type" => "volume"]; }…
-
0
votes0
answers190
viewsQ: Look for numbers in the multidimensional array (multiple layers)
I would like to search for a certain number in this array ($arrayJobsAtivos): Array ( [0] => Array ( [seg] => Array ( [manha] => 1 [tarde] => 1 ) [ter] => Array ( [manha] => 1…
-
1
votes2
answers1301
viewsQ: Sum 2 arrays with equal indices
I have an array in a $_SESSION['Carrinho']: Array ( [0] => Array ( [Produto] => ENH1264-1 [Quantidade] => 2 ) [1] => Array ( [Produto] => ENH1264-2 [Quantidade] => 3 ) [2] =>…
phpasked Maykel Esser 598 -
1
votes1
answer53
viewsQ: Blank array - only removing half of them
I have the following array: Array ( [0] => Array ( [Produto] => ENH1264-1 [Quantidade] => 1 ) [1] => Array ( [Produto] => ENH1264-3 [Quantidade] => 2 ) [2] => Array ( [Produto]…
-
1
votes1
answer104
viewsQ: Condition in Mysql - CASE X = Y THEN Where - Is it possible?
I need to fetch the products from my site. In it, there are two types: Physical and digital. I would like if the products were physical, to show only those above 0 in stock. If it is digital, there…
mysqlasked Maykel Esser 598 -
0
votes1
answer1565
viewsQ: Blank iframe
I need an Iframe on my site. My site has HTTPS protocol, and the source of Iframe also. So why doesn’t my site display it? Both sites have certificate. <!DOCTYPE html> <html class="no-js"…
-
1
votes1
answer46
viewsQ: "numberFormat" is not a Function, but she is
Sirs, The situation is as follows. I got a function to format numbers for financial formats. When applying, it says it is not a function. But it is. How to proceed? <script> // * Função para…
javascriptasked Maykel Esser 598 -
0
votes2
answers300
viewsA: How to check if there is a post in a certain category
Try to check if post_count is greater than 0. If yes, success. If not, no post. More info: https://codex.wordpress.org/Function_Reference/wp_count_posts…
-
1
votes1
answer197
viewsQ: jQuery Slider - Jump between defined values and Sync with other 2 sliders
I have the following need. I have to make a solution similar to Locaweb where I move 3 sliders at the same time. And they must have the Steps defined according to the values of the plan. Example:…
-
2
votes1
answer248
viewsQ: Error including Composer (Class not found)
I’m getting the following error: Fatal error: Class 'wkhtmltopdf Pdf' not found in /Applications/XAMPP/xamppfiles/htdocs/common/class/Prepagoconsulta.php on line 480 Excerpt from the code: use…
-
1
votes1
answer1382
viewsQ: Uncaught Typeerror: Cannot read Property 'validaDocument' of Undefined
I am trying to create a validation function within Validationengine, however I am getting this error: Uncaught Typeerror: Cannot read Property 'validaDocument' of Undefined And I can’t identify what…
javascriptasked Maykel Esser 598 -
1
votes1
answer671
viewsA: Freight calculation Post Office + PHP
I calculate separately the freight for each product. As if I would have a package for each. Then we add all the results. As the freight of the post office is based by volume and weight, there is no…
-
1
votes1
answer80
viewsQ: Search file via file_exists with partial name
I need to verify the existence of a file in two domains. However, the file format that is saved in the database does not match the one saved on the server, due to a lag of a few seconds (the file…
-
1
votes1
answer573
viewsQ: Find element to remove via jQuery
I have a routine in JS which is as follows: $('body').on('click', 'a.remover', function(e) { e.preventDefault(); $(this).closest('.info').html("<p>Escolha ao…
-
3
votes3
answers1355
viewsA: Simple sum returning Nan
var sum1 = $('input[name=hdValor01]').val(); var sum2 = $('input[name=hdValor02]').val(); var sum3 = $('input[name=hdValor03]').val(); var somaProd = (Number(sum1) + Number(sum2) + Number(sum3));…
javascriptanswered Maykel Esser 598 -
4
votes3
answers1355
viewsQ: Simple sum returning Nan
I’m trying to make a simple sum in a routine: var sum1 = $('input[name=hdValor01]').val(); // 40 var sum2 = $('input[name=hdValor02]').val(); // var sum3 = $('input[name=hdValor03]').val(); // 30…
javascriptasked Maykel Esser 598 -
2
votes0
answers23
viewsQ: [i]. val is not a Function
I have the following code snippet: var arrayPost = $("#formPlano13").serializeArray(); var arrayCBDDD = $("#formPlano13 input[name='cbDDD[]']").serializeArray(); var trDDD = ''; // * Geramos um loop…
-
0
votes1
answer430
viewsQ: Pick up content from a div, without picking up child elements with xPath
Good afternoon! I need to get information that is contained in Divs in an HTML. HTML: <div id="fundo_conteudo_noticia_setor" class="textogeral marrom"> <div id="data_noticia_setor"…
-
0
votes2
answers115
viewsA: Logic for consultation in subscription system
SELECT * FROM sistema_cliente c INNER JOIN sistema_assinatura_cliente ac ON ac.cliId = c.cliId WHERE cliAtivo = 'S' AND cliExcluido = 'N' AND cidId IN (SELECT cidId FROM sistema_assinatura_cidade…
mysqlanswered Maykel Esser 598 -
0
votes2
answers115
viewsQ: Logic for consultation in subscription system
Hello, I’m developing a system of online plan subscriptions for one client, and I’ve encountered a number of difficulties. I’ll explain a little bit about how the system works and what difficulties…
mysqlasked Maykel Esser 598 -
2
votes1
answer47
viewsQ: Create arrays according to "exploded" strings
I have the following array: Array ( [0] => 1-6 [1] => 1-7 [2] => 2,9 ) I would like to group it according to their initial number. Example result (I’m not sure of this syntax, but it’s just…
-
0
votes2
answers1484
viewsA: Create a multi-category filter using a <select>
First, put select with options for multiple selection. <select id="filtro" multiple> For the filter, you can use the change() jQuery to know which category was selected, and change the other…
-
0
votes1
answer247
viewsQ: jQuery Slidetoggle - Open/closed detection
I would like to remove the "active" class from "liToggle" in case you closed a Slidetoggle. I tried to use is(':hidden') but unsuccessfully. If I put right after the open parole, it closes at the…
-
2
votes1
answer275
viewsQ: Performance of file_get_contents()
I’m taking the content of an RSS Feed generated by Wordpress, and the same has brought the information with a little delay (according to Google Pagespeed Insights, is having a delay of 1 to 2.5s). I…
-
-1
votes1
answer327
viewsA: Should an image be resized in the browser?
It shouldn’t. But there are cases and cases where you can resize in moderation. You cannot take a 2000x2000 image and adjust it in HTML to 300x200. First, because of the ratio that will be modified.…
-
0
votes2
answers567
viewsA: Undefined index: action when sending ajax data to PHP
The mistake Undefined index of course. The "action" index is not defined. Check that the $_POST['action'] variable was actually passed to ajax.
-
2
votes1
answer133
viewsA: Condition to call mask!
You can use regex with the script xregexp. Then just give a match with the expression \p{L}. If it returns, it is true, and passes in condition. -- Edited Try this: if (!isNaN(str.charAt(0))) // *…
-
0
votes2
answers1488
viewsA: Print without losing css
You must have set styles for printing, where the page layout is removed. Check your CSS if you have anything related to print. <link href=bootstrap/css/bootstrap.min.css rel=stylesheet> Extra…
-
5
votes5
answers1252
viewsA: What are the advantages and disadvantages of using pagination and infinite scroll on websites?
Today scroll is a growing trend. Scrolling the site is no longer a problem like before - people are more used to it. The possibility to leave all posts as the demand is an interesting solution for…
-
1
votes1
answer37
viewsA: Problems when selecting
Its source has the line-height higher than it should be. In case the line-height is not pleasant for you, I believe that only editing the source.