Posts by StillBuggin • 2,012 points
86 posts
-
0
votes2
answers60
viewsA: Updating of html element
And if you try like this: $('#ramal').change(function() { var ramal = $('.check-ramal'), tudo = $('#check-all'); if(ramal.is(':selected')){ tudo.prop("selected", false);…
-
1
votes1
answer271
viewsA: How to upload image to Ckeditor interface?
I went through it and had to use a Ckeditor addon, Image Browser: http://imagebrowser.maleck.org/ On the Ckeditor website: http://ckeditor.com/addon/imageuploader…
-
6
votes3
answers46057
viewsA: Footer at the end of the document
EXAMPLE WITH FOOTER IN ABSOLUTE POSITION: Jsfiddle html, body { margin: 0; padding: 0; height: 100%; } #wrapper{ min-height: 100%; position: relative; } div.body-content{ /** Altura do rodapé tem…
-
1
votes1
answer43
viewsA: return help with Json
You just have to do it from here: $minhaarray['points'] = array( $category->name => $event->total ); echo json_encode($minhaarray, JSON_NUMERIC_CHECK); But pay attention to the values null.…
-
4
votes2
answers978
viewsA: How to find the name of a button by source code?
It is that this control there does not have a name. You can still use other ways to refer to input, like css, xpath, tag, id, value, text. Documentation to find elements: Splinter Docs Example: You…
-
0
votes1
answer77
viewsA: Rselenium stopped working, what should I do?
Everything worked out for me. My footsteps: install.packages('RSelenium'); RSelenium::checkForServer() (awaits completion of execution); RSelenium::startServer() require(RSelenium) remDr <-…
ranswered StillBuggin 2,012 -
2
votes2
answers3152
viewsA: remove mask to save to database
The types of data decimal are saved in the database with the format, i.e., ########.##, therefore, the string of the example in the format R$ 1.300.000,00 has to be passed to the database with the…
-
1
votes2
answers679
viewsQ: ocLazyLoad to load controllers from an Angularjs SPA
Hello, community! I wonder if it’s a good idea to use ocLazyLoad to carry the controllers an application (Single Page Application - SPA) of Angularjs. I’m using UI Router in place of ngRoute. The…
-
1
votes1
answer26
viewsQ: SQL Server 2012 - Generate query from one table to another involving 3 (three) tables at once
Hello, Community! I need help with the logic of a consultation I have to do on SQL Server 2012. Well, I have three tables: [1'] operacao_apf; [2] operacao_contrato; and, [3] operacao_detalhe. What I…
sql-server-2012asked StillBuggin 2,012 -
1
votes1
answer91
viewsA: block image link to other websites
Yes, it is possible! You can try the following on .htaccess (Apache): RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost [NC] RewriteCond %{HTTP_REFERER}…
-
0
votes1
answer911
viewsA: Capture and change the value of a column of your respective row in a table with numerous rows
I used the Sakila database samples from Mysql. In the script below, the last column has a context menu. When you click on it, you will see the options to lock and unlock. Finally, when you click on…
-
0
votes1
answer196
viewsQ: Use of the ID attribute in <link> tags
Is it appropriate to use the ID attribute in tags ? In which cases could I use it? Which versions of HTML would support this type of reference? In this case, the ID always has the selector function?…
htmlasked StillBuggin 2,012 -
1
votes2
answers123
viewsA: How to use bootstrap for websites with larger layout?
Use Bootstrapxl library (extra large or extra large). It is suitable for screens over 1600px wide. Link to the Github: Bootstrapxl…
-
3
votes1
answer1692
viewsA: How to check if a table exists in Mysql
You can run an SQL query in Mysql using show Tables and check whether the query returned some result for the query using Java (which generates the most extensive codes). show tables like…
-
4
votes2
answers180
viewsA: Grab the IP port in a string
You can use PHP’s explode function. This function basically works this way: you give as input a delimiter/separator and a string. The function will take the string which you have provided and will…
phpanswered StillBuggin 2,012 -
1
votes2
answers2283
viewsA: Search data in MYSQL and show in Highcharts chart
The example below generates a chart of sectors from a PHP back-end, receiving a parameter from a input text type, which is passed to the query for you to filter in the database if you want, if not…
-
1
votes1
answer1795
viewsQ: What is the difference between the <b></b> and <Strong></Strong> tags?
Hello, Community! I have a question about the use of tags <b></b> and <strong></strong>. I’ve searched some sites, but I couldn’t find a comparison that differentiated the…
-
2
votes1
answer1187
viewsA: How to insert HTML elements into a Tooltip Bootsrap?
Answer to your question (JSFIDDLE): $('body').tooltip({ selector: '[data-toggle="tooltip"]', html: true, title: $('#tooltip-table').html(), placement: 'right' }); .tooltip, .tooltip-inner {…
-
2
votes1
answer1723
viewsA: CSS - Align image set in the center of a div
Hello!!! Well, to align an image vertically, you can use vertical-align. To align left or right, you can use float. to align horizontally in the middle can do the following: div.img-container{…
-
0
votes2
answers1723
viewsA: How to remove index through . htaccess file from site?
Below you redirect your domain to a subfolder from index.php: #Redireciona seu site pra uma sub pasta do domímio Redirect /index.php http://www.site.com.br/curitiba If you add the code below, you…
-
0
votes3
answers3043
viewsA: Assign $.ajax received value to variable
Declare the variable like this: window.VariavelGlobal As you know, Javascript has two types of variables, global and local. Local variables are declared within the scope of a function, whereas…
-
3
votes1
answer58
viewsA: Field code in option value attribute
On the one hand, I think I’m safer in the current way, as represented in your sample code [sample], since only the result of the query is being shown. If you try to recover the value later, when the…
-
1
votes1
answer108
viewsA: How to "translate" SMARTY to JAVASCRIT or even JQUERY?
Smarty is a PHP templating engine, that is, it helps you generate HTML quickly and dynamically as in the case of your example, where Smarty is generating a select form dynamically. To do the same…
-
0
votes1
answer53
viewsA: Login Problems in jQuery
I’ve been there and done it: On the PHP side: echo trim('OK'); On the Javascript side: var response = $.trim(data); if(data === 'OK'){ location.reload(); }else{ $('#myModal').modal('show'); }…
-
2
votes1
answer87
viewsA: Use of predicate and lambda expression
Lambda expressions are very useful for creating queries with LINQ in Visual C#, and are nothing more than anonymous functions that you can use to create delegates and write local functions that can…
-
0
votes1
answer991
viewsA: CRUD with jQuery, PHP and SQL Server: table with total, subtotal and auto filter
Hello, Community! I decided to use Datatables and have everything I asked in the original question: autofiltro (with select or input), you can sort, search, export to PDF or Excel, copy, print, have…
-
1
votes5
answers1111
viewsA: How do I leave the page open marked in the menu?
You will need to use Javascript to add a new formatting to your menu. First, you compare the value of the attribute href link clicked with the URL current, if they are equal, then you add the…
-
2
votes1
answer793
viewsA: Pass PHP array via Jquery
I rearranged your code $.ajax(), see if it works: $(function () { $('#myForm').on('submit', function (event) { event.preventDefault(); $.ajax({ url : 'update.php', cache: false, type: 'POST', data:…
-
1
votes1
answer1164
viewsA: How to take a data from a selected html combobox item
To pick only the first two characters, use so: var tensao = $('#Unidades option:selected').text().substr(0, 2);…
-
0
votes2
answers756
viewsA: Catch JSON after submitting a POST
A hint is to use the function $.get() jquery: $(function () { $.get('exemplo.php', { //parametros da solicitacao param: 'pamametro' },function (data) { // resposta da solicitacao var response =…
-
1
votes2
answers1067
viewsA: How to avoid jquery library conflicts?
Place your Jquery code inside a wrapper Jquery: May be the following: jQuery(document).ready(function( $ ) { // Código JQuery aqui }); Or else: jQuery.noConflict(); (function( $ ) { //Codigo JQuery…
-
1
votes1
answer112
viewsA: How to install OPENCV in PHP on a WAMP server?
It has an excellent PHP library for this. It requires PHP 5.3+ and Opencv 2.0+. Make sure he sees you: Opencv for PHP…
-
3
votes1
answer35
viewsA: How to align 2 while result per line
This is a matter of page formatting. Style! So you should really use CSS. You can make your <div></div> side by side: div{ width: 49%; border: 1px solid red; float: left; } If you don’t…
-
2
votes1
answer136
viewsA: Is it possible to know if a two-dimensional array is empty?
Yes, it is possible. In this example I make a loop in the array revenant and print all the arrays that compose it, which are not empty, that is, print all except the last array that composes the…
-
2
votes2
answers276
viewsA: Run include inside if
Editing: <?php include "in/conecta.inc"; $doc = $_POST['login']; $senha = $_POST['senha']; $try = mysqli_query($conn, "select login from usuarios where login='$doc' and senha='$senha'"); $cont =…
-
1
votes1
answer1744
viewsA: How to run a Procedure with output in php with mssql driver
It makes PDO work. Opens the connection: <?php try { $con = new PDO('sqlsrv:Server=$SERVIDOR;Database=$BANCO_DE_DADOS', $USUARIO, $SENHA ); $con->setAttribute(PDO::ATTR_ERRMODE,…
phpanswered StillBuggin 2,012 -
0
votes2
answers18476
viewsA: optimized way to recover last mysql ID
Mysql is pretty easy. I was trying to do the same thing on SQL Server and it’s a sacrifice. In Mysql you only need to use LAST_INSERT_ID(). Example: SELECT LAST_INSERT_ID() INTO @tabela…
-
1
votes1
answer29
viewsA: how to return two distinct arrays using Union all
Try it this way: $stmt = $this->db->query(" select count(*) as total from tabela1 where status=1 union all select count(*) as total from tabela2 where status=1 "); $total =…
-
2
votes2
answers692
viewsA: How do I show the notification when -30 days left to expire
Sample code: <?php $data_atual = new DateTime(date('Y-m-d')); $data_expiracao = new DateTime('2016-10-01'); $intervalo_em_dias = $data_atual->diff($data_expiracao); echo…
-
2
votes3
answers15705
viewsA: SQL CASE with more than one condition
There is. Look at that: select a.*, case when a.operacao = 'C' and a.DESCRICAO_PREMIO = '1P' then (b.multiplicador * a.VALOR_JOGO) when a.operacao = 'C' and a.DESCRICAO_PREMIO = '1/5P'then (/**…
-
3
votes1
answer958
viewsA: CSS file Only for a DIV, Is it possible?
You don’t need this. Create a table-specific selector, such as a ID single and reference all table styles from this selector. Example: <table id="tabela-preco"> <thead> <tr>…
-
1
votes1
answer1148
viewsA: Multiple choice questions in php and database
UPDATING You can print the values as follows, then. <?php //sua query: se ficar muito grande passe pra uma variável, só por questão de visualização $query = "SELECT Questao.Questoes AS questao,…
phpanswered StillBuggin 2,012 -
0
votes1
answer91
viewsQ: What is the best way to write the following jQuery/Javascript code?
I have the following code snippet which basically via a request jQuery ($.ajax()), uses selectors to search for elements of a page (with content) and places within elements of the current page using…
-
0
votes1
answer1247
viewsA: Syntax error in VBA
Well, the error is only of code indentation and a very simple thing in VBA to Excel: you have to put everything inside a subroutine. Sub exemplo() 'comeco da subrotina Application.ScreenUpdating =…
-
0
votes1
answer75
viewsQ: SQL Server and JSON to generate Highmaps: query very long and difficult to handle
I built the query below to have a JSON output for Highmaps (Highcharts), but it is very laborious and I would like to modify, if possible so that it is smaller and easier to change it: select…
-
1
votes1
answer74
viewsA: What is the logic to make this select work?
It’s very simple: use ajax. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script> $(function(){ var opcoes =…
-
4
votes3
answers268
viewsA: How do Javascript functions behave in relation to the scope?
This is purely a matter of scope and overwriting (overwriting), since, in Javascript, functions and objects can be easily manipulated as variables. To access the method or property you only need to…
-
0
votes1
answer272
viewsA: Clear auto-refill of Asp.net mvc forms
In ASP, to prevent form caching, you can use <% Response.CacheControl = "no-cache" %> <% Response.AddHeader "Pragma", "no-cache" %> <% Response.Expires = -1 %> You can directly use…
-
2
votes3
answers890
viewsA: Mysql update of Empty columns only
1) Do not use functions mysql() PHP. They are obsolete since version 5.5.X and have been removed from PHP 7, so do not use them. Use mysqli. 2) If you do not want to enter the values, then do not…
-
3
votes2
answers783
viewsQ: Select chained using only HTML and jQuery
Hello, Community! I have two selects in HTML one with the regions of Brazil and the other with the states. How do I fit them without using a template (PHP, Java, C# etc), only with HTML (the…