All Questions

1
answer

Using ToUInt64 to format string is correct?

Looking for a practical way to format string I came across the following: Convert.ToUInt64(string).ToString(@"00000\-000") . Is it a good practice to use this method to format strings ? Is there a recommended way? Here...
asked on 10.08.2016 / 22:48
2
answers

Transform multidimensional array into one-dimensional

How to turn this array into PHP: array:6 [ 0 => array:1 [ "EF1A" => "00001" ] 1 => array:1 [ "EF2A" => "00001" ] 2 => array:1 [ "EF3A" => "00003" ] 3 => ar...
asked on 05.08.2016 / 16:19
2
answers

PHP Current Usage Days / Days Missing [duplicate]

I would like to know if you have a specific function or how to do it on the current working day, for example, today is the 26th day ie the 18th working day of the month and so it goes and as the month changes it starts again at zero and goes c...
asked on 26.07.2016 / 13:41
2
answers

Divide a list into n sublists

I have the following list: l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] What I need is to split this list into n sublists, in this case you can not do it manually since n is going to be dynamic.     
asked on 16.08.2016 / 23:12
2
answers

Loading libraries at runtime

Is there any contraindication in loading libraries .jar at runtime? I found this code that does this: URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class sysclass = URLClassLoader.class; try {...
asked on 28.07.2016 / 19:26
2
answers

How to define a method that receives a lambda expression?

I have a class similar to this and wanted the code it executed to be passed as a lambda expression. class T { public: double execute(); }; For example: T t; int a = 0, b = 1; t.execute([a,b]()->double{return (3*a + 5*b);}); What...
asked on 17.07.2016 / 22:48
1
answer

Encrypt App.Config

I'm trying to encrypt my connection string , which is in my app.config . After reading some forums, I saw that 2 methods need to be created: class proteger_app { public static void Criptografar() { Configuration confi...
asked on 26.07.2016 / 22:26
1
answer

Purpose of the lambda syntax in function / method

In some cases a function / method contains only one line in its scope, see the illustrative example: static int Soma(int a, int b) { return a + b; } However, the new feature in C # 6.0 which allows declaring a function / method in lam...
asked on 22.07.2016 / 19:31
1
answer

Which HTTP methods use payload?

I am monitoring the services of my company and need this information to continue.     
asked on 10.08.2016 / 20:02
1
answer

How to prevent a certain key being sent to the program several times

I'm making a calculator for year-end activity, which even works normally, as long as it does not exceed typing. For example, if you make the sum of two fractional numbers, it sums all the sum correctly, but if you accidentally enter more than on...
asked on 23.11.2016 / 16:43