Top "Peek" questions

Refers to a non-destructive operation performed on sequential, collection-like data structures that have the notion of "top element" or "next element", such as stacks, queues and streams.

Is StreamReader.Readline() really the fastest method to count lines in a file?

While looking around for a while I found quite a few discussions on how to figure out the number of …

c# streamreader readline lines peek
Can I peek on a BufferedReader?

Is there a way to check if in BufferedReader object is something to read? Something like C++ cin.peek(). Thanks.

java bufferedreader peek
Is there any way to peek at the stdin buffer?

We know that stdin is, by default, a buffered input; the proof of that is in usage of any of …

c buffer stdin peek
pop and peek doing same in that case?

From all the sources I've read, they say - the difference between peek and pop is that peek doesn't remove …

c stack peek
Peeking in a heap in python

What is the official way of peeking in a python heap as created by the heapq libs? Right now I …

python heap peek
C++ unable to use peek() function in stack

I am trying to use the peek function in Visual Studio 2010 with these libraries: #include "stdafx.h" #include <string&…

c++ stack peek
How to code a peek method for Linked List

I am creating a linked list implementation for a stack. I've got the pop and push method done, but I …

java stack peek
java BlockingQueue does not have a blocking peek?

I have a blocking queue of objects. I want to write a thread that blocks till there is a object …

java queue peek blockingqueue
Return value of ifstream.peek() when it reaches the end of the file

I was looking at this article on Cplusplus.com, http://www.cplusplus.com/reference/iostream/istream/peek/ I'm still not …

c++ ifstream eof peek
Getting number of bytes available to read in a socket

Here's my scenario. I have a TCP client that is talking to the server. Both the server and the client …

c++ sockets recv peek