All Questions

2
answers

What to write in an Exception Class?

I was looking at this question in StackOverflow in How can I write custom Exceptions? and the most voted (and accepted) response was: public class MyNewException extends RuntimeException { public MyNewException(){ super();...
asked on 24.09.2015 / 21:55
2
answers

Calculate the divisors of a number in Python in a performatic way

The code I'm using is: import time def divisores(num): for i in range(1, int(num/2+1)): if num % i == 0: yield i yield num inicio = time.time() d = divisores(47587950) [print(i) for i in d] print("Fim da execuçã...
asked on 25.03.2017 / 19:32
2
answers

Convert seconds to timestamp?

I am creating a PHP script to generate a json from a webvtt caption file, I get the start and end that are in the minuto:segundo.milisegundo format or if the video is too large they come as hora:minuto:segundo.milisegundo...
asked on 05.05.2017 / 00:14
1
answer

Using EF and Dapper in the same project

I'm making a simple insert of a user class, it's taking almost 10 seconds to save the information. So I tried to find other solutions to solve my performance problem and found Dapper . My question is there any way to use the two...
asked on 05.05.2017 / 02:57
3
answers

How to make a rectangle of asterisks using for?

To resolve this exercise:    Write a program that prints a rectangle of n x m asterisks in the   which values of n and m are supplied by the user. For example,   for values of n = 5 and m = 7, the expected result is:       ******* -   *****...
asked on 27.05.2017 / 21:39
1
answer

How to check if the application shortcut exists on the Desktop, if there is no create a

I'm using Delphi XE7, I wanted to know how to check if my application already contains a shortcut on the Desktop, if in case there is no create a shortcut. From what I researched, I would have to look through the windows registry, does anyone...
asked on 04.04.2017 / 22:28
1
answer

Regex for python float validation

   r "[+ -]? \ d *.? \ d +" This regex is accepting numbers with more than one point Ex: 12.23.43 and was not to accept ...     
asked on 31.03.2017 / 18:23
1
answer

Capturing StackOverFlowException

Hello, I'm passing some problems on the server and with the application developed in MVC ... I checked that the site was restarting the application pool alone, so I went into Event Viweer and realized that the application is experiencing S...
asked on 10.05.2017 / 02:10
1
answer

Graph of total connections per second during a denial of service attack

I have a network dump (PCAP file) containing slowloris attacks: ThefollowingscriptwillshowthenumberofconnectionspersecondtoIP192.168.1.2onport80:tcpdump-qns0-A-r1.pcaphost192.168.91.5andport80|sed-une's/^\(.\{8\}\).*IP\(.*\)\.[0-9]\+>192.168...
asked on 24.05.2017 / 16:25
3
answers

Show / Hide animated information by clicking element

I would like to make a simple animation that is executed in the click event assigned to an element. This is the site that I will use this animation. Suppose my element is a circle, for example. I want it to click bigger and show some inform...
asked on 24.02.2014 / 19:55