All Questions

2
answers

Theoretical doubt - Interface, single responsibility

Presentation: I created a class fotografia.cs that should be responsible for: Calculate the angle of view of the lens; Lens zoom (in mm) Receive the cut factor (value multiplied by the zoom of the lens shows the actual lens value)...
asked on 24.03.2014 / 14:52
1
answer

Use Cookies or Database?

I need to create a cart where I store more than one Example: ID_PRODUTO , ID_VENDEDOR I would like to use Cookies pro system to be lighter, however I found a big problem, Cookie stores the data in 1 line:    COOKIE VALUE =   ...
asked on 15.03.2014 / 23:52
2
answers

How do I get a random string from a list of strings?

Code: nomes = new string[5]; nomes[0] = "José"; nomes[1] = "Carlos"; nomes[2] = "João"; nomes[3] = "Miriam"; nomes[4] = "Estela"; I put an array, but it does not have to be array, it can be with list or something else that gets fas...
asked on 30.05.2014 / 15:46
2
answers

How to organize the codes in AngularJS?

I have several modules with AngularJS angular.module('modulo1', ['ngTable']); angular.module('modulo2', ['ngTable']); angular.module('modulo3', ['ngTable']); window.app = angular.module("app", ['ngRoute','modulo1','modulo2','modulo3']); A...
asked on 13.08.2014 / 05:07
2
answers

In Python, is there any rule or advantage over using 'Self'?

Consider the examples below: Example 1: > class PrintText(): > def __init__(self): > text = 'Funciona!' > self.printa(text) > > def printa(self, text): > print(text) Example 2...
asked on 09.07.2014 / 17:38
2
answers

When to use instance variables vs parameters?

Assuming that a A class uses a B class (directly or through a C interface to decouple A from C ). Making it clear that A and B are independent parts, ie , the relationship between the two classes is...
asked on 05.03.2014 / 05:31
1
answer

How to declare constants in R

When I was playing the example of the " How to transform a string in Date format in R? " the command tab<-readHTMLTable(u,header=T,skip.rows=1) failed. The error happened because in my environment it is natural to assign the T val...
asked on 06.03.2014 / 15:46
1
answer

Crawl navigation with unique page analytics that has JavaScript navigation

I recently created a personal page and would like to track the most visited areas of the site. The problem is that the page is made up of a single file (ex: index.html) and navigation is all done in JavaScript, that is, the page loads only onc...
asked on 12.03.2014 / 14:17
2
answers

Delete rows containing NA in a data frame

I have a date frame and in the fourth column there are several NA cells. I would like to know how I can delete all lines that have NA. I used this command but they keep showing up dataframe1 r <- with(dataframe1, which(dataframe1[4]==NA, ar...
asked on 28.05.2014 / 00:51
2
answers

"Variable system" with regular expressions

I have a file something like this: %usuario: 'Anônimo' Olá <b>%{usuario}</b> (This is just an example and is not the real case), but I think if I were to explain the real problem it would give me a lot more work to understand, s...
asked on 11.04.2014 / 16:46