Posts by Grégori Sória • 816 points
20 posts
-
0
votes1
answer54
viewsA: Android - Webview click Error Calling method on Npobject
I did it. webview creates a thread that loses access to the parent class MainActivity. So I had to override the parent thread and call it. I just modified the method code showMenu()…
-
0
votes1
answer54
viewsQ: Android - Webview click Error Calling method on Npobject
I’m trying to perform an action in the Android app by clicking an html element in the webview. When clicking on the element, the event is activated but the following error occurs in the alert(err)…
-
1
votes1
answer394
viewsQ: While capturing screen error occurs: Raised Exception class Eoutofresources with message
I am using Embarcadero RAD Studio 2010 Delphi. I was doing tests to capture the screen images of other computers via sockets. Then I came across an error while capturing the screen and turning to…
delphiasked Grégori Sória 816 -
-3
votes2
answers364
viewsA: How to block a website with Delphi, vbs or msdos?
Solution in VBS. Make a copy of hosts and then replace it. WebsitesToBlock = Array("twitter.com", "www.youtube.com", www.facebook.com") If WScript.Arguments.length =0 Then Set objShell =…
-
4
votes2
answers364
viewsQ: How to block a website with Delphi, vbs or msdos?
I have a user control and monitoring system and would like to block a site using Delphi or even MSDOS or vbs commands, or even using Sockets(I don’t know if it’s possible)? What I have so far is…
-
4
votes1
answer295
viewsQ: Virus decryption - vbscript
Option Explicit On Error Resume Next dim rbs309 dim tadjakmnmfrg4460 dim icsnvk206 dim wsmp1276 dim falkal1610 dim rfqgobyeyrp5319 dim gtxhgi5556 dim mll8810 dim qxat8709 dim hgurgqrv3280 dim…
-
1
votes1
answer52
viewsA: Catch <a> tag click event when it hasn’t loaded yet in $(Document). ready MVC - RAZOR
This code does what you asked. But..... it will only "execute" the command of click after loading the page. That is, it will only run it after it has been loaded. $(document).ready(function() {…
-
3
votes2
answers210
viewsA: In PHP what does this <?= ? > tag represent?
This Directive also affects the abbreviated form <?= previous to PHP 5.4.0, which is the same as <? echo. This abbreviation requires short_open_tag to be active. Since PHP 5.4.0, <?= is…
phpanswered Grégori Sória 816 -
2
votes1
answer53
viewsA: Returning the number of spaces in a String
Use this php function that returns an integer with the amount: http://php.net/manual/en/function.substr-count.php echo substr_count("oi tudo bem?"," "); Will show: 2…
phpanswered Grégori Sória 816 -
0
votes1
answer983
viewsA: Group clicks into "more" and "less" buttons to make fewer requests in a row
Look... I’m not very experienced... ugly but functional code. I might find a bug. Thank you who gives some hint too. var cont = 0; $("#aumentaQuantidade").click(function() { cont = 0;…
-
6
votes3
answers1074
viewsA: Add a comma to each word
str_replace(" ", ", ", $descricao); Whenever I find a space ( ' ' ), I replace it with a comma plus space ( ', ' )
phpanswered Grégori Sória 816 -
1
votes2
answers190
viewsA: simpels problem with Vector and Structs
This way you are doing the assignment, it is only possible in the variable declaration. (or if you make a Function for it). The first error is because you cannot assign a value like this in the C…
-
2
votes5
answers1793
viewsA: Login system with PHP
I recommend studying also in MD5 (or SHA1 as our friend @Bia mentioned). Also look over Login Validation by Sessions. And if you want, take a look at SQL Inject to learn a little more about the…
-
1
votes3
answers306
viewsA: Javascript: Retrieve text from an Option
Instead of: this.firstChild.nodeValue Write: this.options[this.selectedIndex].innerHTML The code will look like this: window.onload=function(){ var form = document.getElementsByTagName("form")[0];…
javascriptanswered Grégori Sória 816 -
34
votes9
answers34793
viewsA: Input type="password" with password display eye
Using jquery, do the following: $( "#olho" ).mousedown(function() { $("#senha").attr("type", "text"); }); $( "#olho" ).mouseup(function() { $("#senha").attr("type", "password"); }); Complete…
-
2
votes2
answers1348
viewsA: How to show the largest number typed, using functions?
#include <iostream> using namespace std; int main() { int cont, maior1 = 0; do { cout << "digite um valor: "; cin >> cont; maior1 = maior(cont,maior1); }while (cont != -1); cout…
-
0
votes1
answer1208
viewsA: Add textbox values when leaving the field
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void fazOqVcQuer() { try { label1.Text = (Convert.ToDecimal(textBox1.Text) + Convert.ToDecimal(textBox2.Text) +…
c#answered Grégori Sória 816 -
1
votes1
answer215
viewsQ: C# set a condition for a column value in a Datagridview with Datasource
I’m using VS2013 Entity 5. The situation is as follows: In a table of Sons, there is an attribute sexFile that receives the value 0, 1. 0 for male and 1 for female. (could use "m" or "f", but it is…
-
1
votes1
answer45
viewsQ: Concatenation of a Select field into the ADDTIME function
"SELECT at.codigoTurma, " "ADDTIME(t.horaInicioCurso, '00:01:00'), " "t.toleranciaCurso, " "t.horaFinalCurso " "FROM AlunosTurmas at " "INNER JOIN Turmas t " "ON t.codigoTurma = at.codigoTurma "…
-
1
votes1
answer526
viewsQ: How to use a C++ API?
I’ve been researching several websites that explain how to use an API, but for some reason I’m doing it wrong. I would like to know how to use the WM_PASTE Windows API to block Mouse Paste(Ctrl+v)…