All Questions

2
answers

Detect when a form is sent

How can I detect when a form is submitted with pure Javascript? It would be the equivalent of this in jQuery $('#form').submit(function(event){ alert('Meu callback'); event.preventDefault(); }); I was detecting when the user clicked on...
asked on 11.08.2014 / 00:24
2
answers

Hibernate is considered white box or black box?

As far as I understand the frameworks, Black box are known for their ease of use since it is not necessary to understand what goes on inside it to use, and the white box > otherwise, a knowledge of the framework's internal framework is requi...
asked on 25.06.2016 / 22:33
1
answer

How to implement timeout on recv () in socket.h

I'm wondering if there is any function to put a timeout together with recv () using Socket.h . Code sample: // Variaveis UINT in_socket_handler; struct sockaddr_in server; // Cria o Socket in_socket_handler =...
asked on 02.08.2016 / 22:02
3
answers

Send file and text via jquery asp.net mvc

Personal I was able to send the file through this code: var jqXHRData = null; $(function () { $('.progress').progress({ percent: 0 }); $("#divUpload").on('click', function () {...
asked on 28.06.2016 / 01:14
1
answer

How to order hours

I have the following method to sort a% String of Hours String: public static void ordenaHoras() { ArrayList<String> horasList = new ArrayList<String>(); horasList.add("23:45"); horasList.add("11:13");...
asked on 09.06.2016 / 23:01
1
answer

Load Combobox from a List

I am trying to load items into a ComboBox from a List<> , it worked fine however, later I would need to get the code for the selected item, but it is not working. The code to load ComboBox is this: private void frm...
asked on 14.08.2016 / 17:51
2
answers

Crop image with JS

You can use JCrop or some other library to crop image, but I set a default size? Who can just move the square over the image? I tried to use JCrop but the user is the one who defines the size that wants to crop the image.     
asked on 14.06.2014 / 17:37
1
answer

How to get attributes from an option field with jQuery

I have the following code: <select name='exemplo' id='exemplo'> <option value='1' class='teste' dado='a'>1</option> <option value='2' class='teste' dado='b'>4</option> <option value='3' class='teste...
asked on 10.08.2016 / 16:48
1
answer

C # IF Simplification

I have this code, and I have been looking for a way to simplify it using a ternary operator, but I can not because it says I can not use decimal in string: decimal per; if (nud_qtPedida.Value != 0) per = nud_qtFornecida.Value * 100 / nud_qt...
asked on 20.05.2016 / 11:28
3
answers

Is there a limit or restriction on variable name sizes?

When I started programming it was said to be a good practice to abbreviate variable names to shorten their size. However, I have been researching and seeing recently that this concept has changed. And today in many tutorials the examples come...
asked on 22.08.2016 / 15:28