All Questions

3
answers

How to reuse event code?

I have events that when pressing different keys perform some actions but I need to use this thing in more than one form , how can I do this? I found the issue of inheritance in C # Windows Forms a little complicated. An example that I use...
asked on 16.07.2016 / 22:04
3
answers

How to remove the first element from a list in python?

I have the following code: At the command line > teste.py primeiro segundo In the script teste.py : import sys print(sys.argv) And I have the following return: ['c:\teste.py', 'primeiro', 'segundo'] But I would like t...
asked on 05.02.2015 / 15:21
2
answers

How to get Date in the format day, month, year and time with JQuery

I have a code snippet that I can get the date and time, but the date is in the format Mês/Dia/Ano followed by the time, but I need the format Dia/Mês/Ano followed by the time, I already tried to change the form but it was incorrect...
asked on 08.04.2015 / 14:57
2
answers

Cast problem in a generic method that receives an enum's array (enum [])

I want to make a generic method that gets a enum[] and returns a string representing the comma-separated array items. public static string ToSeparatedCommaString<T>(T[] enums) where T : struct, IComparable, IFormattable, I...
asked on 07.04.2015 / 18:27
3
answers

How to validate an input?

I have a form that sends the values entered in input to another page. I want to make a validation between the inputs, if one number is greater than another, and if not, do not go to the second page and warn with alert . Here is m...
asked on 12.01.2015 / 12:16
1
answer

Parameter of any type in method

I am building a method and would like it to extend to any type. For now I am using string but I would like it to work for int , float , double and datetime . public static bool isNotNull(string AnyTypeValue) //...
asked on 07.04.2015 / 20:01
2
answers

How to get all the paths of a JTree?

How can I get all the paths of a JTree including the nodes that have parents other than root? root exemplo1 exemplo1.1 exemplo2 exemplo2.1 If I do something like this: for(int i = 0; i< tree.getRowCount(); i++){...
asked on 18.12.2014 / 14:52
1
answer

Doubt between Any and All in a lambda expression in a list

In a list, I have 12 records (hypothetical) and there is a field called ValorCampoFlag , where this field receives 1 or null , for example. If I do a validation on it and the result if there is at least one with a value of 1, should...
asked on 12.02.2015 / 13:30
2
answers

Why an anonymous method can not be assigned to a var or dynamic?

The following code: var mostra = delegate(string x) { Console.WriteLine(x); }; mostra("teste"); Should .Net not identify var as Action<string> ? And the same pro dynamic ?     
asked on 22.03.2015 / 04:36
2
answers

How to move one element to the other's position with JQuery?

I have an element and want it when the user hover over it, it should go to the position of another element. For example: I have the element A and I have the element B , when the user moves the mouse in the A element, I nee...
asked on 13.02.2015 / 18:29