All Questions

1
answer

Count sequences of 1 within vector in R

I would like to know how to count sequences of 1 within a vector containing only 0 and 1. For example, in the x <- c(1, 1, 0, 0, 1, 0, 1, 1) vector, the count would give the (2, 1, 2) vector, which counts the sequence of 2 "1",...
asked on 12.11.2017 / 01:24
3
answers

Line with NULL value is disregarded by SUM function?

I participated in the IFNMG competition, a test prepared by the CEFET Foundation. I solved the following question and I marked the letter C, but the template says that the correct one is the letter A. Question 31 Note that the NotaFiscalIte...
asked on 17.12.2018 / 18:07
3
answers

How to "create" a variable in "runtime"?

I'm doing a project that implements a Python style console. It has several functions, it has many things. But I need to implement a command called set . set would declare a string and set its value as the user defined it. class V...
asked on 03.02.2014 / 19:47
2
answers

Is a View faster than a regular Query?

When I use a query of type SELECT * FROM myView is faster than SELECT * FROM (query para gerar a view acima) I have a query and I would like to cache it or make it faster, but I am in doubt if I create with View or Query !     
asked on 17.10.2017 / 04:51
2
answers

Why does Kotlin use a form of declaring functions and variables different from "traditional"?

Traditionally the return type and variable type are indicated at the beginning, before the name: public int soma(int a, int b){ return a + b; } In Kotlin it is indicated after: fun sum(a: Int, b: Int): Int { return a + b } What...
asked on 08.08.2017 / 17:27
3
answers

Change the input background populated by Chrome autocomplete

I'm creating a form, and as everyone knows, the browser has the "autocomplete" option, so far so good, but I came across the following situation: p> Asyoucanseeintheimageabove,thefieldthatwasfilledinautomatically,hastheyellowbackgroundandwe...
asked on 19.11.2017 / 14:55
2
answers

How to use Packages in Laravel 4?

I am new to the Laravel 4 framework. In Laravel 3 it was simple to use Bundles. In version 4 it was removed the use of the Bundles and started to use Packages, but I did not understand how it is used, even seeing in the documentation. For exampl...
asked on 13.12.2013 / 17:38
1
answer

Problem with Background Html / Css

I created a id in css with a background. When I put div in html the background becomes beauty, but when I put a <form> , the part it occupies becomes white. Note:whenIputboldtextinit,too.HowcanIresolvethis? Here's an...
asked on 19.03.2014 / 13:20
2
answers

How to multiply in Python without the multiplication operator?

I have a task and I am having difficulty completing it. What I did was this: m= int(input('Digite o primeiro fator:')) n= int(input('Digite o segundo fator:')) def multiplica(numero): while m > 0: print (n + multiplica (m-1) n)...
asked on 16.05.2018 / 14:59
2
answers

Lazy Loading EF Core, load daughter entities and subfiles?

I have a Web Api that I am developing using DotNet Core and EF Cor but it has Lazy Loading active, but in some cases I need to load daughters entities and daughters of daughters , I created a generic repository to...
asked on 27.02.2018 / 14:13