I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue: ` #include <iostream> #include <thread> #include <Windows.h> void myThread() { while (1) { std::cout << "hello world" << std::endl; Sleep(1000); } } int main() { std::thread t1(myThread); while (1) { std::cin.get(); } return 0; } `

Member Avatar
+0 forum 0

Hi. So I have this HTML file that tests the user's screen resolution, and plugins installed using Javascript. So when the user accesses the page it sees: (e.g.) Your current screen resolution is 1024x768 and you have the following plugins installed: Plug-in No.2- Java Deployment Toolkit 7.0.10.8 [Location: npdeployJava1.dll], Plug-in No.3- Java(TM) Platform SE 7 U1 [Location: npjp2.dll], Plug-in No.4- Microsoft Office 2003 [Location: NPOFFICE.DLL]... I also need to save this information in a file on the server. All users are having firefox or chrome. How do I do this considering javascript can't write files on the server. I also …

Member Avatar
+0 forum 0

Hi, I am quite new to C++, Currently, I'm learning how to do a problem which will take a text file of thousand most common words in the english dicatonary with another text file. After finding how many words are in said text file show the percentage of which are in that file and percentage of which that are not. I'm not too sure where to put bits of code and the algothrims and math are wrong. Any tips/help is greatly accperiated. ` `#include <iostream> `#include <string> `#include <fstream> `std::string mostCommonWords; ` `int commonWords; `int totalWords; `int totalWordsIn1000MostCommon; `using namespace …

Member Avatar
+0 forum 0

I have 9 decimal numbers in A3, i need to output them 3 at a time and I'm not sure how. EX) A3 holds '14 8 6 8 5 4 6 4 4' [INDENT]It should display[/INDENT] 14 8 6 8 5 4 6 4 4

Member Avatar
+0 forum 0

I was just about to post asking how to do this when I stumbled across the solution. All my research on the web suggests that the only way is to use stored procedures with an output parameter. Unfortunately, my queries are necessarily dynamically generated, and output parameters do not work with text commands on MySQL. (I wont go into the cause of that issue here, but it is well documented online.) I did manage to find that the class MySql.Data.MySqlClient.MySqlCommand actually contains the [ICODE]last_insert_id()[/ICODE] as a property. So I was able to write code in my datasource [ICODE]Inserted[/ICODE] event like …

Member Avatar
+1 forum 0

Hi everybody. I have a simple problem. Need send the c++ output to excel(csv->xls or xls direct) in formated data. I can send the data to excel, but i can´t format that like this: |_ col 1__|___col 2___|___col n____| row 1......|....2row 1 row 2......|....2row 2 row 3......|... 2row n What i can´t, is go to begin in col 2. My code put the data in this way. |_ col 1__|___col 2___|___col n____| row 1 row 2 row n 2row1 2row2 2rown I don´t set this pointer to next columns. If i put the data in the same "for", i can …

Member Avatar
+0 forum 0

For an assignment, I am writing a program in c++ that prompts the user for the day of the month, the weekday (numerically), the month, and the year. Then, based on that, I've got to have it output a calendar that is similar to the Unix 'cal' command. I've got the entire program written (date check, leap year, etc.). The only part I'm stuck on right now is how to actually output the calendar portion formatted. My program also currently outputs the month and year (say I type 12 for month and 1999 for year, it will output "December 1999"). …

Member Avatar
+0 forum 0

I have a program that runs a binary search tree and lists a menu of options. Two of the options are the only ones I can't seem to get to work which are saveToFile and buildFromFile. These methods include asking for a name to save as an output file (save) and asking for a name of the input file (open). Say I wanted to save a whole binary tree, nodes and all, and then be able to load that file and pick up right where I left off. Sounds easy, right? Apparently it's too hard for me hahaha. I get …

Member Avatar
+0 forum 0

I'm developing a C# application and I need to start an external console program to perform some tasks (extract files). What I need to do is to redirect the output of the console program. Code like [URL="http://stackoverflow.com/questions/415620/redirect-console-output-to-textbox-in-separate-program-c"]this one[/URL] does not work, because it raises events only when a new line is writen in the console program, but the one I use "updates" what's shown in the console window, without writting any new lines. How can I raise an event every time the text in the console is updated? Or just get the output of the console program every X seconds? …

Member Avatar
+0 forum 0

Hi guys, I have created a php file, which will takes a filename as input parameter, It will just check the extension of that filename and displays the file to the browser using phpscript. for this I used [code=php] header('Content-Disposition: inline; filename='.$filename); [/code] Everything working fine for me, but I need those files to be displayed on the center of the page. So I used Iframe to call that phpsource, check below how I am showing it in a html page. [code=php] <center> <iframe src="http://creativeblows.com/test/parse_files.php?file_name=universe.swf" width="99%" height="400" scrolling="auto"></iframe> (This file is displaying on the center to the page) <iframe src="http://creativeblows.com/test/parse_files.php?file_name=coming-soon.jpg" …

Member Avatar
+0 forum 0

[CODE]#include <iostream> #include <sstream> #include <fstream> #include <string> #include "Python.h" using namespace std; #define tP PyRun_SimpleString(pyCom.c_str()) double func(double x); int main() { //file to write numbers to ofstream file; file.open("numCache.txt"); //string for int to string conversion string temp; stringstream output; //string that is read from console string numCache; //returned number from python double retNum; double z; //python input string pyCom; Py_Initialize(); for(int a = 1; a <= 10; a++) { //int to string conversion output << a; temp = output.str(); //python activity pyCom = "x = " + temp;tP; pyCom = "print(x/5.0)";tP; //the problem lies here... getline(cin, numCache); //convert string …

Member Avatar
+0 forum 0

The End.