Questions tagged as 'stream'

1
answer

How to use lambdas and stream?

I can understand lambdas expressions perfectly in simple cases like: () -> 42 // Não recebe nada e sempre retorna "42" x -> x*x // Recebe algo e retorna seu quadrado (x,y) -> x + y // Recebe doi...
asked by 22.06.2015 / 21:10
1
answer

Differences between getClass (), getResourceAsStream () and getClass (). getClassLoader (). getResourceAsStream ()

In need of loading a resource into my project I came across these two methods. From the choice of one of the two, there were some doubts that I would like to share here. What is the motivation or in what scenario should each be used? Is...
asked by 30.06.2015 / 14:36
1
answer

How to really understand Streams?

I've been working with C # and .NET for a while, and I've seen the use of streams for file reading, HTML response writing, file upload, and more. It turns out that until today I did not understand what a stream really is, when they should be use...
asked by 07.02.2015 / 01:24
1
answer

What is the meaning of the word "cout" in C / C ++?

Well, it is very common in programming languages to have keywords responsible for printing output. Some are classic like echo , print , printf and write , etc. But in% w / o% we have% w / o%. For me, this word does...
asked by 15.02.2016 / 13:35
3
answers

MemoryStream vs Stream

What would be the main difference between the two? Are there any advantages to performance gain? For web use, which one is the right one? I am using to "read" an array Byte[] : private void bytetoStrem(byte[] pdf) { Stream...
asked by 05.08.2017 / 15:39
2
answers

What is stream?

In both PHP and C #, languages that I have lately used in my day to day, I have come across a common term: Stream. Whenever I hear the word Stream , the first thing that comes to mind is YouTube, among other sites, which are often called "st...
asked by 08.08.2017 / 14:10
1
answer

Stream () and parallelStreams ()

I've seen lambdas performance and streams much better than using repetition loops, so I try to use as much as possible. My question is when should I use Streams or ParallelStreams? How does this parallelism of streams occur?     
asked by 03.07.2015 / 16:49
1
answer

Are Java 8 lambdas and streams bringing more benefits beyond conciseness?

The only benefits I realize in the lambdas and streams of Java 8 are code savings and, as the case may be, better express the author's intent. Is that all? Is there any example code that uses one of these features and is it better not onl...
asked by 23.07.2017 / 16:32
0
answers

Load XML file stream into XRRichText

In my application, I get an array from bytes from an XML file. With it I create a stream , but when I try to load it and insert it into XRRichText , nothing happens. However, if I write the stream into a file on the user's compute...
asked by 04.06.2018 / 16:46
1
answer

How to print a hexadecimal value in uppercase?

I made a program in C ++ that reads a number and prints it in hexadecimal, follow the code below. #include <iostream> using namespace std; int main(void) { int n; cin>>n; cout<<hex<<n<<endl;...
asked by 30.07.2018 / 17:39