71 Topics
|
|
## Introduction ## When collecting a stream, the `groupingBy()` Collector(`java.util.stream.Collector`) can be used to put data into different groups based on specified conditions. `groupingBy()` is a little bit more complicated to use than [partitioningBy()](https://www.daniweb.com/posts/jump/2280662) because the key can be of any type, whereas with `partitioningBy()`, the keys must be of … |
|
## Introduction ## `partitioningBy()` collects a `Stream` into a `Map`. In this tutorial, we will compare the two different `partitioningBy` methods and learn how to use them. ## Goals ## At the end of this tutorial, you would have learned: 1. What `Collectors.partitioningBy` does and how to use it. ## … |
|
Hi, As we know constructor doesn't have any return value so it is not good idea to perform exceptional handling inside constructor.SO i would like to know if i am opening a file inside constructor and due to some reason (file not exist) failure happened inside constructor then how to … |
|
the problem I have here is: when I input an integer it works fine, but when i input any other thing, it doesn't give me a chance to input again when the loop iterates, it just keeps printing "error type the right thing" to the screen even though "cin var" … |
|
Hi, I'm trying to create folder name (serialno) from user input (GUI) in textbox and DataMonitoring and DataControlling output files will be save in the created folder. public bool DataMonitoring(ref string returnmsg) { string folderName = String.Format(@"C:\DataOutput\{0}", serialno); String DateAndTime = DateTime.Now.ToString("yyyy-MM-dd_HH.mm.ss"); FilePath = DateAndTime + "_DataMonitoring"; } public bool … |
|
I am learing c# and confused on streams What are they?? Arey they used to store data or transfer data ?? Pls explain in very simple words |
|
import java.io.*; class ConsoleInput{ public static void main(String ss[]) throws IOException{ InputStreamReader isr=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); char c=' '; System.out.println("Enter Characters And q to Quiet"); do{ c=(char)br.read(); System.out.println(c); }while(c != 'q'); } } in upper code this line `c=(char)br.read();` get string from user at this point user enter some … |
|
I have this code. Its not the entire code because its a Blender addon with many lines that are unrelated to sockets so I give here only the part that deals with the sockets which I kept isolated from the rest of the program. def create_thread(): global threadSocket,listening threadSocket = … |
|
Hi! I'm trying to count the number of occurrences of each word in a text file. But program put in the file the first symbol of inputed word only (line 34) and don't enter in the for-statement (line 51). What should I serach for in my code in order to … |
|
Hi All, I have come across Read and write method from InputStream and outputstream but im finding it hard to understand the logic behind it. Below is a simple example which reads a jar file from input stream and writes it to output stream. Please explain the logic on how … |
|
Oh boy They ust be tired of me now. My trouble: I have two ArrayLists of custom classes. ``ArrayList<Subject>` **a**` ``ArrayList<Student>` **b**` Within those custom classes are other custom classes which themselves have primitive data types as well as an ArrayList of other custom classes. It's a big circus going … |
|
Hello, I am Marcus and i`m new on this forum. thought it would be nice to say hello and start using this forum. My website is Onchannel Movies Portal. |
|
Hai i am connect in live some problems are detected they are webcam ip address.......... my code is.... <param name="SRC" value="rtmps://59.96.238.215"> any example plz..... |
|
Have this code when the button is clicked the stream starts but when the stop button is clicked nothing happens? I want to be able to stop the stream and get the recorded Media and display it? How would i do this? Any Help Will be Great. <html> <input type="button" … |
|
I am using the following code to write to the file out1.txt: try{ FileWriter fostream = new FileWriter("out1.txt"); BufferedWriter out = new BufferedWriter(fostream); out.write("jlsdfjdlsfhsdkjf"); out.close(); }catch (Exception e){ System.err.println("Error: " + e.getMessage()); } Now i want to write to multiple files in the same code (let us say 2 files). … |
|
Need help writing a program for class. Here were the posted instructions: Step 1: The program should have a FUNCTION that displays a screen that shows which seats are available and which are taken. Seats that are taken should be represented by a # symbol and seats that are available … |
|
I'm working on a music streaming website for iPads and iPhones the website is programmed mostly with php and html. The website uses the website layout iwebkit (http://snippetspace.com/portfolio/iwebkit/). My question is how do I make box appear at the bottom of the screen that is always on the screen even … |
|
I have been told it is good to overload the stream extraction operator to load data from a file. Would I simple use this in my class: friend ifstream &operator>>( ifstream &input, Class &C ) { input >> C.variable1 >> C.variable2 >> C.variable3; return input; } What are the advantages … |
|
Hello everyone am facing an error exception SQLServerException: The TDS protocol stream is not valid Jan 19, 2013 4:21:02 PM com.microsoft.sqlserver.jdbc.TDSReader throwInvalidTDS SEVERE: ConnectionID:18 got unexpected value in TDS response at offset:1508 Jan 19, 2013 4:21:02 PM com.microsoft.sqlserver.jdbc.TDSReader throwInvalidTDS SEVERE: ConnectionID:18 got unexpected value in TDS response at offset:1451 com.microsoft.sqlserver.jdbc.SQLServerException: … |
|
Hello, In trying to port some Java code to C++ I'm disliking the std::stream's lack of copy constructors. I know exactly what the problem is, but I don't know what I can do about it. I have a dangling reference to a stream as a member variable of a class. … |
|
I want to know if it could be posible to implement a web video chat conference, without any server between?. I'm building a web portal that implements web text chat... but I want to it to have video also. Thanks |
|
I am doing a project and I need to monitor a program I run through ssh2, I need to get info while it is running but i dont know how to do that really. First this is my code (part of it): $stream = ssh2_exec($con, "make run"); $data = stream_get_contents($stream); … |
|
std::string s = "65//3"; std::istringstream indexBlock(s); for (int i = 0; i < 2; i++) { int index = 0; indexBlock >> index; std::cout << index << std::endl; } I would expect the output of the cout to be: output: 65 3 as I thought the stream iterates through the … |
|
Boolean eminem = new Boolean("yes"); What does it mean & what does it create? Thanks. |
|
public class BufferedReader { public static void main(String[] args) throws IOException { char c; BufferedReader sen = new BufferedReader (new InputStreamReader(System.in)); **// ERROR** System.out.println("Enter characters, 'q' to quit"); // read characters from the console while(c != 'q') { c = (char) sen.read(); **// ERROR** System.out.print(c); } } } I don't … |
|
Hi :) I was wondering if anyone knows of (or has created) some type of software that could synchronise video between two remote computers (not on LAN). My internet speed is too slow to stream the actual video file, so is there some way of simply streaming the position of … |
|
Hello everyone, I have question about how AudioTrack instance should be used for streaming applications. Below my code example and some brief explation about code ... /* some work before */ InputStream in = client.getInputStream(); AudioTrack output_stream = new AudioTrack(AudioManager.STREAM_MUSIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, 8192, AudioTrack.MODE_STREAM); byte[] buffer = new byte[8192]; … |
|
it show me this when i click the previw button to show the page how i can fix this? Warning: include(funck.inc.php): failed to open stream: No such file or directory in C:\xampp\htdocs\search\index.php on line 1 Warning: include(): Failed opening 'funck.inc.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\search\index.php on line 1 |
|
Hi, I am recieving these two errors when attempting to upload an image file to my server: Warning: move_uploaded_file(images/) [function.move-uploaded-file]: failed to open stream: Is a directory in }[I removed the path, this is not part of the error] on line 13 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php2bBihw' to … |
|
I am connecting to a data stream that pushes data continuously and when I tried to set up a network stream I just could not connect and kept getting the 'not found' error. I used the httpwebrequest with webrequest.keepalive = true and started to consume the data by reading into … |
The End.