Posts by SneepS NinjA • 7,691 points
231 posts
-
5
votes1
answer723
viewsQ: Problem loading image in HTML (Performance)
While the entire DOM parser process is blocked, this prevents the rendering of the rest of the page. And this if applied to each page script tag. A way that I found to "circumvent" this problem was…
-
3
votes2
answers4428
viewsA: Table to record history record (Best way)?
As William mentioned I make a "copy" of the original table by adding the other fields that inform me about what happened to what was registered type like this: CREATE TABLE `log_tab_fornecedor` (…
-
1
votes1
answer206
viewsA: Image rotation does not work properly in Chrome
your answer is here: http://jsfiddle.net/68964/2/ and was answered in its own source code ( this in comment ) give a look ai in its code the line: // Source:…
-
2
votes2
answers268
viewsA: Jquery - Hover() and mouseleave()
With delay resolves like this: var vermelho = 0; var azul = 0; $('#div2').hover(function(){ $('#div2').show(); azul = 1; }); $('#div1').hover(function(){ $('#div2').show(); vermelho =1; }); function…
-
1
votes2
answers147
viewsA: Working with hierarchical data
I have an implementation that goes against what you want, but to explain I’ll go by parts: The final result would look like this: (in red is not allowed in green with permission) Well you said that…
-
1
votes2
answers466
viewsA: Optimize Mysql query to remove FILESORT
puts an input in the puplished so: ALTER TABLE `test`.`essences` ADD INDEX `published` (`published` ASC); And you’ll get an enhanced consult, you’ll see that the problem is ALL which is a fullscan…
mysqlanswered SneepS NinjA 7,691 -
0
votes3
answers65
viewsA: Increment or decrease var in resize window
From what I understand it would be like this: var tamanho = 1000; $(window).resize(function() { var h = $(window).height(); tamanho += h > tamanho ? 1 : -1; console.log(tamanho); });…
javascriptanswered SneepS NinjA 7,691 -
1
votes1
answer61
viewsA: Interacting with the linux system
It works like @Matheus, you need a server-side language, so if that your javascript, Angularjs, html and Html5 is on the client-side ( and most likely to be ) don’t p/ make your server run any…
-
0
votes2
answers666
viewsA: error message while trying to remove file
I found a documentation ref. to commands lsattr and chattr The command chattr serves to increase security in the file or directory, the command it uses attributes and not permission like the chmod,…
linuxanswered SneepS NinjA 7,691 -
1
votes2
answers2774
viewsA: Mysql - make each row increment 1
I found this solution: set @num = 0 ; select @num := @num + 1 , u.usu_nome from tab_usuario u group by u.usu_id; But I wanted a solution only with select, without having to do this set of a variable…
-
4
votes2
answers2774
viewsQ: Mysql - make each row increment 1
I want to make an appointment sql and I want each row to have a column indicating the number of the ex row: linha nome 1 joao 2 maria 3 tiago . . . . . . n joares But this "row" column I don’t have…
-
1
votes1
answer23
viewsA: Windows 7 server with Mysql 4.1
Maximum number of users will depend more on the hardware than on the operating system in question, 50 simultaneous connections Mysql 4.1 supports quietly, not to have slow problems see the miminos…
-
0
votes3
answers749
viewsA: Node.js application always falls after an error
Parameter Reconnect receiving true when opening the connection. io.connect( // CRIAR UM SOCKET $("#socket").val(),{ // ENDERECO DO SOCKET 'reconnect': true // que irá informar se o socket irá tentar…
-
1
votes1
answer1511
viewsA: Responsive menu does not close when selecting element
Make a schedule with the click event on the element clicked to close the menu. Example: $('.efeito-desliza').click(function () { $('html, body').animate({ scrollTop:…
-
2
votes4
answers2818
viewsA: Email falls into PHP spam box using HTML layout
Who controls spam is the server/client of the email recipient, you can resolve if in case you can set up these email accounts, if you can set up the server or email account. Now so your email…
-
3
votes2
answers666
viewsQ: error message while trying to remove file
When I execute the command root@debian-hy:/var/www/sys# rm teste.txt rm: cannot remove `teste.txt': Operation not permitted Strange because I can edit the file and save, but when I close saw it…
linuxasked SneepS NinjA 7,691 -
6
votes1
answer3105
viewsQ: select with limit in Firebird
I do in mysql to fetch the 1000 last regions: select * from tabela order by id desc limit 1000; Now, how do you do it in the Firebird? doing so have the following error message: Dynamic SQL Error…
-
1
votes1
answer300
viewsA: Send and receive SMS from a GPS
Well, since you have no idea where to start, I’ll make a suggestion: https://support.google.com/calendar/answer/45351?hl=pt-BR With this you do not need to program any line of source code, just go…
-
0
votes1
answer63
viewsA: How to work with Javascript objects?
var objeto1 = new Object(); var objeto2 = new Object(); // objeto1 = objeto2 funciona como apontamento // quando é nova instancia de objeto então tem que instanciar e não referenciar Case of cloning…
javascriptanswered SneepS NinjA 7,691 -
1
votes1
answer4302
viewsQ: Firebird - transaction monitoring
I updated my Firebird to the versão 2.5 and would like to view the transactions, I saw in several links that the command: SELECT * FROM mon$statements solves, but this command gives me a mistake:…
-
1
votes1
answer178
viewsA: XAMPP has mysql active?
So Mysql is stable 5.6.12 (3 June 2013) Xampp has a 5.6.24 And we have in test in Mysql 5.7.1 (23 April 2013)
-
1
votes5
answers667
viewsA: Use JS to relieve PHP
To throw wood on the fire, I can make a "CLEAN" code on the client side until I get to the server side, and continue programming javascript on the server side just use the nodejs.…
-
3
votes1
answer235
viewsA: Image smaller than the original canvas upup when drawImage()
Follow an example working: $(document).ready(function() { $("#uploadImagem").change(function(e) { var _URL = window.URL || window.webkitURL, arquivo = e.target.files[0], tipoImagem = /image.*/,…
-
5
votes3
answers23448
viewsA: Footer "glued" at the bottom of the page and responsive (variable height - using bootstrap)
Edited Follow an example, to test do the following, leave your window small ( the size of a mobile screen(to simulate a mobile device), and load the code below, then leave maximized and load the…
-
20
votes8
answers17275
viewsQ: Difference between while and for
What’s the difference between while and for, if the two are loops of repetition, if with the two I can do the same things either conditioning a halt or iterations of variable, because there are…
-
1
votes1
answer575
viewsA: Add input and output and subtract
If that’s what I understand you want to put table with javascript, if that’s it then just add javascript as below $(document).ready(function () { var $entrada = 0, $saida = 0, $total = 0;…
-
1
votes2
answers29759
viewsA: Change the "collation" and "Character set" of the database, tables and corresponding columns
Has a solution with shell: DB="dbname" ( echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_general_ci;' mysql "$DB" -e "SHOW TABLES" --batch --skip-column-names \ | xargs -I{} echo…
-
1
votes2
answers1640
viewsQ: jQuery - Picking up content from a <link> tag
I have a link tag as per: <link rel="stylesheet" type="text/css" media="all" href="../css/screen.css" /> When loading the site, it brings me all the css that is inside this file, but when I go…
-
0
votes1
answer1444
viewsA: Overwrite one HTML page with another
Follow the link with jQuery ready example and test on the page itself https://jqueryui.com/dialog/#modal-form example: <script…
htmlanswered SneepS NinjA 7,691 -
1
votes2
answers168
viewsA: PHP/Mysql Add Category to Materia
Look in your table dung where this: `id_cat` bigint(20) NOT NULL, // aqui você diz que não pode ser null Look at your php where you have the Insert: $sql = mysql_query("INSERT INTO lancamentos (id,…
-
2
votes1
answer640
viewsA: Save input field to database
The best way I don’t is, but I have some ideas SOLUTION 1 Create a TRIGGER in the AFTER INSERT from your table, this Rigger makes a call to a FUNCTION. Create the FUNCTION recursively doing the…
-
1
votes3
answers237
viewsA: Update the jquery title
Don’t mix code javascrit with PHP this leaves the source code very messy, learn about ajax in jQuery since you are making use of jQuery. example leave your html so (or even separate javascript too):…
-
5
votes1
answer255
viewsQ: google API - gcalcli - error running in a script
Carrying on my problem reported here now I can send events from shell-script directly to google calendar, I made a script to run as scheduled, follow file sms.sh down below #!/bin/bash let…
-
1
votes2
answers1348
viewsA: Update involving 3 tables
I’ll demonstrate in a simpler way without these INNER JOIN, GROUP BY etc... CREATE TABLE `test`.`tab_a` ( `id` INT NOT NULL AUTO_INCREMENT, `tab_b_id` INT NULL, PRIMARY KEY (`id`)); CREATE TABLE…
mysqlanswered SneepS NinjA 7,691 -
11
votes1
answer12600
viewsQ: How to remove python-installed packages
downloaded a package with wget, unzipped and downloaded the folder, used the command: python setup.py install It ran without errors, but now I no longer use this program, what is the correct way to…
-
0
votes1
answer96
viewsA: Charset conversion
No problem, Database Properties defines the "default" that will be used in the "table creation" when this is not set a charset it takes the Database default. As you already have the tables all in…
mysqlanswered SneepS NinjA 7,691 -
8
votes1
answer14933
viewsQ: Double type and Decimal type, which is suitable for monetary value?
I found here in the SO a question with an answer until well accepted by the community What kind of data (double, float or decimal) should I use to represent currency in . NET with C#? I just never…
-
3
votes1
answer4489
viewsA: How to make an ajax autocomplete?
fix in script a read in comment $(document).ready(function(){ var MIN_LENGTH = 2; $('.nome').keyup(function(){ var nome = $('.nome').val(); if (nome.length >= MIN_LENGTH) { $.ajax({ type:'POST',…
-
2
votes3
answers2583
viewsA: SQL of tables with multiple relationships
To fix the problem of relationship I will pass your script with the necessary changes, have a comment already explaining why the change DROP TABLE IF EXISTS usuario; CREATE TABLE usuario( id INTEGER…
-
1
votes1
answer2147
viewsA: Pass variable value inside nested SELECT
It really wasn’t clear maybe but you say "don’t perform", I tested here and ran, maybe the way you’re declaring the variable is giving some problem, that part you didn’t demonstrate, follow my test.…
-
2
votes1
answer385
viewsA: Problem with long Polling
First part of your code - I made a few adjustments to a look at the comments <?php // Assim você escreve na tag HTML que ficará oculta no site echo "<input id='id_estabelecimento'…
-
0
votes3
answers22485
viewsA: Pass php variable to javascript
Does with the $.ajax() a POST for your PHP, take your PHP $objeto and return it on ajax with <php>echo json_encode($objeto);.
-
2
votes2
answers326
viewsA: Do I need to include jQuery on every page?
not necessarily, if you are going to open a new "page" then yes, you will have to load, but if you use only one page and all the rest are loaded through a javascript function for example, in this…
-
9
votes3
answers1996
viewsA: What do I need to do to measure password strength?
In short, we can make our own score to check if it is "weak", "average", "strong" or even "doesn’t meet the minimum required". I have javascript code that demonstrates the score in the form of a…
-
10
votes5
answers38375
viewsA: Convert date to dd/mm/yyyy format
MYSQL - Can be done directly using the function DATE_FORMAT() thus: DATE_FORMAT(suadatadd/mm/yyyy,'%d/%m/%Y') as 'DATA' PHP - Can be made a Function: public static function dateEmMysql($dateSql){…
-
0
votes3
answers1954
viewsA: optimize jquery datatable with a database with more than 30,000 records
Use the filter limit SQL and client-side paging technique, no need to send a flood of data at once.
-
3
votes2
answers110
viewsA: Use a function several times
where it is written getElementById javascript will take only the first element that has this ID, to make 2 watches, will have to change its code to catch adjust that part.…
-
2
votes2
answers853
viewsA: Normalize values separated by comma for new table
Look congratulations on your @Zuul reply from p/ see that you have a lot of experience in Mysql. I can achieve the same result, but in a more humble way, I may even be considered a gambit, but it’s…
-
3
votes3
answers16929
viewsA: Multiple foreign keys from the same table. Is it possible?
Just run the script and see if that’s it. CREATE TABLE `test`.`tabela_intensidade` ( `id` INT NOT NULL AUTO_INCREMENT, `descricao_intensidade` VARCHAR(45) NULL, PRIMARY KEY (`id`)); CREATE TABLE…
-
5
votes1
answer245
viewsQ: Error [Forbidden] when sending event in google calendar, googleCL API
For those who do not know, the googleCl(Command line tools for the Google Data Apis) follow the link https://code.google.com/p/googlecl/ I use only the command that sends an event to my google…