All Questions

2
answers

Send camera image to server via Retrofit

I learned to send an image of the drawable folder to my server on the network using lib Retrofit, but I am not able to send a ImageView the camera. I create a class that converts the drawable image to bytes , which it will get from...
asked on 10.11.2015 / 12:42
1
answer

How to create a system to generate hashes and be able to break without the original string?

Is there any way to break the Sha-256? Is there a mathematical process for getting a break? I need to create a program that generates several hashes and another one to break without having the original string (similar to Bitcoin), only using...
asked on 19.11.2015 / 13:24
2
answers

Div effect to show two images, half-a-half

I need to make an effect like this example : WhatIrealizedbypassingthedebugisthattwoimagesareonedivwithintheother:<divclass="box-image-differ" style="width: 620px; height: 366px;"> <img src="http://f.i.uol.com.br/folha/ilustrada/i...
asked on 23.07.2015 / 15:11
2
answers

Deleting data automatically after a certain time

Example: I have a table with three fields: id int pk, varchar name, int category The category field can receive 2 values: 1 and 2; By default always when a data is entered it will have a category 1. What I want is this. When a data is e...
asked on 27.11.2015 / 20:32
4
answers

Format 9- and 8-digit telephone numbers

I want to format phone numbers for the following formats: (XX) XXXX - XXX = 11 2222 3333 But as some new numbers come with DD + 9 digits, for example: (XX) XXXXX - XXXX = 11 22222 3333 How to format fill in empty spaces with zeros or...
asked on 18.10.2015 / 19:08
1
answer

Basic difference between Abstract Factory and Factory?

I was taking a look at the PHP Manual and saw an example implementation of the Factory pattern. Example: class Exemplo { // Método Factory parametrizado public static function factory($type) { if (include_once '...
asked on 10.09.2015 / 17:27
1
answer

Ternário reduced in PHP - Error or misinterpreted?

Looking at the manual we have this description:    'The expression (expr1)? (expr2): evaluates to expr2 if expr1 evaluates to TRUE, and expr3 if expr1 evaluates to FALSE.   Since PHP 5.3, it is possible to leave the middle part of the ternary...
asked on 23.04.2015 / 22:05
1
answer

How to run another program by python?

I'm trying to make a calculation engine in Python . For example, I have a program named engine.py , which takes an equation and returns the roots. I wanted to write another program named interface.py , which would just take the...
asked on 30.10.2015 / 14:51
2
answers

Set values or not in c ++ variables

Good evening. Should I set values in variables when creating them in C ++? An example: int x = 0; int y; What's the difference in these two cases? And what happens in memory when I initialize it with 0 and without it.     
asked on 10.12.2015 / 23:48
1
answer

What is DNX really?

Long time ago I asked here o which is the runtime environment , especially on the .Net platform. It turns out that now .Net has the DNX which is the ".Net Execution Enviroment". In practice we used DNX to run software developed with the new v...
asked on 26.09.2015 / 02:10