7,373 Topics
![]() | |
""" Hi i intended to list the built-in function using this function. It seems however to give me the results corresponding with a dictionary. Why is that ? """" [CODE] def showbuiltins(): """ saves the list of built in functions to a file you chose """ blist = dir(__builtins__) print … | |
The aim of the program is to read contents from 2 files and store it in struct variables.(This is actually a part of another program which stimulates pass2 of two pass assembler) [B]This code works fine.[/B] [code=c] #include<stdio.h> #include<stdlib.h> #include<string.h> struct optbl { char opco[10]; int value; }o_tbl[100]; struct symtbl … | |
Hy i Know it is not on English but could somone take a look on my code and tell me what I am doing wrong.... [CODE] #include <iostream> #include <fstream> //ukljucujemo cstring biblioteku koja omogucava napredne operacije sa stringovima #include <cstring> using namespace std; #define VELICINA 40 //fixsno definisemo vlisicinu … | |
I think that I misunderstood something about class definitions in c++... Why it is legal to define class in multiple files, like this: file Test.cpp: [CODE]#include <iostream> using namespace std; void testFunc(); class A { public: void printText(); } clA; void A::printText() { cout << "file: Test.cpp, class: A, method: … | |
I'm working with a java application and trying to modify this code so that it no longer prompts the user with the Dialog box to save a txt file. The user already uses the Dialog box to choose a directory in which to save the file at an early point … | |
[code] #include <iostream> using namespace std; using std::cerr; using std::cout; using std::endl; #include <sstream> #include <string> #include <fstream> using std::ifstream; #include <cstdlib> // for exit function // This program reads values from the file '1.txt' // and echoes them to the display until a negative value // is read. int … | |
Hello World! I'm new in the forum and I don't have too much experience with C++, I'm looking for help with my code, I hope you could help me :) I have to read from a file.txt different collumns, each of them corresponds to a parameter and store them in … | |
[code] #include <iostream> using namespace std; using std::cerr; using std::cout; using std::endl; #include <sstream> #include <string> #include <fstream> using std::ifstream; #include <cstdlib> int main() { ifstream indata; // indata is like cin char num; int sar,ri,sat,ha; sar=0;ri=0;sat=0;ha=0; char s[]=".txt"; for(int some_int=1;some_int<=3;some_int++){ ostringstream buffer; buffer <<some_int; string s1 =buffer.str(); s1+=s; indata.open(s1.c_str()); … | |
Hi all, I am trying to work out how to use the try and catch methods in Java. I am new if you havent guessed and I am wondering how I can change my code which searches for a particular user id which is inputted and when found it opens … | |
Hi there, I have a question regarding file open in C# , I have the path of the file saved in the database, what I want is when I open the open dialog button it will show the files in the path that I have saved and when the use … | |
so i am designing some software to prompt the user to enter their account number which in turn leads them to have to input their usage of ln. this then is to be displayed in a database file. i have all the code done for this. it reads in the … | |
Hi there, I have a question regarding file delete, for this I use the File.Delete() commend . as a parameter for this I send the file path. Which is “C:\\Documents and Settings\\awaduge\\My Documents\\Visual Studio 2008\\Projects\\Admin Application\\Admin Application\\Details\\P110082010112121\\Report\\Technical Sheet" And Technical Sheet is the file name. the file can be in … ![]() | |
![]() | Hi, I am using the following code to download files from the internet: [code=c]size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t written; written = fwrite(ptr, size, nmemb, stream); return written; } int main(int argc, char** argv) { FILE *downloaded_file; if ( (downloaded_file = fopen (download_path , "w" … |
hi all, i am trying to have the content of a txt file loaded in a page (which works), but this file changes on a regular basis and I need just the text to refreash, not the whole page, this is what I have... As mentioned, it correctly displayes the … | |
Hey guys I'm having a little problem with unsigned char and reading a file of integers into the array. 1. What the program is suppose to do: It's suppose to dynamically create an array of unsigned char that is the correct size to read in the array of numbers. The … | |
Hello. I have a php file with a form on it. the form has a few text fields and a few file fields. The problem is that for some weird reason the file upload fields screw everything up. After I press submit, it carries NO data to the fallowing page. … | |
Hi all, I have a code which works fine. [code=php] <?php $db = mysql_connect("localhost","root",""); mysql_select_db("test",$db); $today = date("F j, Y, g:i a"); //echo $today;exit(); $file = "test.txt"; $fp = fopen($file, "r"); $data = fread($fp, filesize($file)); fclose($fp); $output = str_replace("\t|\t", "|", $data); $output = explode("\n", $output); foreach($output as $var) { //$categories_id … | |
Hi All, Is there a way to create a HTML file generated in browser in a JSP file? This same JSP file parsed by server and show up in a browser in HTML form and also save this HTML form to a HTML file on the server. The only way … | |
Not sure if this is the best topic to post this question. We had an issue where during uploading javascripts, they became corrupt and no longer executed on the web page. Is there an automated way to detect if the uploaded files match the source file to detect corruption? We … | |
[CODE]#include <iostream> #include <fstream> using namespace std; void countWords(fstream &myText, int word); void countLines(fstream &myText, int lines); void wordLength(fstream &myText, int length); int main() { char textLine[100]; int lines = 0, word = 0; fstream myText; myText.open("myText.txt", ios::in | ios::out); if (!myText) { cout << "Cannot open file - myText.txt" … | |
![]() | Hey well i am using microsoft visual c# 2008 professional edition and i seem to be having trouble using the cursor. The cursor i am using is one from axialis cursor workshop examples. it is a .cur and it does work as i have changed my windows default cursors to … ![]() |
Hi guys, am currently creating a client/server program. However im having trouble reading from a text file. Im not sure whether fgets or fread is better in my case. Basically my program requires user to input a country, and the program will display its details out.My question is, what method … | |
Hi.. I've been trying to get this to work for hours now but I'm not understanding what to do. Basically I'm creating a quiz on python with 5 questions. I have a function that is only for the quiz. Another function is to display the highest quiz score. I want … | |
I am writing a program which will read a properties file. I craeted the properties file and placed it in the same location of the class file. But when I am trying to run the program from eclipse, it can't find the properties file, but if I specify the full … | |
Hi i'm stuck on this script that i'm busy writing and have no idea where to start. I need a script that connects to a secure ftp, downloads files and store it on my local pc. has anyone done something similar and which modules should i be looking at. | |
Hi, I have a file that has about 65000 lines and three columns. I need to read in the first 2 columns until line 112960. I then need to write the 12960 lines of 2 columns to a file. This needs to be repeated for about 600 files... I then … | |
Hi There I may be asking a question about something that is not do-able, but, here's my question Does anyone know if it is possible to let a visitor to my website upload a file to my server, without using the normal form file upload? maybe upload with ftp. I … | |
Hello. I am having a problem. I am attempting to gather a group of file names from a directory. I am able to do this. I tested the code by having the list populate into a listbox and all desired items were added to the list. Here is my code: … | |
Now before we start, please don't send me off on XML Serialization, I want binary for a reason. :) In the following code (and I don't even know if its correct ... it does compile), I'm trying to serialize and write a list of my class to a file and … | |
Hi All, I have written a JSP file which will run query, get the result in a csv file and send the csv file daily to an email address. But how can I execute this JSP file daily in Linux? Can anyone help in this? | |
I am new to c# with that in mind can some one please tell me how to call a class file that i have created in to a windows form file.for example how do i call a function that handles error logs to call and run on a form file. … ![]() | |
Hi, I don't know if this is the right place to post this question but here is my problem, I would like to take an audio wave file and convert it to a data file, (.csv, .txt etc). I would like to do some signal analysis on the file but … | |
[ATTACH=RIGHT]16431[/ATTACH]Blitz Arcade, the downloadable division of Blitz Games Studios found themselves a World Record holder today, despite having accomplished this feat last year. With the creation of[I] Invincible Tiger: The Legend of Han Toa[/I] in 2009, Blitz now holds the Guiness World Record for the very first stereoscopic 3D console … | |
his is a follow up to the question I asked earlier and with the help of some people here I was able to start up with the function I want to write,but I am yet to complete it. Here is my earlier question: I have a series of files with … | |
I would like to save to database but not file. please help me and show me how i can change from file to databasetables. [CODE]****users***** <?php function saveUsers($onlineusers_file){ $file_save=fopen("onlineusers_".$_POST… flock($file_save,LOCK_EX); for($line=0;$line<count($onlineusers_f… fputs($file_save,$onlineusers_file[$li… }; flock($file_save,LOCK_UN); fclose($file_save); } $onlineusers_file=file("onlineusers_".… if (isset($_POST['user'],$_POST['oper'])){ $user=$_POST['user']; $oper=$_POST['oper']; $userexist=in_array($user,$onlineusers… if ($userexist)$userindex=array_search($use… if($oper=="signin" && $userexist==false){ $onlineusers_file[]=$user; saveUsers($onlineusers_file); echo … | |
Hi, I have a file that connects to a database, database.php. I also have a file for defined constants, config.php, and it is stored in the top level directory because I'm going to use those constants on the main site and when I edit them, I don't want to edit … | |
I need to run a batch file batch file which is stored in my C folder. When I run this file, I get the following on the cmd. 1 APs were seen MAC Address SSID RSSI 00:27:0d:b6:df:10 IBM -93 Press any key to continue . . . Now, I need … | |
Hello all, I have spent a good few days looking over daniweb trying to get the right answer, But I am yet to find what I am looking for. I have successfully upload my image to a folder store and named my uploaded image. The path and file name is … | |
I have an assignment in class I'm and almost done but I need help with one part. Within each subject in the output file, list the students in alphabetic order, sorted by last name. Do not change the given case (upper/lower case) of the names that were read from the … | |
i have a .jar file that i want to run one certain computers on the network. Since these comps are changed out sometimes i wanted to add the java jdk that is up to date, the jdbc connector, and my .jar. I also have a batch file that copys and … | |
Hi Iam new to c++ programing and I have this project where I must write a program that takes in data from the employee.dat. I have the program started but now Iam stuck any help would be greatly appreciated. heres my instructions. • Note there are only 4 employees in … | |
Hi guys, i really need help here. I must write a program in c that reads a file .RAW that it contains photos in sequential order, every photo has a head-board of 4 bytes. (0xff 0xd8 oxff 0xe0 or 0xe1) and that way I can identify the beginning of the … | |
Hi, I think im trying to break c++ again in making it do something it does not want to do. Basically i have a logging class im making which simply takes a string stream and pumps it into a file. But i want 2 different versions one that trys to … | |
Hello. I'm using this constuction to write to file: [CODE]#include <iostream> #include <fstream> using namespace std; int main () { char data [50]; cout << "Enter data\n"; cin >> data; ofstream file("data.txt"); if (!file) { cout << "File opening error"; cin.get(); return 1; } file << data; file.close(); cout << … | |
I am having difficulty reading the following input file Jon 40 Chris 50 Pete 60 what is wrong with this code that I wrote to read the above file. thank you for your help. [code]//***************** #include <iostream> #include <string> #include <stdlib.h> #include <fstream> #include <iomanip> #include<cassert> using namespace std; void … | |
[CODE]private Bitmap _picture = new Bitmap(@"<C:\Users\Jack\Documents\Visual Studio 2010\Projects\Animotion1.0\DefaultCharPic.jpg>");[/CODE] as a datamember to a class? Can I just not assign Bitmaps as members? | |
Hello, I have a script that works great, basically i have a mysql database that contains information about files; like filename, description, size etc. The information is displayed on a webpage in a nice formatted table. each file has a link next to it and once pressed the script below … | |
Hi I am sending a text file to a remote app using urllib2. It all works well, but it just seems to take a very long time to send the data. My code is basically doing : TxData = open('OutputFile.txt') data = {'name': 'value', 'file': TxData } f = urllib2.urlopen(url, … | |
When i click "showcontents" it should display something like this in the label IF the file is non-text. The problem is it would not show some non-text files.. or it would only display a few characters like "MZ" Another is the copy button doesnt work. It should copy a file … | |
As I posted before I'm totally new to C. In bash i can use [CODE]IP = "`wget -O - -q icanhazip.com`" echo $IP[/CODE]= and it returns my ip. However I'm trying hard to get this via curl although I don't quite understand how it works yet. I determined it is … |
The End.