71 Topics

Member Avatar for
Member Avatar for dimitrilc

## 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 …

2
102
Member Avatar for dimitrilc

## 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. ## …

3
197
Member Avatar for can-mohan

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 …

Member Avatar for can-mohan
0
381
Member Avatar for samson.dadson.3_1

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" …

Member Avatar for samson.dadson.3_1
0
2K
Member Avatar for analys

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 …

Member Avatar for JOSheaIV
-1
305
Member Avatar for Prateek_2

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

Member Avatar for JOSheaIV
0
195
Member Avatar for moaz.amin.37

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 …

Member Avatar for JamesCherrill
0
261
Member Avatar for thekilon

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 = …

Member Avatar for thekilon
0
2K
Member Avatar for Auroch

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 …

Member Avatar for Auroch
0
252
Member Avatar for murali2489

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 …

Member Avatar for JamesCherrill
0
304
Member Avatar for CoilFyzx

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 …

Member Avatar for JamesCherrill
0
562
Member Avatar for marcustv

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.

Member Avatar for marcustv
0
295
Member Avatar for Joseph_8

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.....

Member Avatar for diafol
0
197
Member Avatar for krish.chand.96

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" …

Member Avatar for LastMitch
0
303
Member Avatar for abra_ka_dabra

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). …

Member Avatar for JamesCherrill
0
6K
Member Avatar for dmikawa

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 …

Member Avatar for tinstaafl
0
681
Member Avatar for natehome

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 …

Member Avatar for natehome
0
341
Member Avatar for Hey90

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 …

Member Avatar for deceptikon
0
430
Member Avatar for mrabrar09

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: …

Member Avatar for pritaeas
0
1K
Member Avatar for sciwizeh

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. …

Member Avatar for vijayan121
0
2K
Member Avatar for pabLOCO

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

Member Avatar for <M/>
0
145
Member Avatar for Peppercat101

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); …

Member Avatar for LastMitch
0
208
Member Avatar for jackshannon4

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 …

Member Avatar for jackshannon4
0
364
Member Avatar for sapure
Member Avatar for sapure
0
241
Member Avatar for sapure

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 …

Member Avatar for NormR1
0
193
Member Avatar for lpsarsam

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 …

Member Avatar for lpsarsam
0
265
Member Avatar for borchu

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]; …

Member Avatar for borchu
0
520
Member Avatar for andyy121

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

Member Avatar for andyy121
0
473
Member Avatar for rfrapp

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 …

Member Avatar for rfrapp
0
438
Member Avatar for maverick0612

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 …

Member Avatar for Oxiegen
0
1K

The End.