All Questions

1
answer

Dependency injection in .Net Web API project 2

I'm involved in a project that is developing a .Net Web API 2 Fw 4.51 application (with a view to future migration to .Net Core , which is an 'aggravating'), Fluent NHibernate e PostgreSQL , and we're choosing a IoC con...
asked on 27.08.2016 / 12:55
1
answer

Chat Client-Server Application with Sockets not working

I'm doing a project and I got to the part of the communication between the server and the client and I did not get the output I wanted (output image intended). The goal is for the server and client to communicate with each other. That is, to...
asked on 24.11.2015 / 23:50
4
answers

What is the best way to pass values to the attributes

I'm studying object-oriented programming. I am very fascinated as this new world. But now a question has arisen. I believe you can help me. I'm making a Person class, which has the attributes, age, and gender attributes. But this class wil...
asked on 26.08.2015 / 22:26
1
answer

Can you optimize this code?

Can you optimize this code to make it faster? if (strpos($qt, "blood") !== FALSE){ if (preg_match("/^blood (?<blood>.+)$/", $qt, $match)){ switch ($match['blood']) { case "a+": $result = "A+"; $sndline = "Id...
asked on 13.05.2015 / 02:06
1
answer

Problem with logic when using LEFT JOIN

In my system, there is a system of postings and another system of friendships. Here is the structure of the tables: posts : id | usuario | conteudo | data | hora Friendships : id | usuario1 | usuario2 | status And I'm us...
asked on 21.11.2015 / 16:50
2
answers

How to capture the first letter of a String name and if the letter is 'C' save the name in a vector?

I have an algorithm that reads a name from any person and if the name starts with the letter "C" it should capture the name and save it to the vector. I've tried every way but I can not do it. public static void main(String[] args) { Stri...
asked on 19.01.2016 / 15:35
1
answer

Socket Multi Thread Server - Java Server and Client in C ++

I have to develop a Mini Socket Multi Thread Server (college work) in Java and I need to make a Client in C, for example, it can be in any language, but I chose those two. How do I send the values from the Client to the Server? For example...
asked on 15.05.2015 / 20:29
1
answer

How to do webscrapping from an https using rvest?

I'd like to scrape a page that is on https using the rvest package. However, this is a site with security certificate issues. In these cases, you need to turn off SSL verification - but I do not know how to do this in that package. No...
asked on 16.12.2015 / 17:00
2
answers

How to import an xls file into Python?

I'm starting my studies in Python and would like to import a database that is in .xls to Python. Could someone help me? NOTE: Python version 3.4.3.     
asked on 08.04.2015 / 00:06
2
answers

Path between 2 nodes of a graph using a smaller number of colored edges

I'm trying to solve this programming problem. In short, the problem describes several bus lines as an undirected graph and says that the passage of a bus costs 1 real. Can anyone give me a hint how can I get the lowest cost in Reals that ex...
asked on 26.10.2015 / 13:18