Name an application to stream audio (from files and/or mic) from pc to multiple android devices

I was working on a project to make mini radio for kids. We will be in a place with no service so streaming audio over internet is not an option. So I brought 3 routers and connected them together and I want to stream audio from my pc over the wifi network. in short I need the receivers to type an IP in the application to receive my stream.

p.s. I found a great app called soundwire, it does stream audio from an app on pc over the LAN to android devices; however, it can stream to only one device. I need to stream to more than 35 devices.

Accidentally overwrote all of Windows 10 when installing Ubuntu 15.10. How do I recover the files?

I was going to try Ubuntu on an external USB drive without installing it, which worked using the *try Ubuntu* option. Then, after trying Ubuntu for a while, I thought I would install Ubuntu on the thumb drive.

The problem is that I thought it would install on the thumb drive, but it installed on the main drive C:, which was currently in use by Windows 10 and everything on the computer.

So now I was wondering: How can I recover the files? And will Windows be the full version, or will I get this Install Windows watermark?

Split tile based map file into multiple files

I have a gigantic map file (1440×1080) that I wish to split into smaller files (45×45) for faster client reading. I plan to split offline (when running DEV server) so I am not too worried about speed. Picture the below as my source file:

5, 5, 5, 4, 5, 6, 5... 5 ... 5, 6, 2, 44, 5, 66, 5... 5 

I am getting the file to be slightly off towards the end – having trouble doing the math I suppose. I am totally open to changing the code, but here is what I had so far:

int filesAcross = mapWidth / 45; int acrossCount = 0; int filesDown = mapHeight / 45; int downCount = 0; int totalFileCount = filesAcross * filesDown;  //create a bunch of stringbuilder holders to split the large file into StringBuilder[] sbGroundLayerHolders = new StringBuilder[totalFileCount]; for (int kk = 0; kk < totalFileCount; kk++) {     sbGroundLayerHolders[kk] = new StringBuilder(); }  int countt = 0; while(scanner.hasNext()){     int fileCounter = (acrossCount / 45) + ((downCount / 45) * filesAcross);     //  LOGGER.info("fileCounter: " + fileCounter + "   acrossCount: " + acrossCount +      //"   downCount: " + downCount + "   countt: " + countt);     try {         sbGroundLayerHolders[fileCounter].append(scanner.nextShort());         sbGroundLayerHolders[fileCounter].append(",");         acrossCount++;          countt++;     } catch (InputMismatchException e){         scanner.nextLine();         downCount++;         acrossCount = 0;          countt++;     } catch (ArrayIndexOutOfBoundsException e){         LOGGER.fatal("Array Out of Bounds on ground Layer - count:" + countt, e);         System.exit(1);     } }  //write array contents into files for (int kk = 0; kk < totalFileCount; kk++) {     String s = sbGroundLayerHolders[kk].toString();     s = s.substring(0, s.length() - 1);     String[] sSplit = s.split(",");      StringBuilder q = new StringBuilder();     for (int jj = 0; jj < sSplit.length; jj++) {         q.append(sSplit[jj]);          if (((jj+1) % 45) == 0 && jj != 0) {             q.append(System.lineSeparator());         } else {             q.append(",");         }     }      LOGGER.info("map string(" + kk + "): " + q);     //createFileLocally(folderPath, filename, text); } 

Here is a sample image of what I want to do (smaller scale). Start with the big grid 6×6 and split into files 2×2.

enter image description here

Some .m4a file(s) showing duration 0:0 while they have size of some KB and MBs

I have an issue while reading duration of .m4a file using C# its showing me 0.0 duration while its size is more than 1600 Kb can anyone guide me about what the actual reason of this type of file. in the same code some m4a files calculate the correct duration. and some of them not. here is my code that i m trying ShellFile so = ShellFile.FromFilePath(fromPath); double nanoseconds; double.TryParse(so.Properties.System.Media.Duration.Value.ToString(), out nanoseconds); Console.WriteLine(“NanaoSeconds: {0}”, nanoseconds); if (nanoseconds > 0) { // double milliseconds = nanoseconds * 0.000001; double seconds = Convert100NanosecondsToMilliseconds(nanoseconds) / 1000; string duration= Convert.ToInt64(seconds) / 60 + “:” + Convert.ToInt64(seconds) % 60; Console.WriteLine(duration.ToString()); }

Code to read and write CSV files

Below is my code that 1) writes a CSV file with three columns of integer data (plus column names on the first line) and 2) reads the CSV file. I’m new to C++ and would appreciate some code review.

Also, I’m bothered by the fact that my technique requires all of the data to be integers. I’d appreciate advice on how I could generalize this code to write/read data with a mix of integers, doubles, strings, etc.

#include <string>    // std::string #include <fstream>   // std::ofstream, std::ifstream #include <vector>    // std::vector #include <utility>   // std::pair #include <stdexcept> // std::runtime_error #include <sstream>   // std::stringstream #include <iostream>  // std::cout, std::cin  void write_csv(std::string filename, std::vector<std::pair<std::string, std::vector<int>>> dataset){     // Make a CSV file with one or more columns of integer values     // Each column of data is represented by the pair <column name, column data>     //   as std::pair<std::string, std::vector<int>>     // The dataset is represented as a vector of these columns     // Note that all columns should be the same size      // Create an output filestream object     std::ofstream myFile(filename);      // Send column names to the stream     for(int j = 0; j < dataset.size(); ++j)     {         myFile << dataset.at(j).first;         if(j != dataset.size() - 1) myFile << ","; // No comma at end of line     }     myFile << "\n";      // Send data to the stream     for(int i = 0; i < dataset.at(0).second.size(); ++i)     {         for(int j = 0; j < dataset.size(); ++j)         {             myFile << dataset.at(j).second.at(i);             if(j != dataset.size() - 1) myFile << ","; // No comma at end of line         }         myFile << "\n";     }      // Close the file     myFile.close(); }  std::vector<std::pair<std::string, std::vector<int>>> read_csv(std::string filename){     // Reads a CSV file into a vector of <string, vector<int>> pairs where     // each pair represents <column name, column values>      // Create a vector of <string, int vector> pairs to store the result     std::vector<std::pair<std::string, std::vector<int>>> result;      // Create an input filestream     std::ifstream myFile(filename);      // Make sure the file is open     if(!myFile.is_open()) throw std::runtime_error("Could not open file");      // Helper vars     std::string line, colname;     int val;      // Read the column names     if(myFile.good())     {         // Extract the first line in the file         std::getline(myFile, line);          // Create a stringstream from line         std::stringstream ss(line);          // Extract each column name         while(std::getline(ss, colname, ',')){              // Initialize and add <colname, int vector> pairs to result             result.push_back({colname, std::vector<int> {}});         }     }      // Read data, line by line     while(std::getline(myFile, line))     {         // Create a stringstream of the current line         std::stringstream ss(line);          // Keep track of the current column index         int colIdx = 0;          // Extract each integer         while(ss >> val){              // Add the current integer to the 'colIdx' column's values vector             result.at(colIdx).second.push_back(val);              // If the next token is a comma, ignore it and move on             if(ss.peek() == ',') ss.ignore();              // Increment the column index             colIdx++;         }     }      // Close file     myFile.close();      return result; }  int main() { //    // Make three vectors, each of length N filled with 1s, 2s, and 3s     int N = 1000;     std::vector<int> vec1(N, 1);     std::vector<int> vec2(N, 2);     std::vector<int> vec3(N, 3);      // Wrap into a vector     std::vector<std::pair<std::string, std::vector<int>>> vals = {{"One", vec1}, {"Two", vec2}, {"Three", vec3}};      // Write the vector to CSV     write_csv("three_cols.csv", vals);      // Read three_cols.csv     std::vector<std::pair<std::string, std::vector<int>>> three_cols = read_csv("three_cols.csv");      // Print row and column counts to check if this was successful     std::cout << "Rows: " << three_cols.at(0).second.size() << ", Columns: " << three_cols.size() << std::endl;      return 0; } 

Save data from multiple Qt components scattered around multiple QML files

I would like to save the current “value” property of several components (e.g. a Slider) as a configuration profile when the user clicks on the Save button in my application. However, the Save button is in a different file than the rest of the components. How should I deal with this? Some solutions that I have thought:

  1. do a two-way binding between the “value” property of the component and a role in my model (by using Binding)
  2. reference every component by ID, even if they are in different QML files, in the onClicked handler in my Save button and save the data to the model
  3. make onClicked in my Save button to emit a signal that will be “caught” in every QML file, making the components commit their value to my model

Am I on the right track here?

Finding and comparing data from two excel files

I need to compare time shifts in two excel files after identifying the corresponding user. The files look something like this

enter image description here

and

enter image description here

The User ID for Name1 Surname1 in the first file is 35.

In the second, User ID is 56 and is always preceded by #.

After verifying that Name1 Surname1 (1st) is the same with Surname1,Name1 (2nd), I should be able to build a correspondence table between User ID-s in both tables, ie 35 <- 56, which will not change.

User ID in the 2nd is in G76, and the IN and OUT times for that user are in AR80 and BT80, always 4 rows down, always AR and BT columns.

At this point I need to compare ShiftStartTime and ShiftEndTime in the 1st with IN and OUT in the 2nd, to set out differences.

The way I was thinking about this was to look for Surname1,Name1 #56 in col G of the 2nd file to find the row, and then get IN OUT to compare the times.

Question. Is a Macro in Excel VBA capable of doing all this, and can someone give an example of what the code might look like.