Posts by Darlei Fernando Zillmer • 3,867 points
153 posts
-
0
votes2
answers57
viewsQ: Check if a variable is of the function type
Let’s say I have some variable, defined as: var xpto = function() {/* Faz alguma coisa */}; I need to compare if the type of the variable is a function, ie: function isFunction(f) {if (f is…
javascriptasked Darlei Fernando Zillmer 3,867 -
13
votes3
answers1299
viewsA: Define whether the letter is vowel or consonant
You can also use the test() method, which executes a search for a match between a regular expression and a string and returns true or false. function isVogal(char) { return…
-
6
votes5
answers3663
viewsA: How to scan an array and insert the elements into HTML with JS
There are other different ways to create DOM elements, approaching your example can create as follows: function gerar(){ let nomes = ["Diego", "Gabriel", "Lucas"]; let lista =…
-
1
votes2
answers4867
viewsA: Loop in pl/sql oracle
You can create cursors in two ways: Explicit cursor: DECLARE -- CURSOR cr_produto(pr_categoria IN produtos.id_categoria%TYPE) IS SELECT produto, preco FROM produtos WHERE (id_categoria =…
-
1
votes2
answers4076
viewsA: Simple example of how to generate an XML file on Oracle
There are some ways to generate a XML in the PL-SQL. But in the case of XSD, I imagine you should do a validation of Schema. So I’m going to divide the answer into two parts, first into generation…
-
1
votes1
answer34
viewsA: How do I hide the page scroll bar in css?
This solution theoretically covers all modern browsers: html { scrollbar-width: none; /* ParaFirefox */ -ms-overflow-style: none; /* Para Internet Explorer e Edge */ } html::-webkit-scrollbar {…
-
3
votes3
answers608
viewsA: Custom Filtering - Range Search - Datatables
You can use the same concept of parseInt that already uses for age, but with different format, in the following example, the date of the datepicker will be formatted for a pattern yyyymmdd (note the…
-
2
votes1
answer217
viewsA: What is the DIANA?
PL/SQL is based on the Ada programming language. PL/SQL uses a variant of the Intermediate Descriptive Assigned Notation for Ada (DIANA), a tree-structured intermediate language. It is defined using…
-
1
votes2
answers1343
viewsA: How to calculate runtime in PHP
Microsecond (Ms) is a multiple of the second, a unit of time, prefixed by the micro (µ) multiplier base patterns, equal to 0.000001 seconds(1 microsecond = 1.0E-6 seconds). So, to get the time in…
-
3
votes1
answer194
viewsA: Save MP4 video without audio - Ffmpeg-PHP
You remove audio using the flag -an. ffmpeg -i example.mkv -c copy -an example-nosound.mkv Use the code below to remove audio with Simplefilter. $customFilter = '-an'; \FFMpeg::fromDisk($disk)…
-
2
votes5
answers964
viewsA: How to progress steps using thread chart?
There are several javascript libraries that can help you in this situation, I’ll leave two examples, one with a javascript library and the other with css only. Follow: Percircle With it you can…
-
5
votes3
answers292
viewsA: Set title with echo in PHP
First you need to understand... What is the difference between a PHP web page and HTML? PHP files are similar to HTML files, but may include HTML and PHP code. The PHP code is parsed (or executed)…
-
7
votes1
answer260
viewsA: What is Data Science?
What is Data Science? Data science combines the application of subjects such as computer science, software engineering, mathematics, statistics, programming, economics and business management. It is…
-
2
votes4
answers1262
viewsA: Take array value
Well, it seems that you have a multidimensional array where the indexes of one relate to the content of the other, so you can start organizing it (ideally it would be already organized where you…
phpanswered Darlei Fernando Zillmer 3,867 -
1
votes1
answer924
viewsA: PL/SQL - Record Type vs Rowtype
Basically ROWTYPE is associated with a physical table, while RECORD TYPE is associated with an object. %ROWTYPE should be used whenever the query returns an entire row from a table or view. TYPE rec…
-
4
votes1
answer1544
viewsQ: Multi-threading in PHP applications
There is some Pattern design to perform the execution of multiple processes and the collection of results in it? Scenario: I have a large volume of data (> 200000 entries), have to perform…
-
1
votes1
answer73
viewsA: Error index, help me please
First you need to understand what a Notice is and then know what to do to avoid them. Usually it indicates that a variable, array, constant cannot be accessed. But implicitly if it is there it is…
-
2
votes2
answers189
viewsA: Get the sum of last week’s records
The right answer may vary according to the type of data your created_at contains, if it is dateTime or date use the UNIX_TIMESTAMP will not return the expected result when using it, unless you use…
-
2
votes1
answer51
viewsA: Index Fulltext is not filtering in select Where
How Fulltext Index Search Works For each record, Mysql assigns a relevance value, which represents the similarity of the search string to the line in question. A 0 (zero) value means no similarity,…
-
2
votes1
answer883
viewsA: Special Characters - SQL
The following query will bring up the entire line containing any special character. Select * from tabela Where Coluna LIKE '%[^A-Za-z0-9, ]%' You can also try a Where with all the characters, it is…
-
2
votes2
answers1754
viewsA: Error Class 'app Course' not found
You need to change two things. No Model use: namespace App; And in Controller: use App\Curso;
-
3
votes2
answers1074
viewsA: Generate random time within a range
You can generate a random date and time using the function Rand() or mt_rand() by setting the minimum and maximum (strtotime of min and max dates). //DEFINE HORARIO DE BRASILIA…
-
0
votes2
answers112
viewsA: How to update number of users online with PHP + jQuery
You can try something like: <div id="output"></div> <script> $(document).ready(function() { setInterval(function() $.ajax({ url:'processar_visitas.php', type: "post", complete:…
-
1
votes2
answers141
viewsA: Error Methodnotallowedhttpexception in Routecollection.php line 218
The method PUT works only when your form method is POST and then you add the input field _method with the value PUT. <form method="post"> <input type="hidden" name="_method" value="PUT">…
-
2
votes2
answers905
viewsA: Problem creating a Foreign key
You are creating a Constraint with a column that does not exist, you need to create the field in the table tbl_proprietarios to refer to Foreign Key. create table tbl_proprietarios ( ID_proprietario…
-
1
votes1
answer69
viewsA: Is it possible to optimize my code for a single query?
Test the following: At the end the two arrays will be with the values in the format you need. <?php include 'config.php'; $query = "SELECT data, material FROM lista GROUP BY data, material ORDER…
-
1
votes2
answers103
viewsA: "Error" upon completion of CSV import
Try this way, I made some changes to the source, but the logic follows the same, I commented the critical points. <?php function chamaApi($ip){ // Inicializa uma nova sessão e retorna um…
-
1
votes1
answer70
viewsA: INSERT php function in mysql database(checkbox)
First that is missing the name in your Name and Business inputs, you should fix this. Then you can create a simple inserts and execution of querys: $nome = $_POST['nome']; $empresa =…
-
0
votes1
answer134
viewsA: How to find the size of a file by plsql?
It seems that the function is correct, the problem may be related to the path of the file directories, it follows the function I use to return the size in bytes. SELECT…
-
1
votes1
answer27
viewsA: Procedure in oracle
I didn’t create the tables to test, maybe I need some adjustments, but I believe this will serve as a good basis to improve the procedure: --CHAMADA BEGIN DECLARE v_maximo number; v_total number;…
-
7
votes1
answer585
viewsA: Join two arrays in one with PHP
Use the array_merge, the array_push treats array as a stack, and adds past variables as arguments at the end of it, so you end up with this structure: array(3) { ["fruta1"]=> string(7) "laranja"…
-
0
votes1
answer34
viewsA: Combobox already selected with database value
You can solve this by checking the value registered by the user and comparing it with the values that will be placed in the options, setting as Selected (option marked by default) the sex of the…
-
2
votes2
answers38
viewsA: Touchscreen Keyboard - Limit the number of characters entered in javascript
You can check whether the field already contains the character limit defined at each iteration. function addNumber(e){ var v = $( "#PINbox" ).val(); if( v.length < 5 ) $( "#PINbox" ).val( v +…
javascriptanswered Darlei Fernando Zillmer 3,867 -
3
votes1
answer317
viewsA: Select multiple options in select
Try adding the attribute multiple in his select. The attribute multiple is a boolean attribute that when present, specifies that several options can be selected at once. <div> <label…
-
1
votes2
answers939
viewsA: Javascript - Open new tab and close current
Note that quotes are missing from your open and its opening tag of script already starts wrong. echo "<script>window.open('https://google.com', '_blank');</script>"; echo…
-
2
votes1
answer64
viewsA: Error in API POST when inserting object
This error is not in the API itself (let’s say), it happened in Oracle because you tried to run an operation between two different data types, but the data types are not compatible. Fix the…
-
1
votes2
answers126
viewsA: Force to fill checkbox whenever you register a task
Try it this way: function inserir_registo18() { var dadosajax = { 'tarefa': $("#tarefa18").val(), 'Notas': $("#Notas11").val(), 'Notas': $("#Notas12").val(), 'Observacao': $("#Observacao18").val()…
-
2
votes1
answer52
viewsA: Show DIV when I click the Button via Jquery
It really won’t work because the element was created after the DOM was rendered. But you can get around it like this: $(document).on('click', '.button', function(){ $(".div").css("display","flex");…
-
4
votes2
answers44
viewsA: Have more than one line in the same query
You can also use the operator IN which is an abbreviation of several conditions OR where you can specify several values in a clause WHERE. SELECT * FROM `app_product` WHERE app_category = 6 AND…
-
1
votes2
answers92
viewsA: Div hidden/visible does not disappear when you click the search button
First you will need to identify the click on each button to prevent the submission of the form, with this you "intercept" this action and can handle it in the way you think necessary. Below follows…
-
1
votes1
answer260
viewsA: High charts in php and mysql
The error is in the second parameter of array_column, you need to define a column of values to be returned, which in the case exists in the array return of the query. How do you do: ...…
-
0
votes1
answer245
viewsA: Compare Response with variable
If your return is as expected, it is very likely that the problem is in the data type returned/compared in the condition. In the JavaScript, since the types of variables are not always taken into…
-
0
votes3
answers113
viewsA: Call date by javascript
Try as follows with JavaScript pure. Remember, however, that if you use jQuery can facilitate in the aesthetic issue of your code, other libraries handling and translation of dates too, it is always…
-
0
votes1
answer53
viewsA: Laravel error when creating serves
Note that your server is created and functional, the error is already part of your project. Note that according to the Laravel documentation, prerequisites are required on the server for everything…
-
1
votes3
answers178
viewsA: While php creating div
You can create a function that simplifies this process and in a way create a "microframework" to work with. Create a standard template for divs, example: <div class='row border'> <div…
-
0
votes2
answers36
viewsA: I am tempted to send a formlario without the ultimalization of the Ubmit input
You can create an event with javascript (jQuery) with a trigger in the field you want, as long as you can identify it in some way. Example: <form method="POST" action="#" id="formulario">…
-
1
votes4
answers839
viewsA: Retrieve data from the logged-in user to use as the sender of the email in Laravel
First remembering that you need to "include the features" of Auth at the beginning of Controller (I imagine you’re sending it through a). namespace App\Http\Controllers; use Illuminate\Http\Request;…
-
0
votes3
answers1858
viewsA: HTML does not recognize jQuery (imported or internal)
Try this way, basically you are calling the file with the functions before adding the library. <!DOCTYPE html> <html> <head> <title>Semana da Engenharia</title>…
jqueryanswered Darlei Fernando Zillmer 3,867 -
1
votes2
answers269
viewsA: Operator "or" of Blade Laravel does not work
The basic correct use is: {{ $confirmed or 'false' }} In case you’re trying to put the false as an element, not a string or variável.…
-
0
votes1
answer158
viewsA: I cannot align <thead> with <tbody> in my table with SQL query
Are some small errors of formatting and opening order and closing of tags... Try the following: <?php echo ' <div style="height:65px"> </div> <table id="oie" border="1"…