All Questions

4
answers

Sort two vectors with sort ()

In an exercise of Programming Principles and Practice Using C ++ they ask to order two vectors; one of names and another of ages, and in the end they must coincide. For example: I have 2 vectors: vector<string> nombres; vector<do...
asked on 29.12.2016 / 08:36
2
answers

C # convert Control to UIElement

How can I convert a Control to UIElement in Windows forms with c # ? I'm extracting Controls from FlowLayoutPanel with Controls but I want to convert them to UIElement     
asked on 24.12.2015 / 00:24
4
answers

Center TextView

I wanted to know how to center a textview, since the title of the app is outdated to the right and not in the center of the screen,  Thank you. <TextView android:layout_width="match_parent" android:layout_height="wrap_content" a...
asked on 05.04.2016 / 15:14
2
answers

Change several Select through only one with jquery

well as the title says I need to change several select when I select one that I have as the head of the others, I'll put my example in code: //Este es el select que tiene que cambia a los otros al yo seleccionar alguna de sus opciones &...
asked on 06.01.2017 / 15:24
2
answers

How to get number of vowels in JavaScript [closed]

How can I get the number of uppercase and lowercase vowels in a variable in JavaScript. var person = new Object(); person = prompt("Introduce tus datos"); //Numero de vocales var numVocales; for (i = 0...
asked on 18.10.2017 / 14:18
2
answers

How the operator works || in this case?

This code apparently checks if a variable is true, and if not, creates the variable: (function(a){ a || (a = "Default value"); })(); Why does it only work when the defect is made with parentheses? , I mean: (a = "Default value") Also,...
asked on 15.12.2017 / 03:21
3
answers

I do not understand the second and third principles of solid

Single Responsibility: each object must have a unique responsibility Open / Close: open for extension, closed before changes Liskov Substitution: daughter classes should be able to be treated as parent classes Segregation interface: many i...
asked on 12.11.2016 / 03:02
3
answers

Error creating thread in c ++

I'm trying to create a thread in c ++, but my code does not compile. void Programa::ordenUnoParelelismo() { std::cout << "<<-- ALGORITMO UNO PARALELISMO -->>" << std::endl; int hilos = intInput("Ingrese numero d...
asked on 08.12.2017 / 12:55
4
answers

Count Within an Array

I want to tell only one type of product, which is the best way to do it, Example I want you to print the number of "ORANGE" = 2 and not the whole array: var fruits = ["Banana", "Orange", "Apple", "Mango","Orange"]; fruits.length; console.log...
asked on 30.07.2018 / 18:15
2
answers

Go through Object, filter by field and do javascript push

I have the following object, for example: { "name":"false", "var_RadiacionGlobalInt":true, "var_CO2InvVaisala":true, "var_RadiacionExt":false, "var_VVExt":false } I would need to go through that object and the elements that are true to add...
asked on 25.07.2018 / 18:38