Posts by Miguel Batista • 2,812 points
92 posts
-
0
votes2
answers2529
viewsA: Remove record in database without giving refresh
You can do it this way: Add the jQuery library to the head of your document if you are not using it. You can download here . On the tr of your table, put a unique id which will be used to hide tr…
-
1
votes4
answers103
viewsA: Problems formatting the date type returned from select
You can use the date function to store the formatted date before returning json_encode. Ex: $retorno = []; while ($row = mysql_fetch_assoc($query)); { $row['Mes_Ref'] =…
-
33
votes3
answers6154
viewsQ: C# is a compiled or interpreted language?
I’m starting my studies in C#, and I’m wondering if the language is compiled or interpreted? My doubt arises because I heard in a lecture that it is compiled, and others saying that it is…
-
1
votes1
answer183
viewsQ: How to return difference after running update on Laravel 4?
Can anyone tell me how to return only the changed fields and values in an update to the Standard? ex: a table containing a name field with value John, let’s assume that I change this field to John…
-
0
votes2
answers1151
viewsA: Vulnerability in my system "forgot password"
I would advise you to use in the form only email request and user. When the user submits the form the system checks that user and e-mail in the database create a base64_encode of the email and user…
-
0
votes1
answer64
viewsA: How to enable right mouse button to display camera settings in scriptcam plugin?
The plugin itself offers a method to solve this problem: function onWebcamReady(cameraNames,camera,microphoneNames,microphone,volume) { $.each(cameraNames, function(index, text) {…
flashanswered Miguel Batista 2,812 -
0
votes3
answers201
viewsA: Is making queries in a view, in the MVC standard, a bad practice?
Taking into account the MVC standard is a programmer error, although many frameworks allow this practice to work. But not everything that works follows a pattern.
-
3
votes2
answers346
viewsA: Standard Laravel Input Value
You can use it this way Input::get('nome_campo','valor'); in case the second parameter identifies the default value if the Input returns null.
-
0
votes1
answer64
viewsQ: How to enable right mouse button to display camera settings in scriptcam plugin?
I’m using the plugin scriptcam to capture image by webcam, I am using 2 cameras and need to select the camera when necessary, the problem is that the right mouse button does not activate the flash…
flashasked Miguel Batista 2,812 -
1
votes1
answer56
viewsA: How do I set up Laravel 4 to automatically detect which environment I’m in (production and development)?
You must use the method Illuminate\Foundation\Application::detectEnviroment(). It is that object that is stored in the global variable $app. You must pass as argument of this method a array or a…
-
2
votes2
answers2281
viewsA: How to list routes in Laravel (No Artisan)?
Wallace, you can do it this way: foreach (Route::getRoutes() as $route) { var_dump($route->getUri()); } The class Route is a stab for the class Illuminate\Routing\Router in the Laravel. So if you…
-
6
votes1
answer476
viewsQ: How to use Angular JS and Laravel 4 without conflicting with Blade?
I would like to know how to configure Laravel 4 to use Angularjs without conflict with Blade, since the interpolation tags are the same?
-
1
votes2
answers1031
viewsA: Validate jpg file - Laravel 5
The $file passed as argument in Validator has to be an array to compare with $Rules, because the way you are using the variables you are not getting the file. you can do it this way; $data =…
-
4
votes1
answer166
viewsQ: Does Timthumb have security exploit issues?
I’ve heard programmers say they don’t use Timthumb ("A small php script for cutting, zooming and resizing web images (jpg, png, gif). Perfect for use in blogs and other applications") for security…
phpasked Miguel Batista 2,812 -
1
votes1
answer98
viewsA: Refining Post-search Results (PHP -AJAX)
First download the jQuery library at the link https://jquery.com/download/ and make the inclusion of this file in the head of your site ex: <head> <script type="text/javascript"…
-
6
votes1
answer298
viewsQ: When to use distributed database?
I would like to know an example in which situation I would need to use a distributed database?
databaseasked Miguel Batista 2,812 -
0
votes1
answer54
viewsA: problems with bindValue
They are saved because when you select the radio field and send the POST when you redeem for $_REQUEST this index will exist. When you do not select it does not send this index: The reason for the…
-
1
votes1
answer391
viewsQ: How to remove toolbar from tinymce?
Good morning guys, I managed to limit the tinymce buttons as follows: editor_config.toolbar1 = "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify |…
tinymce-4asked Miguel Batista 2,812 -
6
votes4
answers4072
viewsA: Because of user experience, should confirmation buttons be left or right?
In the case of UX, for a better user experience, the provisions of the elements should be positioned in a way that guides the user to a better response. The user cannot be asked or prompted to…
uxanswered Miguel Batista 2,812 -
2
votes2
answers186
viewsA: Border-bottom with linear gradient
You can do it like this: h1:after { content:' '; display:block; border:2px solid #d0d0d0; box-shadow:1px 2px 3px #666; } <h1>Título</h1>…
cssanswered Miguel Batista 2,812 -
0
votes1
answer98
viewsA: Disable one button at a time jquery
I’d recommend you do it this way: HTML: <form action="http://localhost/W-OS-PRO/index.php/local/atualizar" class="form" data-id="1"> <input type="submit" id="local_1" class="btn btn-success…
jqueryanswered Miguel Batista 2,812 -
0
votes1
answer162
viewsA: Separate 6 images in 3 div, forming a slider with bxslider
By the link you passed from example, I suggest you create a field in your table to identify if the image is top or bottom and the return of the query would be: <ul> <?php foreach ($imagem…
-
4
votes2
answers689
viewsA: Add inputs in jquery, but without deleting existing ones
Good morning Friend, in jQuery has the following functions html() - $divForm.html('......'): this function overwrites all content inside the element and inserts the content passed in the parameter.…
-
1
votes1
answer48
viewsA: Immature() does not work with href
The effect for the following reason: HTML tagged <a>: <div> <div id="container"> <a href="#"><img…
-
1
votes2
answers1708
viewsA: how to create a youtube video in full screen with back button?
Friend, you can simulate the full screen as follows: In HTML you create a template structure that will be used within a modal window: <script type="text/template" id="video_1"> <iframe…
-
3
votes4
answers124
viewsA: Help in refactoring jquery code
You are using more than one class to do the same thing, the class is used to pick up various elements and do the same thing unlike the id that is unique on the page. You don’t need to create…
jqueryanswered Miguel Batista 2,812 -
1
votes2
answers386
viewsA: Join commands (Join) in SQL
Dener, everyone joins tables with some differences: When you use INNER JOIN with two tables for example, table user and table position o, INNER Join creates a set of intersection as in mathematics,…
sqlanswered Miguel Batista 2,812 -
29
votes7
answers13486
viewsQ: Is Delphi an IDE or programming language?
Through a question that appeared here What is a programming language, IDE and compiler?, I had a question: Is Delphi an IDE or programming language? I have heard programmers working with Delphi say…
-
1
votes2
answers261
viewsA: How to run Wamp Server over network?
Friend it is important you check the port 80 used by apache: click on the wamp icon -> apache -> service -> test port 80 in case everything is right will appear the message Server: Apache…
-
4
votes3
answers57
viewsA: Problems with CSS opacity
You can do it this way: #conteudo{ background:url(http://www.semprefamilia.com.br/wp-content/uploads/2015/06/SJC_prefeitura-1180x472.jpg) no-repeat; width:100%; min-height:400px; } #apresentacao{…
cssanswered Miguel Batista 2,812 -
5
votes7
answers4205
viewsA: Count elements on the screen
You can use Jquery to do this, for example $('li').size(); you can also put a class on li type <li class="item"> and use $('.item').size(); so do not risk taking all the read present on the…
-
4
votes2
answers250
viewsQ: How to join the query string in Laravel 4 pagination?
How do I join query string in the 4-way pagination? For example: I have a data listing and on this screen I have a search filter. When I send a get to request the filter in the list by the url…
-
0
votes1
answer292
viewsA: Close webcam with jquery
I checked the documentation and I realized that it has the method (pause) that serves to stop the use of webcam, so I solved the problem as follows: $(document).on('click','#get-photo',function(){…
-
2
votes1
answer292
viewsQ: Close webcam with jquery
I’m using the plugin Photobooth to capture webcam image by nevegador, but after allowing the use of webcam by the browser and make the capture in a modal I close the modal and the webcam remains in…
-
2
votes2
answers263
viewsA: Laravel Belongstomany
Use your User model for example: $user = User::with(['profiles.areasItens']) ->findOrFail(Auth::user()->id); print_r($user->toArray());
-
1
votes0
answers53
viewsQ: GAPI Analytics ERROR
I migrated the hosting project and using the class GAPI in PHP to collect information from Google Analytics, does not work on new server reporting error: Fatal error: Uncaught Exception 'Exception'…
-
2
votes0
answers261
viewsQ: Zend Framework and Symfony
I started studying Symfony 2 and realized that it is very productive for system development, but there are people who say that Zend Framework 2 is the best framework in PHP. I would like to know the…
-
1
votes3
answers14756
viewsA: Centralize one div within another 100% div
Hello friend I made an example below that you can check on the link http://jsfiddle.net/p16kLwhz/ <div class="a"> <div class="b"> <img…
cssanswered Miguel Batista 2,812 -
1
votes3
answers367
viewsA: Stop Menu scroll in certain resolution
Try this, because if you don’t want it to work if it’s less than 760, use the > in condition. $(window).scroll(function() { if ($(window).width() > 760) { $('#menu').css({'position' :…
-
18
votes2
answers71704
viewsA: How to make image responsive
try using the background-size as in the example below and check if the meta tag is set at the head of the site: viewport .responsivo { max-width: 1080px; width: 100%; height: auto; } .responsivo…
cssanswered Miguel Batista 2,812 -
1
votes2
answers1848
viewsA: Is referencing the table itself in Mysql correct?
I believe that this is perfectly normal. But in other cases it would not be feasible as for example: if I want to implement a comment post comment I would be without reference needing another table.…
-
2
votes2
answers347
viewsA: Compare Mysql search results
In question 1 you can do as follows: SELECT MAX(velocidade) AS velocidade FROM tabela WHERE cod = 100; In question 2 you can do as follows: SELECT DISTINCT cod, velocidade FROM tabela WHERE cod =…