All Questions

2
answers

How to add Cardboard Mask?

I have a problem to re-adapt this function in JS. function mcc(v){ v=v.replace(/\D/g,""); v=v.replace(/^(\d{4})(\d)/g,"$1 $2"); v=v.replace(/^(\d{4})\s(\d{4})(\d)/g,"$1 $2 $3"); v=v.replace(/^(\d{4})\s(\d{4})\s(\d{4})(\d)/g,"$1 $2 $3 $4"); ret...
asked on 25.11.2016 / 16:46
1
answer

Why String objects are immutable?

Up to the most recent stable version, Java 8, objects of type String are immutable. That is, any change in a String causes the creation of a new object String . Is not this harmful from a performance standpoint? What wa...
asked on 10.11.2016 / 18:28
1
answer

How to insert dynamically into a std :: array?

I'm migrating from C language to C ++, and I want to stop using traditional C language media as the vector of it. Is it possible to use std::array to insert elements dynamically as in std::vector ?     
asked on 08.11.2016 / 15:52
1
answer

Makefile: what is it, and what is the purpose?

I want to stop using IDE, and a friend advised me to use a Makefile for my programs, then: What is Makefile? What is your purpose?
asked on 21.09.2016 / 18:12
4
answers

How to save line breaks from a textarea to the database? [duplicate]

I have textarea and would like to save the line breaks made by the user in the database. For example , the user writes the following: "Lorem Ipsum. Is simply. Dummy text. Of the printing. And typesetting." But in the database, i...
asked on 06.01.2017 / 20:08
1
answer

Start structure pointer with an address?

I would like to know if it is possible to start this pointer type structure with an address, without needing to point to another variable, or allocate memory. typedef struct{ char nome[20]; int idade; }pessoa; pessoa leonardo; pess...
asked on 28.09.2016 / 15:09
2
answers

index with dotted width 100%

In CSS, how can I make an index equal to Word taking 100% of the width of the container and using dots to separate the "title" from the "page number"? Type: Goals - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -20 Met...
asked on 14.11.2016 / 14:24
2
answers

What's the difference between using GDS32.dll and fbclient.dll, and between the .fdb and .GDB extension in Firebird?

Speaking of SGDB Firebird , when using GDS32.dll library, out of compatibility with banks created by Interbase , are there other differences when using fbclient.dll ? Is there a difference between creating b...
asked on 23.04.2014 / 16:11
1
answer

How does pointer to function work in PHP?

In C you can use function pointers to reference other functions, see an example: int somar(int a, int b) { return a + b; } int (*sPtr)(int,int); int main(void) { sPtr = &somar; int r = sPtr(10, 5); printf("Soma: %i",...
asked on 17.01.2017 / 17:39
1
answer

How to use contents of a vector to assemble the name of a file to be saved?

I have tried to use colnames() , names() and nothing works. My data is something like (however, I have 38,000 names and 38,000 columns): nomes <- c("nome105", "outro.nome_26", "qualquerCoisa") dados <- as.data.frame(matri...
asked on 10.05.2016 / 21:19