Posts by Jean Freitas • 346 points
30 posts
-
0
votes1
answer111
viewsQ: How to create an "Event Scheduler" in Mysql whose range value comes from the database itself?
I am using the following code to generate a Task or Event Schedule in Mysql every 10 seconds: delimiter | CREATE EVENT gera_financeiro_contrato ON SCHEDULE EVERY 10 SECOND STARTS CURRENT_TIMESTAMP…
-
-1
votes2
answers354
viewsQ: Error mimetype application/octet-stream in jpeg image with Laravel
When trying to upload an image with Laravel I notice a different code behavior depending on the size of the image preventing the upload of the file as demonstrated in the image below that I get with…
-
0
votes1
answer32
viewsA: How to recover a data with Select2 in the registry edition?
There are two points to be observed: 1) In Editing the attribution with comparison using old() has to be verified via javascript using $(elemento).val(); 2) If the above condition is working, after…
-
0
votes0
answers39
viewsQ: How to use html elements within a table with Datatable
How to configure Datatables to compile html code? The intention was to leave the text "Active" in green or color that indicates success according to the theme. Table Initialization Code: const altbl…
htmlasked Jean Freitas 346 -
0
votes1
answer142
viewsQ: How to use Laravel Pagination with queries in raw DB::select() format
To get some database information at times it is simpler to make a querie with raw sql than to use multiple models, maps functions and a magic touch to reach the same goal, however the problem of…
-
0
votes1
answer142
viewsA: How to use Laravel Pagination with queries in raw DB::select() format
The answer is as follows, to use the method simplePaginate() it is necessary that my function obterDados() return me an object Builder and not an object array because is the Builder object that…
-
1
votes1
answer1780
viewsQ: How can I change the attribute of a column with Laravel Migrations
In my database I created using the Laravel Migrations I have a column called celphone which unfortunately did not add the attribute ->nullable() when I created it, now that the base is already in…
-
1
votes2
answers2281
viewsA: How to list routes in Laravel (No Artisan)?
Complementing the reply of the friend above follows the code: Filing cabinet /Routes/web.php Route::get('/rotas', 'TesteController@index'); Filing cabinet /app/Http/Controlers/Testecontroller.php…
-
-1
votes1
answer123
viewsA: Variable out of while is zero
mysqli_fetch_array is a php function, that is to say that the variables used within a function are declared in the first use, what is missing in your code is to make a reference using & pro…
phpanswered Jean Freitas 346 -
0
votes2
answers500
viewsQ: How to add invalid status in html input fields?
I am making validations in the database before the user sends the form, however, let’s say that the e-mail already exists in the database, as I could mark the field input as invalid so that the user…
-
2
votes1
answer277
viewsQ: Account Plan Mask in javascript
How can I do a javascript function to format the values typed in an input to the default account plan similar to the one below. 1 (min) 1.1 1.1.1 1.1.1.01 1.1.1.01.001 (max) Column Bill…
-
0
votes1
answer333
viewsA: Update sweetalert 1.x to sweetalert 2 + javascript Promises
After a few more hours of video lessons, I managed to solve this stop, follow the updated code to see how it turned out, unfortunately I can not explain the details :( function deleteData() { if (…
-
1
votes1
answer333
viewsQ: Update sweetalert 1.x to sweetalert 2 + javascript Promises
When updating the library Sweetalert it stopped working, while debugging the error I saw that it had many modifications that made the version 1.x incompatible with the new version, so I would like…
-
0
votes1
answer348
viewsQ: How to change http header using (). get and (). post()?
Very briefly I need to send a jwt token in the http header of the requests, as I can change the headers of jQuery requests $.post() and $.get()? Example of how I do using Curl by prompt: curl -H…
-
1
votes2
answers79
viewsA: Error trying to minify js files in Grunt
Missing you record the uglify task, try something like: grunt.registerTask('u', ['uglify']); So in cmd type grunt u
-
0
votes1
answer613
viewsA: How to make a value array with select Multiple
I was able to solve the problem by adjusting html, and dealing with jquery as follows. // Alterei o source html/pug com os valores legíveis de cada atividade. label.col-md-1.control-label Atividades…
-
0
votes1
answer613
viewsQ: How to make a value array with select Multiple
Scenario is as follows, I have a select Multiple with the options of the type of activity of each person registered in the system, however the same person can be a client and an employee, but when…
-
2
votes2
answers157
viewsQ: If I declare a variable in a SELECT query is it required?
My problem is that I won’t always receive the variables, so I need a way that doesn’t make them mandatory even if I declare them, for example in the query below: "SELECT * FROM clientes WHERE…
-
1
votes1
answer2219
viewsA: Forbidden when accessing my directories - Apache
You need to free access to subfolders through the file httpd.conf located inside the Conf folder in the apache installation directory. Or add a rule to your file .htacces, good for both cases you…
-
0
votes1
answer367
viewsQ: Oracle does not export all tables
I am performing an export by database at a time 11.2.0.1.0 but when checking the log I realize that the tables that have no record are not exported. command I’m using to export the database exp…
-
-1
votes2
answers830
viewsA: How to subdivide HTML
Developing an app that has menus in menu files separate from the contents, Oce solves the maintenance problem, but creates another problem, rendering. Since Voce did not give details of your…
htmlanswered Jean Freitas 346 -
2
votes3
answers1111
viewsA: Nfe emission by Android app
Depends on the scope of the project, if you are developing for small businesses where only one device will issue note, do everything in android environment, if multiple devices will emit nf-and use…
-
1
votes2
answers1117
viewsQ: Change oracle characterset 11g
When performing a dump file import, oracle is returning me the following messages: IMP-00019: rejected line due to ORACLE 12899 error IMP-00003: Oracle error: 12899 found ORA-12899: very large value…
-
1
votes1
answer361
viewsQ: system() does not accept string type variable in c++
In order to automate some backups that need to be done routinely, so I thought of using an dos to do, but I’m having trouble compiling the executable because it seems to me that the function…
-
0
votes2
answers1206
viewsA: How to reference foreign keys in registration forms?
In your Books() class create a method to query the book ID entered in the field name="codigolivros" so Voce will get FK to record.
-
0
votes0
answers632
viewsQ: How to manipulate a checkbox in a modal Bootstrap from BD
Guys, I need to manipulate an element of the kind checkbox according to the values in the bank, if in 'contact.favorite' is populated with 'on', the checkbox inside the modal should be marked…
-
1
votes2
answers867
viewsQ: Error giving the npm install command
jean@jnotepc:/var/www/html/app_agenda/_views/css$: npm install npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/app_agenda/_views/css/package.json' npm WARN css No description…
-
0
votes1
answer758
viewsQ: $_POST take the <form name="this name"...>
I have two templates committing to the same file and I need to do an if() to check which algorithm should be run, but $_POST does not take the form name only the values. <form name="frmCadastro"…
-
5
votes1
answer1448
viewsQ: how to sort by line number in a query in postgres?
To popular the grid of a views I’m using the database, initially I put the table ID to be the view’s Dice, but when some record is deleted from the database the Dice is not sequential.…
-
1
votes1
answer1362
viewsQ: while in infinite loop using $result = $result->fetch(PDO::FETCH_ASSOC);
<?php include ('pdo.php'); class crud { public static function select($arg){ $pdo = new pdoinit(); $result = $pdo->prepare($arg); $result->execute(); …