Posts by SneepS NinjA • 7,691 points
231 posts
-
0
votes1
answer31
viewsA: angular - passing variable values from one page.ts to another
An answer to that question is here https://www.youtube.com/watch?v=Mz8lb81AAe4 But this in English, only copying the code I could understand that it is possible to make a class with @Injectable set…
angularanswered SneepS NinjA 7,691 -
-2
votes1
answer31
viewsQ: angular - passing variable values from one page.ts to another
I’m starting now with the angular and I’m having a doubt, I made a canvas of login.page.html, after the back-end confirms the login and password the user goes to the screen home.page.html on this…
angularasked SneepS NinjA 7,691 -
0
votes2
answers63
viewsA: Checkbox is only picking up the first row of the table
Reading your code in the HTML part has a javascript in the click event that is where you are capturing the data, only you defined that all the input has the same name="mark" I believe that is what…
-
0
votes1
answer79
viewsA: Field returning date in Brazilian standard and the other in American in typescript. How to validate?
From to do separate functions like this: custom.convertDatePortuguestoSql=function(date){ if(date != null && date != ""){ var s = date.split("/"); var ano = s[2]; var mes = s[1]; var dia =…
-
2
votes2
answers70
viewsA: Backup Database, which tool to use, alternatives, security and data access?
Guy before the file. FDB or . Firebird’s GDB does not need to be on the client side that is already wrong, if it is local network the server that should keep the file and it can be mapped by the…
-
5
votes2
answers397
viewsQ: MYSQL - Check if PK exists if it does UPDATE if it does not exist
I didn’t want to have to do two transactions in the database, currently I’ve been doing SELECT first to know if the record already exists in the table, then I do either INSERT or UPDATE depending on…
mysqlasked SneepS NinjA 7,691 -
2
votes1
answer532
viewsA: Add buttons in table rows
do so: $('#my-final-table').dynatable({ dataset: { records: [ { "band": "Weezer", "song": "El Scorcho", "editar":"<button onclick='javascript:editar();'>editar</button>",…
-
0
votes1
answer245
viewsA: Error changing charset using Mysql Table Editor from latin1 to utf8
So the correct is the one that attracts you, so it depends on the case any one can be the one such correct that you seek, now if you are wanting to use the pattern ABNT2 then a utf8 - default…
-
3
votes1
answer439
viewsA: How to do an exact/precise split or subtraction in PHP
Correcting your example, php will not interpret these "commas" have to be point, and it has to be in quotes if you are going to use string transformation, or without quotation marks if it is…
phpanswered SneepS NinjA 7,691 -
3
votes2
answers259
viewsQ: Problems with bash - echo with char ! (exclamation)
I’m trying to pass a password as parameter the password uses numbers after char ! example: root@LinDom:~# senha="teste!123" senha="testevim /etc/hosts" root@LinDom:~# root@LinDom:~# echo ${senha}…
-
0
votes2
answers78
viewsA: Onclick calls function 2 times after changing value in browser developer mode
I think what you want to do is stop the spread right, that’s what I understood. https://stackoverflow.com/questions/38569422/how-to-stop-event-propagation-on-onclick-event-in-html-attribute example:…
-
6
votes3
answers62099
viewsQ: zero to left (LPAD) in Sql Server
How is done in Sqlserver so that the result comes with zero left ? in mysql would look like this: select lpad(mes,2,0 ) as 'mes', ano from tab_qualquer; How does something equivalent in Sql Server?…
sql-serverasked SneepS NinjA 7,691 -
2
votes1
answer1512
viewsA: Relationship (0.1) in mysql Workbench
I will make the associative between the user table and the company table and you will see that the same case for the event table. First I’ll put the example code CREATE TABLE `teste`.`tab_usuario` (…
-
5
votes2
answers1620
viewsQ: Compare equal dates in javascript
With reference to these two questions: Simple comparison between dates How to compare two dates in Javascript or jQuery I need to compare the dates and I need three distinctions between two dates,…
-
1
votes1
answer1419
viewsA: Print data from a JSON
looks like your while while($row = mysqli_fetch_array($result)){ $encode[] = $row; } after the loop I do the echo thus: echo json_encode( Array('json'=>$encode) ); This if you need type…
-
3
votes1
answer573
viewsA: 5x5 Matrix with Portugol - Learning to program
Beauty come on algoritmo declare mat[5,5], resultado[5,5], i, j, distancia numerico para i <- 1 ate 5 faca inicio para j <- 1 ate 5 faca inicio leia mat[i,j] fim fim distancia <- mat[1,1]…
-
1
votes1
answer342
viewsA: MYSQL - Code error 1644
I found this website who says that this error is defined by the user... so I took a look again at the code to see where I wrote it and found the lines are these DECLARE EXIT HANDLER FOR SQLEXCEPTION…
mysqlanswered SneepS NinjA 7,691 -
1
votes1
answer342
viewsQ: MYSQL - Code error 1644
I have two database, when a Trigger is fired it generates an Insert in another database is a trick to generate log : The scheme is this: local name database has a table called tab_manifesto and an…
mysqlasked SneepS NinjA 7,691 -
4
votes6
answers8595
viewsQ: javascript loop with Sleep
How would I make a for or any kind of loop showed the result respecting the time of 1 second for example between an iteration and another? I tried it and it didn’t work: for( var i=0; i < 10; i++…
javascriptasked SneepS NinjA 7,691 -
-1
votes3
answers604
viewsA: Working with tags in Mysql
EDIT: Correcting to not get an invalid answer, follows new select, is now very close to what was already posted here, but still is a select "different" just one more option to do the same thing, let…
-
2
votes6
answers10207
viewsA: Open Multiple Bootstrap Modals
Follow example of doing this thing ai with jquery ui var $modal = $('<div>'); $modal.css('line-height','1').html('teste1') .dialog({width :400,height: 250,modal: true,closeOnEscape:…
-
39
votes3
answers2857
viewsQ: What characterizes a programming language?
A long time ago I saw in the laboratory a "program" called POV-Ray and a doubt prompted me. The teacher said it is a "programming language" and argued, now it has source code, syntax, semantics and…
-
2
votes2
answers3176
viewsQ: base64_encode in javascript
I have an image in the database saved in blob format, I have to use the base64_encode in php before returning the ajax request and this slows down the process on the server side. Can do or has any…
-
0
votes2
answers174
viewsA: Add consecutive fouls
From what I understood d_status = 6 is wrong? then follow the query for 3 consecutive fouls: SELECT distinct d_matricula, d_status, d_data as Dia1, (SELECT d_data from jos_users_cursos_diarios as t2…
-
3
votes3
answers954
viewsA: Vertical slider navigation including highlight thumbnails
Well I made a model that follows the same design of the site, it was very simple I believe that this is the idea to leave it well didactic and commenting the code follows below. Obs: I used the…
-
1
votes2
answers66
viewsA: Right way to get a certain div
Puts an identifier on it an ID or a class and calls it directly <div id="esse"> <!-- Essa é a div que quero acessar --> <div> <div> <div id="conteudo">...</div>…
jqueryanswered SneepS NinjA 7,691 -
8
votes3
answers8471
viewsA: Is a subquery in SELECT calculated for each result or just once?
I found important the considerations of Cantoni, and I believe that the question of performance goes beyond the structure of how to assemble the query, of course it influences and a lot, but it…
sqlanswered SneepS NinjA 7,691 -
0
votes2
answers517
viewsA: Function load() jQuery + Twig
It’s not true this case you cited. As links are clicked, a certain html is loaded. However, the html loaded by the jQuery load function cannot access something that is in the index When using…
-
4
votes3
answers20769
viewsQ: javascript check if the attribute of an object exists
I have an object that I receive, and sometimes it comes with an attribute other times no, my problem is in sequence when I go to work with it see the example below: if( json.aviso != "" ){…
javascriptasked SneepS NinjA 7,691 -
0
votes2
answers475
viewsA: Include extremes in BETWEEN and List missing values in SQL query
As far as I understand it, you want to < those > <-----------> right? Come on: SELECT pagamentos.idPagamentos, pagamentos.mesReferencia FROM pagamentos, planosclientes WHERE…
-
0
votes2
answers237
viewsA: Math account with exact precision returns different value in Javascript
Number.prototype.formatMoney = function(c, d, t){ var n = this, c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "." : d, t = t == undefined ? "," : t, s = n < 0 ? "-" : "", i =…
javascriptanswered SneepS NinjA 7,691 -
0
votes2
answers2187
viewsA: Run a Javascript function from the site link?
Let’s put the full example right, lacked its function script ai, but let’s assume it here in the answer. <input value="Enviar" tabindex="3" onclick="submitThisOnce(this);" accesskey="s"…
-
6
votes1
answer4386
viewsQ: netbeans change java jdk
I upgraded my java, and removed the previous version, now on startup the netbeans gets a message that did not find version 1.7 and asks if I want to use the version default. Does anyone know where I…
-
0
votes3
answers4509
viewsA: Print orientation using Javascript, CSS, HTML or PHP
I ended up using the solution of Jasperserver with PHP has a git integration that makes this connection is very simple an example piece: try { $jasper = new Adl\Integration\RequestJasper(); /* To…
-
0
votes2
answers188
viewsA: script.vbe - encrypted virus
well I created a.vbs script with snippets of this malicious script. Wscript.Echo Chr(104) & Chr(116) & Chr(116) & Chr(112) & Chr(115) & Chr(58) & Chr(47) & Chr(47) &…
-
1
votes2
answers188
viewsQ: script.vbe - encrypted virus
I received a.rar file and inside had a.vbe file I will put below, I would like if anyone has any idea what this script does, inform me, because a user of my network clicked and firefox keeps…
-
33
votes2
answers931
viewsQ: What is artificial intelligence?
What is the definition of artificial intelligence? The question at first glance seems unwilling to search around, but a read on the first links I found on Google left me with more questions than I…
artificial-intelligenceasked SneepS NinjA 7,691 -
1
votes3
answers2346
viewsA: How to find 2 or more words in a text using jQuery?
p/ do so too: var string = "manoel da silva"; string.match(/manoel|silva/); // retorna manoel pois existe string.match(/treco|silva/); // retorna silva pois existe string.match(/treco|fuleco/); //…
-
1
votes5
answers5072
viewsA: jQuery, duplicate click event
I recently discovered that I can make the click event stop propagating among other functions that are also called through the same event would be like this: $('seletor').click(function(evt){…
-
1
votes1
answer1326
viewsA: Download Blob Mysql file
php file has to look like this: include_once 'db.php'; $download = mysql_query("SELECT formResolucao FROM tbconfiguracoes"); $nome = mysql_result($download, 0, "nome"); $tipo =…
-
2
votes1
answer404
viewsA: Count in Ireport
puts a column to do the type count like this: SELECT sum(1) as contador, tbl_suspensao.`codigoBeneficiario` AS tbl_suspensao_codigoBeneficiario, tbl_suspensao.`contrato` AS tbl_suspensao_contrato,…
-
1
votes1
answer407
viewsQ: jasperserver with php
I found a lib in Git https://github.com/adlermedrado/PHP-JasperServer-Integration that allows PHP to connect with Jasperserver ( java’s ireport server ), I already use and works, but I wanted to add…
-
2
votes3
answers4509
viewsQ: Print orientation using Javascript, CSS, HTML or PHP
Is it possible for me to "pre-set" the orientation of the page, when the user is already printing is marked as landscape? (Landscape) My case is the following, I’m code similar to this example…
-
3
votes2
answers33649
viewsA: What are SQL views? What are the advantages and disadvantages of using?
I will give an example and make the considerations: mysql> CREATE TABLE t (qty INT, price INT); mysql> INSERT INTO t VALUES(3, 50); mysql> CREATE VIEW v AS SELECT qty, price, qty*price AS…
-
4
votes4
answers6626
viewsA: What SQL command shows the maximum number of active connections to the Mysql database?
What is the SQL command to display the number maximum of active connections(possible) in Mysql? select @@max_connections; @@max_connections is a global variable. Now if you wanna know how many…
-
3
votes3
answers1685
viewsA: How to handle large volumes of data in a database?
I will give a more elegant, simple and easy solution, first creating the tables: CREATE TABLE `tab_produto` ( `id_produto` int(11) NOT NULL AUTO_INCREMENT, `serial` varchar(45) DEFAULT NULL, PRIMARY…
-
4
votes3
answers767
viewsQ: Netbeans IDE: Warning Message
I have a warning message that tells me method is 23 lines and between parentheses says (20 allowed) I do not understand why this message, follows below: What does that mean? has how to disable this…
-
20
votes4
answers19928
viewsQ: strtoupper() with accents
The function strtoupper() PHP is not turning the accented letters into uppercase, see the example: echo strtoupper("virá"); // retorna VIRá Do you have any native function that solves this problem?…
-
4
votes1
answer854
viewsQ: mysql + PHP - use or not use mysqli_close()
I just noticed I’m not using the function mysqli_close() indicated on the website of PHP.NET I monitor the connections through Workbench client conections and there are open connections, my doubt is…
-
2
votes1
answer342
viewsA: Float 2 side-by-side with triangular tip
I’ll post as an answer but I don’t know if you want the white block to be hidden or to the right of the red block so anything you tell me below that I edit the answer <style> body { padding:…