Skip to main content

All Questions

Tagged with
0 votes
0 answers
22 views

Flutter , How to form a sentence from a words that broadcasted from a websocket

Im using a websocket to make a chatbot. This is a broadcast Stream WebSocketHelper(@Named('webSocketUrl') String url) : channel = IOWebSocketChannel.connect(url) { _broadcastStream = ...
Febin Johnson's user avatar
-1 votes
1 answer
58 views

How to read from curl into a string stream in C++?

I'm working with a Web API, reading text data to be processed later. Sometimes the data is rather large, like 90 MB. I'm trying to read it into a std::stringstream, so I can get each line later into a ...
Rodrigo's user avatar
  • 4,990
1 vote
1 answer
55 views

How does the extraction operator ">>" know when to stop extraction?

The question is the same as the title, when using the extraction operator ">>" for the string " Hello World" There are 3 leading whitespace characters, and after "...
hexman100's user avatar
1 vote
1 answer
64 views

How can I effectively split text coming from a stream where the output is not necessarily new words but might be letters

so I have a stream of text which comes in where the next item coming in is the all the previously generated text + some additional text which may either be a new word, letter, or part of a word. I'm ...
skidjoe's user avatar
  • 629
-1 votes
2 answers
116 views

Java: String vs StringWriter?

If I have an array of bytes(which could be from fairly large file), which is better for constructing a String? new String(byteArr, UTF_8); vs try (final ByteArrayInputStream decompressed = new ...
HelloWorld's user avatar
0 votes
0 answers
52 views

How is the `end-of-stream iterator` Created?

I have the code that reads content of 2 files into 2 std::string variables. There is the assign member function used. There are InputIt first and InputIt last passed into it. InputIt first gets a file ...
ENIAC's user avatar
  • 891
-1 votes
3 answers
153 views

c++ function that accepts ostringstream like arguments?

Is there a way in C++ to define a function so that I could do things like this: foo( "Error on line " << iLineNumber ); foo( "name " << strName << " is ...
Marek Krzeminski's user avatar
2 votes
2 answers
101 views

How to take unknown number of string from file in C?

I have a struct storing persons' names, surnames and salaries, but the number of their names is random. For example: list.txt John Smith Green 1000 //He has two names Jennifer Wilson 2000 //She has ...
zogac's user avatar
  • 89
0 votes
1 answer
87 views

Get the same input with EOF terminator as with .empty() function

I want to get user input, and the number of characters that are given is important. I get a satisfying result with input.empty() but it terminates after I press Enter. I want it to terminate after i ...
r3k0j's user avatar
  • 187
3 votes
3 answers
3k views

Is there a way to turn input string to input stream in c++?

What I want to do is get user input from the terminal and use this input in other functions in my program. Since my functions only take input streams as arguments I want to convert the input string ...
r3k0j's user avatar
  • 187
0 votes
1 answer
375 views

Fill the stream with exact amount of bytes in C++

I've got a stream which I need to fill up to an exact size (const size_t bytes) with a text (const char * filler = "Something") multiple times until it reaches the size of bytes. Like this: ...
chuck's user avatar
  • 63
0 votes
2 answers
429 views

Print a part of stream-string?

How can I print what's after a colon like 's':, 'E':, or 'p': by giving the symbol as reference? I tried this based on all what I know so far but I get a weird error: XXXX = f"{{'stream': ...
nolimits's user avatar
0 votes
0 answers
135 views

Printing selected data in a datastream?

I want to yield '0.0' from stream2, like it works for stream1. It doesn't work and it looks all fine to me. stream1 variable contains this: {'stream': 'ABC', 'data': {'A': 'tra', 'B': 1605, 'C': 'GG', ...
nolimits's user avatar
0 votes
2 answers
942 views

i stuck in leetcode problem 151. Reverse Words in a String

Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space. Return a string of the words ...
3090_Shubham Das's user avatar
0 votes
1 answer
756 views

Node.js stops when reading from multiple Readable streams

After creating a stream (A), creating another stream (B) and reading stream (B), the reading process stops from the stream (A). How can I solve this problem? Node.js v14.18.1 import * as readline from ...
Takakiri's user avatar

15 30 50 per page
1
2 3 4 5
16